From db15f96cd88321ca4b3e901258a07f9626083f53 Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Mon, 23 Feb 2026 02:42:37 +0900 Subject: [PATCH] fix(tools/call-omo-agent): replace as any with SessionWithPromptAsync type Add SessionWithPromptAsync local type for promptAsync access Remove as any cast from session.promptAsync call Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus --- src/tools/call-omo-agent/sync-executor.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/tools/call-omo-agent/sync-executor.ts b/src/tools/call-omo-agent/sync-executor.ts index d1310f92..af356cc9 100644 --- a/src/tools/call-omo-agent/sync-executor.ts +++ b/src/tools/call-omo-agent/sync-executor.ts @@ -6,6 +6,10 @@ import { createOrGetSession } from "./session-creator" import { waitForCompletion } from "./completion-poller" import { processMessages } from "./message-processor" +type SessionWithPromptAsync = { + promptAsync: (opts: { path: { id: string }; body: Record }) => Promise +} + type ExecuteSyncDeps = { createOrGetSession: typeof createOrGetSession waitForCompletion: typeof waitForCompletion @@ -41,7 +45,7 @@ export async function executeSync( log(`[call_omo_agent] Prompt text:`, args.prompt.substring(0, 100)) try { - await (ctx.client.session as any).promptAsync({ + await (ctx.client.session as unknown as SessionWithPromptAsync).promptAsync({ path: { id: sessionID }, body: { agent: args.subagent_type,