refactor(omo-task): rename to call_omo_agent with run_in_background parameter

- Rename omo-task to call-omo-agent with mandatory run_in_background parameter
- Implement background mode using BackgroundManager (fire-and-forget abort)
- Implement sync mode with existing subagent logic
- Fix background_cancel: use fire-and-forget abort to prevent parent session interruption
- Add call_omo_agent to tool disable list in explore/librarian agents
- Add call_omo_agent to tool disable list in BackgroundManager

🤖 GENERATED WITH ASSISTANCE OF [OhMyOpenCode](https://github.com/code-yeongyu/oh-my-opencode)
This commit is contained in:
YeonGyu-Kim
2025-12-12 18:39:53 +09:00
parent f007437991
commit 12c0b7b6c0
13 changed files with 262 additions and 136 deletions

View File

@@ -196,13 +196,11 @@ export function createBackgroundCancel(manager: BackgroundManager, client: Openc
Only running tasks can be cancelled.`
}
const abortResult = await client.session.abort({
// Fire-and-forget: abort 요청을 보내고 await 하지 않음
// await 하면 메인 세션까지 abort 되는 문제 발생
client.session.abort({
path: { id: task.sessionID },
})
if (abortResult.error) {
return `❌ Failed to abort session: ${(abortResult.error as any).message || String(abortResult.error)}`
}
}).catch(() => {})
task.status = "cancelled"
task.completedAt = new Date()