{"version":3,"file":"tools.d.ts","names":["BaseContentBlock","Tools","KNOWN_BLOCK_TYPES","TName","TArgs","Record","TOutput","ToolCall","ToolCallChunk","InvalidToolCall","ServerToolCall","ServerToolCallChunk","ServerToolCallResult"],"sources":["../../../src/messages/content/tools.d.ts"],"sourcesContent":["import { BaseContentBlock } from \"./base.js\";\nexport type Tools = never;\nexport declare const KNOWN_BLOCK_TYPES: string[];\n// eslint-disable-next-line @typescript-eslint/no-namespace\nexport declare namespace Tools {\n    /**\n     * Represents a request to call a tool.\n     *\n     * @example\n     * ```ts\n     * const toolCall: ToolCall = {\n     *     type: \"tool_call\",\n     *     name: \"foo\",\n     *     args: { a: 1 },\n     *     callId: \"123\"\n     * };\n     * ```\n     * This represents a request to call the tool named \"foo\" with arguments {\"a\": 1}\n     * and an identifier of \"123\".\n     */\n    interface ToolCall<TName extends string = string, TArgs = unknown> extends BaseContentBlock {\n        /**\n         * Type of the content block\n         */\n        readonly type: \"tool_call\";\n        /**\n         * The name of the tool being called\n         */\n        name: TName;\n        /**\n         * The arguments to the tool call\n         */\n        args: TArgs;\n    }\n    /** Content block to represent partial data of a tool call */\n    interface ToolCallChunk<TName extends string = string> extends BaseContentBlock {\n        /**\n         * Type of the content block\n         */\n        readonly type: \"tool_call_chunk\";\n        /**\n         * The name of the tool being called\n         */\n        name?: TName;\n        /**\n         * The arguments to the tool call\n         */\n        args?: string;\n        /**\n         * The index of the tool call chunk\n         */\n        index?: number;\n    }\n    /** Content block to represent an invalid tool call */\n    interface InvalidToolCall<TName extends string = string> extends BaseContentBlock {\n        /**\n         * Type of the content block\n         */\n        readonly type: \"invalid_tool_call\";\n        /**\n         * The name of the tool being called\n         */\n        name?: TName;\n        /**\n         * The arguments to the tool call\n         */\n        args?: string;\n        /**\n         * An error message associated with the tool call\n         */\n        error?: string;\n        /**\n         * Index of block in aggregate response\n         */\n        index?: string | number;\n    }\n    interface ServerToolCall<TName extends string = string, TArgs = unknown> extends BaseContentBlock {\n        /**\n         * Type of the content block\n         */\n        readonly type: \"server_tool_call\";\n        /**\n         * The name of the tool being called\n         */\n        name: TName;\n        /**\n         * The arguments to the tool call\n         */\n        args: TArgs;\n    }\n    interface ServerToolCallChunk<TName extends string = string> extends BaseContentBlock {\n        /**\n         * Type of the content block\n         */\n        readonly type: \"server_tool_call_chunk\";\n        /**\n         * The name of the tool being called\n         */\n        name?: TName;\n        /**\n         * The arguments to the tool call\n         */\n        args?: string;\n    }\n    interface ServerToolCallResult<TOutput = Record<string, unknown>> extends BaseContentBlock {\n        /**\n         * Type of the content block\n         */\n        readonly type: \"server_tool_call_result\";\n        /**\n         * The unique identifier of the tool call that this result corresponds to\n         */\n        toolCallId: string;\n        /**\n         * The status of the server tool call\n         */\n        status: \"success\" | \"error\";\n        /**\n         * The output of the server tool call\n         */\n        output: TOutput;\n    }\n    type Standard = ToolCall | ToolCallChunk | InvalidToolCall | ServerToolCall | ServerToolCallChunk | ServerToolCallResult;\n}\n"],"mappings":";;;KACYC,KAAAA;AAAZ;AAGyBA,kBAAAA,KAAAA,CAAK;EAAA;;;;;;;;;;;;;;;EAoHP,UAhBuDD,QAAAA,CAAAA,cAAAA,MAAAA,GAAAA,MAAAA,EAAAA,QAAAA,OAAAA,CAAAA,SApFCA,gBAoFDA,CAAAA;IAkB1DO;;;IAA6CG,SAAAA,IAAAA,EAAAA,WAAAA;IAAiBC;;AAA0C;UA9F9GR;;;;UAIAC;;;iEAGqDJ;;;;;;;;WAQpDG;;;;;;;;;;;mEAWsDH;;;;;;;;WAQtDG;;;;;;;;;;;;;;mFAcsEH;;;;;;;;UAQvEG;;;;UAIAC;;uEAE2DJ;;;;;;;;WAQ1DG;;;;;;2CAM8BE,iCAAiCL;;;;;;;;;;;;;;;;YAgB9DM;;kBAEIC,WAAWC,gBAAgBC,kBAAkBC,iBAAiBC,sBAAsBC"}