import type { AgentTool, AgentToolResult } from "@mariozechner/pi-agent-core"; import type { ImageSanitizationLimits } from "../image-sanitization.js"; export type AnyAgentTool = AgentTool; export type StringParamOptions = { required?: boolean; trim?: boolean; label?: string; allowEmpty?: boolean; }; export type ActionGate> = (key: keyof T, defaultValue?: boolean) => boolean; export declare class ToolInputError extends Error { readonly status = 400; constructor(message: string); } export declare function createActionGate>(actions: T | undefined): ActionGate; 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; export declare function readStringOrNumberParam(params: Record, key: string, options?: { required?: boolean; label?: string; }): string | undefined; export declare function readNumberParam(params: Record, key: string, options?: { required?: boolean; label?: string; integer?: boolean; }): number | undefined; export declare function readStringArrayParam(params: Record, key: string, options: StringParamOptions & { required: true; }): string[]; export declare function readStringArrayParam(params: Record, key: string, options?: StringParamOptions): string[] | undefined; export type ReactionParams = { emoji: string; remove: boolean; isEmpty: boolean; }; export declare function readReactionParams(params: Record, options: { emojiKey?: string; removeKey?: string; removeErrorMessage: string; }): ReactionParams; export declare function jsonResult(payload: unknown): AgentToolResult; export declare function imageResult(params: { label: string; path: string; base64: string; mimeType: string; extraText?: string; details?: Record; imageSanitization?: ImageSanitizationLimits; }): Promise>; export declare function imageResultFromFile(params: { label: string; path: string; extraText?: string; details?: Record; imageSanitization?: ImageSanitizationLimits; }): Promise>;