import type { TauClientToolPresentation } from "./client_tool_presentation.js"; import type { TauSdkClientToolContext, TauSdkClientToolResult, TauSdkSessionExecResult } from "./types.js"; export declare const TAU_CLIENT_TOOL_COMMAND_PROTOCOL_VERSION = 4; export declare const TAU_CLIENT_TOOL_COMMAND_MAX_RESULT_BYTES: number; export declare const TAU_CLIENT_TOOL_COMMAND_MAX_PROTOCOL_FRAME_BYTES: number; export declare const TAU_CLIENT_TOOL_COMMAND_MAX_PROTOCOL_BYTES: number; export declare const TAU_CLIENT_TOOL_COMMAND_MAX_PROTOCOL_FRAMES = 512; export type TauClientToolCommandPrepare = { version: 4; type: "prepare"; sessionId: string; agentId: string; callId: string; toolName: string; arguments: unknown; }; export type TauClientToolCommandExecute = { version: 4; type: "execute"; }; export type TauClientToolCommandExecRequest = { version: 4; type: "exec"; requestId: string; command: string; options: { args?: string[]; env?: Record; stdinBase64?: string; cwd?: string; timeoutMs?: number; maxCaptureBytes?: number; }; }; export type TauClientToolCommandExecCancel = { version: 4; type: "exec.cancel"; requestId: string; }; export type TauClientToolCommandPresentation = TauClientToolPresentation; export type TauClientToolCommandReady = { version: 4; type: "ready"; presentation?: TauClientToolCommandPresentation; }; export type TauClientToolCommandResult = { version: 4; type: "result"; ok: true; content: string; presentation?: TauClientToolCommandPresentation; } | { version: 4; type: "result"; ok: false; error: string; presentation?: TauClientToolCommandPresentation; }; export type TauClientToolCommandOutput = TauClientToolCommandReady | TauClientToolCommandExecRequest | TauClientToolCommandExecCancel | TauClientToolCommandResult; export type TauClientToolCommandInput = TauClientToolCommandPrepare | TauClientToolCommandExecute | TauClientToolCommandExecResponse; export type TauClientToolCommandExecResponse = { version: 4; type: "exec.result"; requestId: string; ok: true; result: TauSdkSessionExecResult; } | { version: 4; type: "exec.result"; requestId: string; ok: false; error: string; }; export type TauClientToolCommandHandler = (args: unknown, context: TauSdkClientToolContext) => Promise | TauSdkClientToolResult; export type TauClientToolCommandDefinition = { name: string; describe?: (args: unknown) => Promise | TauClientToolCommandPresentation | undefined; execute: TauClientToolCommandHandler; }; export type TauClientToolCommandOutputEncoder = { encode(frame: TauClientToolCommandOutput): string; }; export type TauClientToolCommandOutputDecoder = { push(chunk: Buffer | string): TauClientToolCommandOutput[]; end(): TauClientToolCommandOutput[]; }; export declare function createTauClientToolCommandOutputEncoder(): TauClientToolCommandOutputEncoder; export declare function createTauClientToolCommandOutputDecoder(): TauClientToolCommandOutputDecoder; export declare function runTauClientToolCommand(definition: TauClientToolCommandDefinition): Promise; export declare function parseTauClientToolCommandOutput(value: unknown): TauClientToolCommandOutput; export declare function parseTauClientToolCommandOutputLine(line: string): TauClientToolCommandOutput; export declare function serializeTauClientToolCommandOutput(frame: TauClientToolCommandOutput): string; export declare function createTauClientToolCommandPrepare(options: { sessionId: string; agentId: string; callId: string; toolName: string; arguments: unknown; }): TauClientToolCommandPrepare; export declare function createTauClientToolCommandExecute(): TauClientToolCommandExecute; export declare function createTauClientToolCommandExecResponse(options: { requestId: string; result: TauSdkSessionExecResult; }): TauClientToolCommandExecResponse; export declare function createTauClientToolCommandExecResponse(options: { requestId: string; error: string; }): TauClientToolCommandExecResponse;