refactor(plugin): update atlas references
Update plugin handlers, commands, and integration points to use 'atlas' agent name. Start-work command and config handler now reference 'atlas'. Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -55,7 +55,7 @@ ${REFACTOR_TEMPLATE}
|
||||
},
|
||||
"start-work": {
|
||||
description: "(builtin) Start Sisyphus work session from Prometheus plan",
|
||||
agent: "orchestrator-sisyphus",
|
||||
agent: "atlas",
|
||||
template: `<command-instruction>
|
||||
${START_WORK_TEMPLATE}
|
||||
</command-instruction>
|
||||
|
||||
@@ -569,7 +569,7 @@ export function createSisyphusOrchestratorHook(
|
||||
}
|
||||
|
||||
if (!isCallerOrchestrator(sessionID)) {
|
||||
log(`[${HOOK_NAME}] Skipped: last agent is not orchestrator-sisyphus`, { sessionID })
|
||||
log(`[${HOOK_NAME}] Skipped: last agent is not atlas`, { sessionID })
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -379,7 +379,7 @@ describe("start-work hook", () => {
|
||||
})
|
||||
|
||||
describe("session agent management", () => {
|
||||
test("should update session agent to orchestrator-sisyphus when start-work command is triggered", async () => {
|
||||
test("should update session agent to atlas when start-work command is triggered", async () => {
|
||||
// #given
|
||||
const updateSpy = spyOn(sessionState, "updateSessionAgent")
|
||||
|
||||
@@ -395,7 +395,7 @@ describe("start-work hook", () => {
|
||||
)
|
||||
|
||||
// #then
|
||||
expect(updateSpy).toHaveBeenCalledWith("ses-prometheus-to-sisyphus", "orchestrator-sisyphus")
|
||||
expect(updateSpy).toHaveBeenCalledWith("ses-prometheus-to-sisyphus", "atlas")
|
||||
updateSpy.mockRestore()
|
||||
})
|
||||
})
|
||||
|
||||
@@ -71,7 +71,7 @@ export function createStartWorkHook(ctx: PluginInput) {
|
||||
sessionID: input.sessionID,
|
||||
})
|
||||
|
||||
updateSessionAgent(input.sessionID, "orchestrator-sisyphus")
|
||||
updateSessionAgent(input.sessionID, "atlas")
|
||||
|
||||
const existingState = readBoulderState(ctx.directory)
|
||||
const sessionId = input.sessionID
|
||||
|
||||
@@ -160,7 +160,7 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
explore?: { tools?: Record<string, unknown> };
|
||||
librarian?: { tools?: Record<string, unknown> };
|
||||
"multimodal-looker"?: { tools?: Record<string, unknown> };
|
||||
"orchestrator-sisyphus"?: { tools?: Record<string, unknown> };
|
||||
atlas?: { tools?: Record<string, unknown> };
|
||||
Sisyphus?: { tools?: Record<string, unknown> };
|
||||
};
|
||||
const configAgent = config.agent as AgentConfig | undefined;
|
||||
@@ -319,8 +319,8 @@ export function createConfigHandler(deps: ConfigHandlerDeps) {
|
||||
const agent = agentResult["multimodal-looker"] as AgentWithPermission;
|
||||
agent.permission = { ...agent.permission, task: "deny", look_at: "deny" };
|
||||
}
|
||||
if (agentResult["orchestrator-sisyphus"]) {
|
||||
const agent = agentResult["orchestrator-sisyphus"] as AgentWithPermission;
|
||||
if (agentResult["atlas"]) {
|
||||
const agent = agentResult["atlas"] as AgentWithPermission;
|
||||
agent.permission = { ...agent.permission, task: "deny", call_omo_agent: "deny", delegate_task: "allow" };
|
||||
}
|
||||
if (agentResult.Sisyphus) {
|
||||
|
||||
@@ -894,17 +894,29 @@ describe("sisyphus-task", () => {
|
||||
})
|
||||
|
||||
describe("modelInfo detection via resolveCategoryConfig", () => {
|
||||
test("systemDefaultModel is used when no userModel and no inheritedModel", () => {
|
||||
// #given - builtin category, no user model, no inherited model
|
||||
test("catalog model is used for category with catalog entry", () => {
|
||||
// #given - ultrabrain has catalog entry
|
||||
const categoryName = "ultrabrain"
|
||||
|
||||
// #when
|
||||
const resolved = resolveCategoryConfig(categoryName, { systemDefaultModel: SYSTEM_DEFAULT_MODEL })
|
||||
|
||||
// #then - actualModel should be systemDefaultModel (categories no longer have model defaults)
|
||||
// #then - catalog model is used
|
||||
expect(resolved).not.toBeNull()
|
||||
const actualModel = resolved!.config.model
|
||||
expect(actualModel).toBe(SYSTEM_DEFAULT_MODEL)
|
||||
expect(resolved!.config.model).toBe("openai/gpt-5.2-codex")
|
||||
expect(resolved!.config.variant).toBe("xhigh")
|
||||
})
|
||||
|
||||
test("systemDefaultModel is used for category without catalog entry", () => {
|
||||
// #given - general has no catalog entry
|
||||
const categoryName = "general"
|
||||
|
||||
// #when
|
||||
const resolved = resolveCategoryConfig(categoryName, { systemDefaultModel: SYSTEM_DEFAULT_MODEL })
|
||||
|
||||
// #then - systemDefaultModel is used
|
||||
expect(resolved).not.toBeNull()
|
||||
expect(resolved!.config.model).toBe(SYSTEM_DEFAULT_MODEL)
|
||||
})
|
||||
|
||||
test("inheritedModel takes precedence over systemDefaultModel for builtin category", () => {
|
||||
|
||||
@@ -118,22 +118,24 @@ export function resolveCategoryConfig(
|
||||
const { userCategories, inheritedModel, systemDefaultModel } = options
|
||||
const defaultConfig = DEFAULT_CATEGORIES[categoryName]
|
||||
const userConfig = userCategories?.[categoryName]
|
||||
const catalogEntry = CATEGORY_MODEL_CATALOG[categoryName]
|
||||
const defaultPromptAppend = CATEGORY_PROMPT_APPENDS[categoryName] ?? ""
|
||||
|
||||
if (!defaultConfig && !userConfig) {
|
||||
return null
|
||||
}
|
||||
|
||||
// Model priority: user override > inherited from parent > system default
|
||||
// Model priority: user override > inherited from parent > catalog default > system default
|
||||
const model = resolveModel({
|
||||
userModel: userConfig?.model,
|
||||
inheritedModel,
|
||||
systemDefault: systemDefaultModel,
|
||||
systemDefault: catalogEntry?.model ?? systemDefaultModel,
|
||||
})
|
||||
const config: CategoryConfig = {
|
||||
...defaultConfig,
|
||||
...userConfig,
|
||||
model,
|
||||
variant: userConfig?.variant ?? catalogEntry?.variant,
|
||||
}
|
||||
|
||||
let promptAppend = defaultPromptAppend
|
||||
|
||||
Reference in New Issue
Block a user