UNPKG

@code-yeongyu/senpi

Version:

Coding agent CLI with read, bash, edit, write tools and session management

17 lines • 1.34 kB
import type { AgentTool } from "@earendil-works/pi-agent-core"; import type { ExtensionToolContext, ToolDefinition } from "../extensions/types.ts"; import type { ToolDispatcher, ToolUnavailableDetails } from "../tool-dispatch/tool-dispatcher.ts"; /** Creates the context for one tool call. */ export type ToolContextFactory = (toolCallId: string, signal: AbortSignal | undefined) => ExtensionToolContext; /** Wrap a ToolDefinition into an AgentTool for the core runtime. */ export declare function wrapToolDefinition<TDetails = unknown>(definition: ToolDefinition<any, TDetails>, ctxFactory?: ToolContextFactory, dispatcher?: ToolDispatcher): AgentTool<any, TDetails | ToolUnavailableDetails>; /** Wrap multiple ToolDefinitions into AgentTools for the core runtime. */ export declare function wrapToolDefinitions(definitions: ToolDefinition<any, any>[], ctxFactory?: ToolContextFactory, dispatcher?: ToolDispatcher): AgentTool<any>[]; /** * Synthesize a minimal ToolDefinition from an AgentTool. * * This keeps AgentSession's internal registry definition-first even when a caller * provides plain AgentTool overrides that do not include prompt metadata or renderers. */ export declare function createToolDefinitionFromAgentTool(tool: AgentTool<any>): ToolDefinition<any, unknown>; //# sourceMappingURL=tool-definition-wrapper.d.ts.map