fix: resolve category delegation and command routing with display name agent keys
Category-based delegation (task(category='quick')) was broken because
SISYPHUS_JUNIOR_AGENT sent 'sisyphus-junior' to session.prompt but
config.agent keys are now display names ('Sisyphus-Junior').
- Use getAgentDisplayName() for SISYPHUS_JUNIOR_AGENT constant
- Replace hardcoded 'sisyphus-junior' strings in tools.ts with constant
- Update background-output local constants to use display names
- Add remapCommandAgentFields() to translate command agent fields
- Add raw-key fallback in tool-config-handler agentByKey()
This commit is contained in:
@@ -9,7 +9,9 @@ import { formatFullSession } from "./full-session-format"
|
||||
import { formatTaskResult } from "./task-result-format"
|
||||
import { formatTaskStatus } from "./task-status-format"
|
||||
|
||||
const SISYPHUS_JUNIOR_AGENT = "sisyphus-junior"
|
||||
import { getAgentDisplayName } from "../../shared/agent-display-names"
|
||||
|
||||
const SISYPHUS_JUNIOR_AGENT = getAgentDisplayName("sisyphus-junior")
|
||||
|
||||
type ToolContextWithMetadata = {
|
||||
sessionID: string
|
||||
|
||||
@@ -8,7 +8,9 @@ import { storeToolMetadata } from "../../../features/tool-metadata-store"
|
||||
import type { BackgroundTask } from "../../../features/background-agent"
|
||||
import type { ToolContextWithMetadata } from "./utils"
|
||||
|
||||
const SISYPHUS_JUNIOR_AGENT = "sisyphus-junior"
|
||||
import { getAgentDisplayName } from "../../../shared/agent-display-names"
|
||||
|
||||
const SISYPHUS_JUNIOR_AGENT = getAgentDisplayName("sisyphus-junior")
|
||||
|
||||
type ToolContextWithCallId = ToolContextWithMetadata & {
|
||||
callID?: string
|
||||
|
||||
@@ -85,7 +85,7 @@ describe("background_output full_session", () => {
|
||||
|
||||
const task = createTask({
|
||||
id: "task-1",
|
||||
agent: "sisyphus-junior",
|
||||
agent: "Sisyphus-Junior",
|
||||
category: "quick",
|
||||
description: "Fix flaky test",
|
||||
status: "running",
|
||||
|
||||
Reference in New Issue
Block a user