import type { AgentToolResult, AgentToolUpdateCallback, ExtensionContext, ToolDefinition, } from "@earendil-works/pi-coding-agent"; import type { Api, Model } from "@earendil-works/pi-ai"; import type { Static, TSchema } from "typebox"; import type { ConfigContext } from "./config-context.ts"; export type ToolDefinitionWithContext = Omit< ToolDefinition, "execute" > & { execute: ( toolCallId: string, params: Static, signal: AbortSignal | undefined, onUpdate: AgentToolUpdateCallback | undefined, ctx: TContext, ) => Promise>; }; export type CodexToolExecutionContext = ConfigContext & { model: Model | undefined; modelRegistry: Pick; sessionManager: Pick; };