From e36f9cada1aba6bccf2891cee8232a9775b0bf4a Mon Sep 17 00:00:00 2001 From: YeonGyu-Kim Date: Tue, 28 Apr 2026 16:41:32 +0900 Subject: [PATCH] fix(plugin): replace any type with explicit summarize overloads in event handler Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus --- src/plugin/event.ts | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/plugin/event.ts b/src/plugin/event.ts index 7414f82ea..ee0fe8e20 100644 --- a/src/plugin/event.ts +++ b/src/plugin/event.ts @@ -152,7 +152,7 @@ export function createEventHandler(args: { }): (input: EventInput) => Promise { const { ctx, pluginConfig, firstMessageVariantGate, managers, hooks } = args; const tmuxIntegrationEnabled = pluginConfig.tmux?.enabled ?? false; - const pluginContext = ctx as { + const pluginContext = ctx as PluginContext & { directory: string; client: { session: { @@ -177,7 +177,18 @@ export function createEventHandler(args: { }; query: { directory: string }; }) => Promise; - summarize: (...args: unknown[]) => Promise; + summarize: { + (input: { + path: { id: string }; + body: { providerID: string; modelID: string; auto?: boolean }; + query: { directory: string }; + }): Promise; + (input: { + path: { id: string }; + body: { auto: boolean }; + query: { directory: string }; + }): Promise; + }; }; }; };