/**
 * Protocol version. Both sides exchange this during `agent.hello`
 * handshake. If major versions differ the host MUST reject.
 */
export declare const AGENT_RPC_PROTOCOL_VERSION: "1.0.0";
export declare const AGENT_RPC_ERROR_CODES: {
    readonly PARSE_ERROR: -32700;
    readonly INVALID_REQUEST: -32600;
    readonly METHOD_NOT_FOUND: -32601;
    readonly INVALID_PARAMS: -32602;
    readonly INTERNAL_ERROR: -32603;
    readonly TURN_ABORTED: -32000;
    readonly TURN_TIMEOUT: -32001;
    readonly LLM_ERROR: -32010;
    readonly LLM_AUTH_ERROR: -32011;
    readonly LLM_RATE_LIMIT: -32012;
    readonly LLM_QUOTA_EXHAUSTED: -32013;
    readonly LLM_MODEL_NOT_FOUND: -32014;
    readonly TOOL_INVOKE_FAILED: -32020;
    readonly TOOL_TIMEOUT: -32021;
    readonly PROTOCOL_MISMATCH: -32030;
    readonly REQUEST_DEADLINE_EXCEEDED: -32040;
    readonly REQUEST_CANCELLED: -32041;
    readonly REQUEST_DEDUPED: -32042;
    readonly REQUEST_IDEMPOTENCY_REQUIRED: -32043;
};
export type AgentRpcErrorCode = (typeof AGENT_RPC_ERROR_CODES)[keyof typeof AGENT_RPC_ERROR_CODES];
export interface AgentRpcRequest {
    jsonrpc: "2.0";
    method: string;
    params?: Record<string, unknown>;
    id?: string | number;
    meta?: AgentRpcMeta;
}
export type AgentRpcChannel = "query" | "task";
export interface AgentRpcMeta {
    requestId: string;
    deadlineAt: number;
    createdAt: number;
    channel: AgentRpcChannel;
    idempotencyKey?: string;
    traceId?: string;
}
export interface AgentRpcError {
    code: AgentRpcErrorCode | number;
    message: string;
    data?: unknown;
}
export interface AgentRpcResponse {
    jsonrpc: "2.0";
    id: string | number;
    result?: unknown;
    error?: AgentRpcError;
}
export interface AgentRpcNotification {
    jsonrpc: "2.0";
    method: string;
    params: Record<string, unknown>;
}
export type AgentRpcMessage = AgentRpcRequest | AgentRpcResponse | AgentRpcNotification;
/** Sent by host to agent CLI as params of `agent.hello` request. */
export interface AgentHelloParams {
    protocolVersion: string;
    hostName: string;
    hostVersion: string;
    capabilities?: string[];
}
/** Returned by agent CLI as result of `agent.hello` request. */
export interface AgentHelloResult {
    protocolVersion: string;
    agentName: string;
    agentVersion: string;
    capabilities?: string[];
}
/**
 * Agent → Host notification: agent requests human approval before executing a tool.
 * Method name: `tool.approval.request`
 */
export interface ToolApprovalRequestParams {
    /** Unique id for this approval request (used to correlate the response). */
    approvalId: string;
    /** Tool call id from the LLM. */
    callId: string;
    /** Tool name. */
    toolName: string;
    /** Serialized arguments JSON. */
    arguments: string;
    /** Human-readable reason for requiring approval. */
    message?: string;
    /** Suggested allow/ask/deny policy updates the user can apply with the decision. */
    suggestions?: string[];
}
/** Well-known method names for the approval protocol. */
export declare const AGENT_RPC_APPROVAL_METHODS: {
    readonly REQUEST: "tool.approval.request";
};
export declare function isAgentRpcRequest(msg: unknown): msg is AgentRpcRequest;
export declare function isAgentRpcResponse(msg: unknown): msg is AgentRpcResponse;
export declare function isAgentRpcNotification(msg: unknown): msg is AgentRpcNotification;
export declare function parseAgentRpcMessage(raw: string): AgentRpcMessage | null;
