import type { AgentTool } from "@earendil-works/pi-agent-core"; import type { CodemodeTool } from "@earendil-works/pi-codemode"; import { type Static, Type } from "typebox"; import type { ToolDefinition, ToolInfo, ToolNamespace } from "../../core/extensions/types.ts"; import type { ModelRegistry } from "../../core/model-registry.ts"; import type { CodemodeMode } from "../../core/settings-manager.ts"; export declare const CODEMODE_TOOL_NAME = "codemode"; export declare const CODEMODE_DOCS_PATH: string; export declare const CODEMODE_STORE_ENTRY_TYPE = "codemode-store"; export declare const DEFAULT_CODEMODE_INLINE_BUDGET: number; export interface CodemodeStoreEntryData { set: Record; delete: string[]; } export type CodemodeModelRuntime = Pick; export interface CodemodeToolOptions { getToolNamespace?: (name: string) => ToolNamespace | undefined; /** Prompt guidelines shown with tool declarations in describeTool() and ALL_TOOLS. */ getToolGuidelines?: () => ReadonlyMap; models?: boolean; appendEntry?: (type: string, data: CodemodeStoreEntryData) => Promise; getMode?: () => CodemodeMode; getInlineBudget?: () => number | undefined; /** Active model-only tools. Scripts cannot call them, so discovery answers an exact name with a hint. */ getModelOnlyTools?: () => readonly string[]; } export declare const codemodeSchema: Type.TObject<{ code: Type.TString; }>; export type CodemodeToolInput = Static; export declare function isCodemodeTool(tool: Pick): boolean; export interface CodemodeNestedCall { id: string; name: string; args: string; status: "running" | "ok" | "error" | "cancelled"; durationMs?: number; error?: string; cost?: number; } export interface CodemodeToolDetails { calls: CodemodeNestedCall[]; fullOutputPath?: string; } export declare function toCodemodeDeclaration(tool: AgentTool, guidelines?: readonly string[]): Omit; export declare function getCodemodeCallableTools(tools: readonly AgentTool[]): AgentTool[]; export interface CodemodeDescriptionOptions { models?: boolean; namespaces?: ReadonlyMap; deferred?: ReadonlySet; guidelines?: ReadonlyMap; inlineBudget?: number; } export declare function createCodemodeDescription(tools: readonly AgentTool[], options?: CodemodeDescriptionOptions): string; export declare function createCodemodeToolDefinition(options?: CodemodeToolOptions): ToolDefinition; export declare function createCodemodeTool(tools?: readonly AgentTool[], options?: CodemodeToolOptions): AgentTool; //# sourceMappingURL=tool.d.ts.map