refactor: migrate delegate_task to task tool with metadata fixes

- Rename delegate_task tool to task across codebase (100 files)
- Update model references: claude-opus-4-6 → 4-5, gpt-5.3-codex → 5.2-codex
- Add tool-metadata-store to restore metadata overwritten by fromPlugin()
- Add session ID polling for BackgroundManager task sessions
- Await async ctx.metadata() calls in tool executors
- Add ses_ prefix guard to getMessageDir for performance
- Harden BackgroundManager with idle deferral and error handling
- Fix duplicate task key in sisyphus-junior test object literals
- Fix unawaited showOutputToUser in ast_grep_replace
- Fix background=true → run_in_background=true in ultrawork prompt
- Fix duplicate task/task references in docs and comments
This commit is contained in:
YeonGyu-Kim
2026-02-06 16:01:54 +09:00
parent f1c794e63e
commit a691a3ac0a
78 changed files with 1182 additions and 403 deletions
+2 -2
View File
@@ -51,14 +51,14 @@ ${createSystemDirective(SystemDirectiveTypes.PROMETHEUS_READ_ONLY)}
│ │ - Record decisions to .sisyphus/drafts/ │
├──────┼──────────────────────────────────────────────────────────────┤
│ 2 │ METIS CONSULTATION: Pre-generation gap analysis │
│ │ - delegate_task(agent="Metis (Plan Consultant)", ...) │
│ │ - task(agent="Metis (Plan Consultant)", ...) │
│ │ - Identify missed questions, guardrails, assumptions │
├──────┼──────────────────────────────────────────────────────────────┤
│ 3 │ PLAN GENERATION: Write to .sisyphus/plans/*.md │
│ │ <- YOU ARE HERE │
├──────┼──────────────────────────────────────────────────────────────┤
│ 4 │ MOMUS REVIEW (if high accuracy requested) │
│ │ - delegate_task(agent="Momus (Plan Reviewer)", ...) │
│ │ - task(agent="Momus (Plan Reviewer)", ...) │
│ │ - Loop until OKAY verdict │
├──────┼──────────────────────────────────────────────────────────────┤
│ 5 │ SUMMARY: Present to user │
+5 -5
View File
@@ -227,11 +227,11 @@ describe("prometheus-md-only", () => {
).resolves.toBeUndefined()
})
test("should inject read-only warning when Prometheus calls delegate_task", async () => {
test("should inject read-only warning when Prometheus calls task", async () => {
// given
const hook = createPrometheusMdOnlyHook(createMockPluginInput())
const input = {
tool: "delegate_task",
tool: "task",
sessionID: TEST_SESSION_ID,
callID: "call-1",
}
@@ -289,7 +289,7 @@ describe("prometheus-md-only", () => {
// given
const hook = createPrometheusMdOnlyHook(createMockPluginInput())
const input = {
tool: "delegate_task",
tool: "task",
sessionID: TEST_SESSION_ID,
callID: "call-1",
}
@@ -330,11 +330,11 @@ describe("prometheus-md-only", () => {
).resolves.toBeUndefined()
})
test("should not inject warning for non-Prometheus agents calling delegate_task", async () => {
test("should not inject warning for non-Prometheus agents calling task", async () => {
// given
const hook = createPrometheusMdOnlyHook(createMockPluginInput())
const input = {
tool: "delegate_task",
tool: "task",
sessionID: TEST_SESSION_ID,
callID: "call-1",
}
+1 -1
View File
@@ -63,7 +63,7 @@ function getMessageDir(sessionID: string): string | null {
return null
}
const TASK_TOOLS = ["delegate_task", "task", "call_omo_agent"]
const TASK_TOOLS = ["task", "call_omo_agent"]
function getAgentFromMessageFiles(sessionID: string): string | undefined {
const messageDir = getMessageDir(sessionID)