fix(config): allow Sisyphus-Junior agent customization via oh-my-opencode.json (#648)

* fix(config): allow Sisyphus-Junior agent customization via oh-my-opencode.json

Allow users to configure Sisyphus-Junior agent via agents["Sisyphus-Junior"]
in oh-my-opencode.json, removing hardcoded defaults while preserving safety
constraints.
Closes #623
Changes:
- Add "Sisyphus-Junior" to AgentOverridesSchema and OverridableAgentNameSchema
- Create createSisyphusJuniorAgentWithOverrides() helper with guardrails
- Update config-handler to use override helper instead of hardcoded values
- Fix README category wording (runtime presets, not separate agents)
Honored override fields:
- model, temperature, top_p, tools, permission, description, color, prompt_append
Safety guardrails enforced post-merge:
- mode forced to "subagent" (cannot change)
- prompt is append-only (base discipline text preserved)
- blocked tools (task, sisyphus_task, call_omo_agent) always denied
- disable: true ignores override block, uses defaults
Category interaction:
- sisyphus_task(category=...) runs use the base Sisyphus-Junior agent config
- Category model/temperature overrides take precedence at request time
- To change model for a category, set categories.<cat>.model (not agent override)
- Categories are runtime presets applied to Sisyphus-Junior, not separate agents
Tests: 15 new tests in sisyphus-junior.test.ts, 3 new schema tests

Co-Authored-By: Sisyphus <sisyphus@mengmota.com>

* test(sisyphus-junior): add guard assertion for prompt anchor text

Add validation that baseEndIndex is not -1 before using it for ordering
assertion. Previously, if "Dense > verbose." text changed in the base
prompt, indexOf would return -1 and any positive appendIndex would pass.

Co-Authored-By: Sisyphus <sisyphus@mengmota.com>

---------

Co-authored-by: Sisyphus <sisyphus@mengmota.com>
This commit is contained in:
Ivan Marshall Widjaja
2026-01-12 19:46:47 +11:00
committed by GitHub
parent c79235744b
commit 0fada4d0fc
8 changed files with 502 additions and 7 deletions
+4 -5
View File
@@ -1,5 +1,5 @@
import { createBuiltinAgents } from "../agents";
import { createSisyphusJuniorAgent } from "../agents/sisyphus-junior";
import { createSisyphusJuniorAgentWithOverrides } from "../agents/sisyphus-junior";
import {
loadUserCommands,
loadProjectCommands,
@@ -152,10 +152,9 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
Sisyphus: builtinAgents.Sisyphus,
};
agentConfig["Sisyphus-Junior"] = createSisyphusJuniorAgent({
model: "anthropic/claude-sonnet-4-5",
temperature: 0.1,
});
agentConfig["Sisyphus-Junior"] = createSisyphusJuniorAgentWithOverrides(
pluginConfig.agents?.["Sisyphus-Junior"]
);
if (builderEnabled) {
const { name: _buildName, ...buildConfigWithoutName } =