import { FunctionTool, IToolSchema, TToolExecutor, TToolParameters, TUniversalValue } from "@robota-sdk/agent-core"; import { TypeOf, ZodType } from "zod"; //#region src/types/tool-result.d.ts /** * Result returned by a CLI tool invocation */ interface IToolInvocationResult { success: boolean; output: string; error?: string; exitCode?: number; /** Start line number of the edit in the original file (Edit tool only) */ startLine?: number; } //#endregion //#region src/implementations/function-tool.d.ts /** * Helper function to create a function tool from a simple function */ declare function createFunctionTool(name: string, description: string, parameters: IToolSchema['parameters'], fn: TToolExecutor): FunctionTool; /** * What a tool declares about itself beyond its callable shape (CLI-1990). * * Optional, and omission is a declaration too: a tool that says nothing is RESIDENT — its schema is * sent on every request, which is what every tool in the tree does today. */ interface IFunctionToolResidencyOptions { /** * Withhold this tool's schema from the model until it is loaded by `ToolSearch` or forced by a * `toolChoice`. Only honoured while the tool-search policy is engaged, so declaring it on a small * tool set costs nothing. */ deferLoading?: boolean; } /** * Helper function to create a function tool from Zod schema */ declare function createZodFunctionTool(name: string, description: string, zodSchema: S, fn: TToolExecutor>, residency?: IFunctionToolResidencyOptions): FunctionTool; //#endregion //#region src/implementations/function-tool/types.d.ts /** * Parameter type validation options */ interface IFunctionToolValidationOptions { strict?: boolean; allowUnknown?: boolean; validateTypes?: boolean; } /** * Tool execution metadata */ interface IFunctionToolExecutionMetadata { executionTime: number; toolName: string; parameters: TToolParameters; } /** * Tool result with metadata */ interface IFunctionToolResult { success: boolean; data: TUniversalValue; metadata?: IFunctionToolExecutionMetadata; } //#endregion export { type IFunctionToolExecutionMetadata, type IFunctionToolResult, type IFunctionToolValidationOptions, type IToolInvocationResult, createFunctionTool, createZodFunctionTool }; //# sourceMappingURL=browser.d.ts.map