fix(delegate-task): use lowercase sisyphus-junior agent name in API calls
Previous fix (7ed7bf5c) only updated Atlas → atlas, but missed Sisyphus-Junior.
OpenCode does case-sensitive agent lookup, causing crash when delegate_task
tried to spawn 'Sisyphus-Junior' (registered as 'sisyphus-junior').
- SISYPHUS_JUNIOR_AGENT constant: 'Sisyphus-Junior' → 'sisyphus-junior'
- agent-tool-restrictions key: 'Sisyphus-Junior' → 'sisyphus-junior'
- Updated related test mocks
This commit is contained in:
@@ -30,7 +30,7 @@ describe("TaskToastManager", () => {
|
||||
const task = {
|
||||
id: "task_1",
|
||||
description: "Test task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
isBackground: true,
|
||||
skills: ["playwright", "git-master"],
|
||||
}
|
||||
@@ -127,7 +127,7 @@ describe("TaskToastManager", () => {
|
||||
const task = {
|
||||
id: "task_1",
|
||||
description: "Full info task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
isBackground: true,
|
||||
skills: ["frontend-ui-ux"],
|
||||
}
|
||||
@@ -149,7 +149,7 @@ describe("TaskToastManager", () => {
|
||||
const task = {
|
||||
id: "task_1",
|
||||
description: "Task with category default model",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
isBackground: false,
|
||||
modelInfo: { model: "google/gemini-3-pro-preview", type: "category-default" as const },
|
||||
}
|
||||
@@ -169,7 +169,7 @@ describe("TaskToastManager", () => {
|
||||
const task = {
|
||||
id: "task_1b",
|
||||
description: "Task with system default model",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
isBackground: false,
|
||||
modelInfo: { model: "anthropic/claude-sonnet-4-5", type: "system-default" as const },
|
||||
}
|
||||
@@ -190,7 +190,7 @@ describe("TaskToastManager", () => {
|
||||
const task = {
|
||||
id: "task_2",
|
||||
description: "Task with inherited model",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
isBackground: false,
|
||||
modelInfo: { model: "cliproxy/claude-opus-4-5", type: "inherited" as const },
|
||||
}
|
||||
@@ -211,7 +211,7 @@ describe("TaskToastManager", () => {
|
||||
const task = {
|
||||
id: "task_3",
|
||||
description: "Task with user model",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
isBackground: false,
|
||||
modelInfo: { model: "my-provider/my-model", type: "user-defined" as const },
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ const AGENT_RESTRICTIONS: Record<string, Record<string, boolean>> = {
|
||||
read: true,
|
||||
},
|
||||
|
||||
"Sisyphus-Junior": {
|
||||
"sisyphus-junior": {
|
||||
task: false,
|
||||
delegate_task: false,
|
||||
},
|
||||
|
||||
@@ -288,7 +288,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-variant",
|
||||
sessionID: "session-variant",
|
||||
description: "Variant task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
@@ -351,7 +351,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-default-variant",
|
||||
sessionID: "session-default-variant",
|
||||
description: "Default variant task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
@@ -951,7 +951,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-unstable",
|
||||
sessionID: "ses_unstable_gemini",
|
||||
description: "Unstable gemini task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
@@ -1016,7 +1016,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-normal-bg",
|
||||
sessionID: "ses_normal_bg",
|
||||
description: "Normal background task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
@@ -1135,7 +1135,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-artistry",
|
||||
sessionID: "ses_artistry_gemini",
|
||||
description: "Artistry gemini task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
@@ -1200,7 +1200,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-writing",
|
||||
sessionID: "ses_writing_gemini",
|
||||
description: "Writing gemini task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
@@ -1265,7 +1265,7 @@ describe("sisyphus-task", () => {
|
||||
id: "task-custom-unstable",
|
||||
sessionID: "ses_custom_unstable",
|
||||
description: "Custom unstable task",
|
||||
agent: "Sisyphus-Junior",
|
||||
agent: "sisyphus-junior",
|
||||
status: "running",
|
||||
}
|
||||
},
|
||||
|
||||
@@ -18,7 +18,7 @@ import { CATEGORY_MODEL_REQUIREMENTS } from "../../shared/model-requirements"
|
||||
|
||||
type OpencodeClient = PluginInput["client"]
|
||||
|
||||
const SISYPHUS_JUNIOR_AGENT = "Sisyphus-Junior"
|
||||
const SISYPHUS_JUNIOR_AGENT = "sisyphus-junior"
|
||||
|
||||
function parseModelString(model: string): { providerID: string; modelID: string } | undefined {
|
||||
const parts = model.split("/")
|
||||
|
||||
Reference in New Issue
Block a user