/** * Tool Helpers * * Helper functions for creating tool results and parsing parameters. * Matches the API from pi-coding-agent. */ import type { AgentToolResult } from "./types.js"; /** * Create a JSON tool result */ export declare function jsonResult(payload: unknown): AgentToolResult; /** * Options for reading string parameters */ export interface StringParamOptions { required?: boolean; trim?: boolean; label?: string; allowEmpty?: boolean; } /** * Read a string parameter from tool args */ export declare function readStringParam(params: Record, key: string, options?: StringParamOptions & { required: true; }): string; export declare function readStringParam(params: Record, key: string, options?: StringParamOptions): string | undefined; /** * Read a number parameter from tool args */ export declare function readNumberParam(params: Record, key: string, options?: { required?: boolean; label?: string; integer?: boolean; }): number | undefined; /** * Read a boolean parameter from tool args */ export declare function readBooleanParam(params: Record, key: string, options?: { required?: boolean; label?: string; }): boolean | undefined; /** * Read a string array parameter from tool args */ export declare function readStringArrayParam(params: Record, key: string, options?: StringParamOptions): string[] | undefined; //# sourceMappingURL=tool-helpers.d.ts.map