/** * CustomToolAdapter wraps CustomTool instances into AgentTool for use with the agent. */ import type { AgentTool, AgentToolUpdateCallback, ToolLoadMode } from "@oh-my-pi/pi-agent-core"; import type { Static, TSchema } from "@oh-my-pi/pi-ai"; import type { Theme } from "@oh-my-pi/pi-tui/theme"; import type { CustomTool, CustomToolContext } from "./types.js"; export declare class CustomToolAdapter implements AgentTool { private tool; private getContext; name: string; label: string; description: string; parameters: TParams; readonly strict: boolean | undefined; readonly loadMode: ToolLoadMode; constructor(tool: CustomTool, getContext: () => CustomToolContext); execute(toolCallId: string, params: Static, signal?: AbortSignal, onUpdate?: AgentToolUpdateCallback, context?: CustomToolContext): Promise>; /** * Backward-compatible export of factory function for existing callers. * Prefer CustomToolAdapter constructor directly. */ static wrap(tool: CustomTool, getContext: () => CustomToolContext): AgentTool; }