import type { ChatCompletionAssistantMessageParam } from 'openai/resources/chat/completions';
import { ChatCompletionChunk } from 'openai/resources';
import type { ChatCompletionMessage } from 'openai/resources/chat/completions';
import type { ChatCompletionMessageParam } from 'openai/resources/chat/completions';
import { ChatCompletionMessageToolCall } from 'openai/resources';
import type { ChatCompletionTool } from 'openai/resources/chat/completions';
import type { ChatCompletionToolChoiceOption } from 'openai/resources/chat/completions';
import { ChatCompletionToolMessageParam } from 'openai/resources/chat/completions';
import { ChatCompletionUserMessageParam } from 'openai/resources/chat/completions';
import { Client } from '@modelcontextprotocol/sdk/client/index.js';
import type { ElicitRequestFormParams } from '@modelcontextprotocol/sdk/types.js';
import { ElicitRequestParams } from '@modelcontextprotocol/sdk/types.js';
import type { ElicitRequestURLParams } from '@modelcontextprotocol/sdk/types.js';
import { ElicitResult } from '@modelcontextprotocol/sdk/types.js';
import { JSONRPCMessage } from '@modelcontextprotocol/sdk/types.js';
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
import { OAuthClientProvider } from '@modelcontextprotocol/sdk/client/auth.js';
import { OpenAI } from 'openai/index.mjs';
import type { ReasoningEffort } from 'openai/resources';
import { SSEClientTransport } from '@modelcontextprotocol/sdk/client/sse.js';
import { StdioClientTransport } from '@modelcontextprotocol/sdk/client/stdio.js';
import * as stream from 'stream';
import { StreamableHTTPClientTransport } from '@modelcontextprotocol/sdk/client/streamableHttp.js';
import { Transport } from '@modelcontextprotocol/sdk/shared/transport.js';
import { Writable } from 'stream';
import * as z from 'zod';
import { default as z_2 } from 'zod';
import { ZodArray } from 'zod';
import { ZodBoolean } from 'zod';
import { ZodDiscriminatedUnion } from 'zod';
import { ZodEnum } from 'zod';
import { ZodLiteral } from 'zod';
import { ZodNullable } from 'zod';
import { ZodNumber } from 'zod';
import { ZodObject } from 'zod';
import { ZodOptional } from 'zod';
import { ZodRecord } from 'zod';
import { ZodString } from 'zod';
import { ZodTypeAny } from 'zod';
import { ZodUnion } from 'zod';
import { ZodUnknown } from 'zod';

export declare type AbortEvent = z.infer<typeof AbortEventSchema>;

/**
 * Turn abort event - User aborted the current turn
 * Triggers completion of orphaned tool calls
 */
declare const AbortEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"abort">;
    data: z.ZodObject<{
        reason: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        reason: string;
    }, {
        reason: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        reason: string;
    };
    id: string;
    type: "abort";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        reason: string;
    };
    id: string;
    type: "abort";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

declare type AgentAction = (typeof AgentActions)[number];

declare const AgentActions: readonly ["fix", "fix-pr-comment", "task"];

declare type AgentContext = z_2.infer<typeof agentContextSchema>;

/**
 * Runtime contexts where an agent can be available.
 * - "cli": Interactive CLI
 * - "cca": GitHub Actions (Copilot Coding Agent)
 * - "sdk": SDK consumers
 */
declare const agentContextSchema: z_2.ZodEnum<["cli", "cca", "sdk"]>;

/**
 * Execution modes for agents.
 * - sync: Run agent synchronously and wait for completion (default)
 * - background: Run agent asynchronously in background, return agent_id immediately
 */
declare type AgentExecutionMode = "sync" | "background";

declare type AgentIdBag = {
    /**
     * The ID of the agent whose invocation generated the object this bag is attached to.
     */
    agentId?: string;
};

/**
 * A message sent to a background agent via the write_agent tool.
 */
declare interface AgentMessage {
    /** Unique message identifier */
    id: string;
    /** Agent ID of the sender, if sent by another agent */
    fromAgentId?: string;
    /** Message content */
    content: string;
    /** When the message was sent */
    timestamp: number;
}

export declare type AgentMode = z.infer<typeof AgentModeSchema>;

/** The UI mode the agent is operating in */
declare const AgentModeSchema: z.ZodEnum<["interactive", "plan", "autopilot", "shell"]>;

export declare type AgentStopHook = (input: AgentStopHookInput) => Promise<AgentStopHookOutput | void>;

/**
 * Agent stop hook types - fires when the agent naturally stops (no more tool calls)
 */
export declare interface AgentStopHookInput extends BaseHookInput {
    transcriptPath: string;
    /**
     * The reason the agent stopped. Currently only "end_turn" is supported.
     * Matches Claude Code terminology; extensible for future stop reasons.
     */
    stopReason: "end_turn";
}

export declare interface AgentStopHookOutput {
    /** If "block", the agent will continue with another turn using the reason. Undefined means "allow". */
    decision?: "block" | "allow";
    reason?: string;
}

/**
 * A background agent task (subagent running in background mode).
 */
export declare type AgentTask = {
    type: "agent";
    id: string;
    /** Tool call ID for correlating session events with this agent */
    toolCallId: string;
    description: string;
    status: BackgroundTaskStatus;
    startedAt: number;
    completedAt?: number;
    /** Accumulated milliseconds the agent has spent actively running (excludes idle time) */
    activeTimeMs?: number;
    /** Timestamp when the current active period began (undefined while idle or finished) */
    activeStartedAt?: number;
    error?: string;
    agentType: string;
    prompt: string;
    result?: string;
    modelOverride?: string;
    /** Latest response text from the agent (updated each turn) */
    latestResponse?: string;
    /** Timestamp when the agent entered idle state (undefined while running or finished) */
    idleSince?: number;
};

/** Narrowed entry type for agent tasks. */
declare type AgentTaskEntry = TaskEntryBase & AgentTaskFields;

/**
 * Fields specific to agent tasks.
 */
declare interface AgentTaskFields {
    type: "agent";
    /** The kind of agent (e.g. "explore", "task", "general-purpose") */
    agentType: string;
    /** Tool call ID for correlating session events with this agent */
    toolCallId?: string;
    /** The prompt sent to the agent */
    prompt?: string;
    /** Model override if specified */
    modelOverride?: string;
    /** How the agent was started — only background agents receive idle notifications */
    executionMode?: AgentExecutionMode;
    /** Result payload on completion */
    result?: unknown;
    /** Error message on failure */
    error?: string;
    /** Queued messages waiting to be processed (multi-turn) */
    messageQueue: AgentMessage[];
    /** Latest response text from the agent (updated each turn) */
    latestResponse?: string;
    /** Ordered history of all turn responses */
    turnHistory: AgentTurnResponse[];
}

/**
 * Progress for a background agent task, derived from session events.
 */
export declare type AgentTaskProgress = {
    type: "agent";
    /** Recent tool execution events converted to display lines */
    recentActivity: ProgressLine[];
    /** The most recent intent reported by the agent */
    latestIntent?: string;
};

/**
 * A recorded response from a single agent turn.
 */
declare interface AgentTurnResponse {
    /** 0-based turn index */
    turnIndex: number;
    /** The agent's response text for this turn */
    response: string;
    /** When this turn completed */
    timestamp: number;
    /** The inbound message that triggered this turn, if any (absent for the initial prompt turn) */
    inboundMessage?: InboundMessageInfo;
}

declare type ApiKeyAuthInfo = {
    readonly type: "api-key";
    readonly apiKey: string;
    readonly host: string;
    readonly copilotUser?: CopilotUserResponse;
};

declare type ApiMethodSchema = {
    params?: z_2.ZodTypeAny;
    result?: z_2.ZodTypeAny;
    stability?: ApiStability;
};

/** Constrains a schema to only contain methods or nested namespaces of methods. */
declare type ApiSchema = {
    [key: string]: ApiMethodSchema | ApiSchema;
};

/** Derive the required implementation shape from an API schema.
 *
 * Each leaf entry becomes a function matching its params/result.
 * Nested objects become nested namespaces.
 */
declare type ApiSchemaToInterface<S extends ApiSchema> = {
    [K in keyof S]: S[K] extends ApiMethodSchema ? InferMethod<S[K]> : S[K] extends ApiSchema ? ApiSchemaToInterface<S[K]> : never;
};

declare type ApiStability = "experimental" | "stable";

/**
 * Compile-time check: ensure the Zod PermissionRequestSchema stays in sync with the hand-written
 * PermissionRequest type. A compile error here means the two have drifted apart.
 * These are intentionally unused at runtime — they exist solely for compile-time conformance.
 */
export declare function assertPermissionRequestSchemaSync(a: z.infer<typeof PermissionRequestSchema>): PermissionRequest;

export declare function assertPermissionRequestTypeSync(a: PermissionRequest): z.infer<typeof PermissionRequestSchema>;

/**
 * An assessed command, with its identifier and whether it is read-only.
 */
declare type AssessedCommand = {
    /**
     * The command identifier, e.g. "rm" or "git push".
     */
    readonly identifier: string;
    /**
     * Whether the command is read-only (i.e. does not modify state).
     */
    readOnly: boolean;
};

export declare type AssistantIntentEvent = z.infer<typeof AssistantIntentEventSchema>;

declare const AssistantIntentEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.intent">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        intent: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        intent: string;
    }, {
        intent: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        intent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.intent";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        intent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.intent";
    timestamp: string;
    parentId: string | null;
}>;

export declare type AssistantMessageDeltaEvent = z.infer<typeof AssistantMessageDeltaEventSchema>;

/**
 * Assistant message streaming delta (ephemeral, not persisted)
 * Sent when streaming is enabled to provide incremental response chunks.
 * Clients should accumulate deltaContent to build the full response.
 */
declare const AssistantMessageDeltaEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.message_delta">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        messageId: z.ZodString;
        deltaContent: z.ZodString;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    }, {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.message_delta";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.message_delta";
    timestamp: string;
    parentId: string | null;
}>;

export declare type AssistantMessageEvent = z.infer<typeof AssistantMessageEventSchema>;

/**
 * An event that is emitted by the `Client` for each message it receives from the LLM.
 *
 * Currently does not include telemetry.
 */
declare type AssistantMessageEvent_2 = {
    kind: "message";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    message: ChatCompletionMessageParamsWithToolCalls & ReasoningMessageParam;
};

/**
 * Assistant text response (with optional tool requests)
 */
declare const AssistantMessageEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.message">;
    data: z.ZodObject<{
        messageId: z.ZodString;
        content: z.ZodString;
        toolRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
            toolCallId: z.ZodString;
            name: z.ZodString;
            arguments: z.ZodUnknown;
            type: z.ZodOptional<z.ZodEnum<["function", "custom"]>>;
            /** Human-readable display title for the tool */
            toolTitle: z.ZodOptional<z.ZodString>;
            /** Resolved intention summary describing what this specific call does */
            intentionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }>, "many">>;
        reasoningOpaque: z.ZodOptional<z.ZodString>;
        reasoningText: z.ZodOptional<z.ZodString>;
        encryptedContent: z.ZodOptional<z.ZodString>;
        /** Phase of generation for phased-output models (e.g. gpt-5.3-codex). */
        phase: z.ZodOptional<z.ZodString>;
        /** Actual output token count from the API response (completion_tokens).
         *  Used for accurate token counting instead of estimation. Optional for
         *  backwards compatibility with existing sessions that don't have this field. */
        outputTokens: z.ZodOptional<z.ZodNumber>;
        /** The CAPI interaction ID for this message */
        interactionId: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    id: string;
    type: "assistant.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    id: string;
    type: "assistant.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type AssistantReasoningDeltaEvent = z.infer<typeof AssistantReasoningDeltaEventSchema>;

/**
 * Assistant reasoning streaming delta (ephemeral, not persisted)
 * Sent when streaming is enabled to provide incremental reasoning chunks.
 * Clients should accumulate deltaContent to build the full reasoning.
 */
declare const AssistantReasoningDeltaEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.reasoning_delta">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        reasoningId: z.ZodString;
        deltaContent: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        reasoningId: string;
        deltaContent: string;
    }, {
        reasoningId: string;
        deltaContent: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.reasoning_delta";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.reasoning_delta";
    timestamp: string;
    parentId: string | null;
}>;

export declare type AssistantReasoningEvent = z.infer<typeof AssistantReasoningEventSchema>;

/**
 * Assistant reasoning content for UI timeline display.
 * The reasoning text is also persisted in the assistant.message.reasoningText field.
 */
declare const AssistantReasoningEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.reasoning">;
    data: z.ZodObject<{
        reasoningId: z.ZodString;
        content: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        content: string;
        reasoningId: string;
    }, {
        content: string;
        reasoningId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        reasoningId: string;
    };
    id: string;
    type: "assistant.reasoning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        reasoningId: string;
    };
    id: string;
    type: "assistant.reasoning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type AssistantStreamingDeltaEvent = z.infer<typeof AssistantStreamingDeltaEventSchema>;

/**
 * Streaming response size update (ephemeral, not persisted).
 * Emitted for every streaming chunk to track total bytes received.
 */
declare const AssistantStreamingDeltaEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.streaming_delta">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        totalResponseSizeBytes: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        totalResponseSizeBytes: number;
    }, {
        totalResponseSizeBytes: number;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        totalResponseSizeBytes: number;
    };
    id: string;
    ephemeral: true;
    type: "assistant.streaming_delta";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        totalResponseSizeBytes: number;
    };
    id: string;
    ephemeral: true;
    type: "assistant.streaming_delta";
    timestamp: string;
    parentId: string | null;
}>;

export declare type AssistantTurnEndEvent = z.infer<typeof AssistantTurnEndEventSchema>;

/**
 * Agent completes a turn
 */
declare const AssistantTurnEndEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.turn_end">;
    data: z.ZodObject<{
        turnId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        turnId: string;
    }, {
        turnId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        turnId: string;
    };
    id: string;
    type: "assistant.turn_end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
    };
    id: string;
    type: "assistant.turn_end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type AssistantTurnStartEvent = z.infer<typeof AssistantTurnStartEventSchema>;

/**
 * Agent starts processing a turn
 */
declare const AssistantTurnStartEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.turn_start">;
    data: z.ZodObject<{
        turnId: z.ZodString;
        /** The CAPI interaction ID for this turn */
        interactionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        turnId: string;
        interactionId?: string | undefined;
    }, {
        turnId: string;
        interactionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    id: string;
    type: "assistant.turn_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    id: string;
    type: "assistant.turn_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type AssistantUsageEvent = z.infer<typeof AssistantUsageEventSchema>;

/**
 * Assistant usage metrics (ephemeral event for UI updates)
 * Used to track model usage, tokens, costs, and durations without persisting to disk
 * Emitted in app.tsx's onModelCallSuccess callback
 */
declare const AssistantUsageEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.usage">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        model: z.ZodString;
        inputTokens: z.ZodOptional<z.ZodNumber>;
        outputTokens: z.ZodOptional<z.ZodNumber>;
        cacheReadTokens: z.ZodOptional<z.ZodNumber>;
        cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
        cost: z.ZodOptional<z.ZodNumber>;
        duration: z.ZodOptional<z.ZodNumber>;
        initiator: z.ZodOptional<z.ZodString>;
        apiCallId: z.ZodOptional<z.ZodString>;
        providerCallId: z.ZodOptional<z.ZodString>;
        parentToolCallId: z.ZodOptional<z.ZodString>;
        quotaSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            isUnlimitedEntitlement: z.ZodBoolean;
            entitlementRequests: z.ZodNumber;
            usedRequests: z.ZodNumber;
            usageAllowedWithExhaustedQuota: z.ZodBoolean;
            overage: z.ZodNumber;
            overageAllowedWithExhaustedQuota: z.ZodBoolean;
            remainingPercentage: z.ZodNumber;
            resetDate: z.ZodOptional<z.ZodDate>;
        }, "strip", z.ZodTypeAny, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }>>>;
        /** Per-request cost/usage data from CAPI (`copilot_usage` response field). */
        copilotUsage: z.ZodOptional<z.ZodObject<{
            tokenDetails: z.ZodArray<z.ZodObject<{
                batchSize: z.ZodNumber;
                costPerBatch: z.ZodNumber;
                tokenCount: z.ZodNumber;
                tokenType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }, {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }>, "many">;
            totalNanoAiu: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }, {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }>>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }, {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.usage";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.usage";
    timestamp: string;
    parentId: string | null;
}>;

export declare type Attachment = z.infer<typeof AttachmentSchema>;

declare const AttachmentSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
    type: z.ZodLiteral<"file">;
    path: z.ZodString;
    displayName: z.ZodString;
    lineRange: z.ZodOptional<z.ZodObject<{
        start: z.ZodNumber;
        end: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        end: number;
        start: number;
    }, {
        end: number;
        start: number;
    }>>;
}, "strip", z.ZodTypeAny, {
    type: "file";
    path: string;
    displayName: string;
    lineRange?: {
        end: number;
        start: number;
    } | undefined;
}, {
    type: "file";
    path: string;
    displayName: string;
    lineRange?: {
        end: number;
        start: number;
    } | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"directory">;
    path: z.ZodString;
    displayName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "directory";
    path: string;
    displayName: string;
}, {
    type: "directory";
    path: string;
    displayName: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"selection">;
    filePath: z.ZodString;
    displayName: z.ZodString;
    text: z.ZodString;
    selection: z.ZodObject<{
        start: z.ZodObject<{
            line: z.ZodNumber;
            character: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            line: number;
            character: number;
        }, {
            line: number;
            character: number;
        }>;
        end: z.ZodObject<{
            line: z.ZodNumber;
            character: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            line: number;
            character: number;
        }, {
            line: number;
            character: number;
        }>;
    }, "strip", z.ZodTypeAny, {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    }, {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    text: string;
    type: "selection";
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
    filePath: string;
}, {
    text: string;
    type: "selection";
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
    filePath: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"github_reference">;
    number: z.ZodNumber;
    title: z.ZodString;
    referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
    state: z.ZodString;
    url: z.ZodString;
}, "strip", z.ZodTypeAny, {
    number: number;
    url: string;
    type: "github_reference";
    title: string;
    referenceType: "pr" | "issue" | "discussion";
    state: string;
}, {
    number: number;
    url: string;
    type: "github_reference";
    title: string;
    referenceType: "pr" | "issue" | "discussion";
    state: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"blob">;
    data: z.ZodString;
    mimeType: z.ZodString;
    displayName: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    data: string;
    type: "blob";
    mimeType: string;
    displayName?: string | undefined;
}, {
    data: string;
    type: "blob";
    mimeType: string;
    displayName?: string | undefined;
}>]>;

export declare type AudioContent = z.infer<typeof AudioContentSchema>;

/**
 * Audio content block with base64-encoded data
 */
declare const AudioContentSchema: z.ZodObject<{
    type: z.ZodLiteral<"audio">;
    data: z.ZodString;
    mimeType: z.ZodString;
}, "strip", z.ZodTypeAny, {
    data: string;
    type: "audio";
    mimeType: string;
}, {
    data: string;
    type: "audio";
    mimeType: string;
}>;

declare type AuthCallback = (authInfo: AuthInfo | null, token?: string) => void | Promise<void>;

/**
 * Represents the authentication information for a user.
 */
declare type AuthInfo = HMACAuthInfo | EnvAuthInfo | UserAuthInfo | GhCliAuthInfo | ApiKeyAuthInfo | TokenAuthInfo | CopilotApiTokenAuthInfo;

/**
 * Authentication information along with an optional token.
 */
declare type AuthInfoWithToken = {
    authInfo: AuthInfo;
    token?: string;
};

declare class AuthManager {
    private readonly featureFlags;
    private currentAuthInfo;
    private loadingAuthInfo?;
    private authCallbacks;
    private config;
    constructor(featureFlags?: FeatureFlags, config?: AuthManagerConfig);
    /**
     * Register a callback to be called when authentication state changes
     * If there is existing auth info, the callback is called immediately
     * @param callback Function to call with auth info and token when auth state changes
     */
    onAuthChange(callback: AuthCallback): void;
    /**
     * Remove an authentication change callback
     * @param callback The callback to remove
     */
    removeAuthCallback(callback: AuthCallback): void;
    /**
     * Notify all registered callbacks of auth state change
     * @param authInfo Current auth info (null for logout)
     * @param token Optional token
     */
    private notifyAuthChange;
    /**
     * Attempts to use SDK-provided token from specified environment variable.
     * This is the highest priority auth method when authTokenEnvVar is configured.
     * @returns Auth info + token if the env var is set and contains a valid token.
     */
    private trySdkTokenLogin;
    /**
     * Attempts to use HMAC authentication.
     * @returns Auth info if authentication was successful, undefined otherwise.
     */
    private tryHMACLogin;
    /**
     * Attempts to use GITHUB_ASKPASS to retrieve the GitHub token.
     * @returns Token if available from GITHUB_ASKPASS, undefined otherwise.
     */
    private getGitHubAskpassToken;
    /**
     * Attempts to use COPILOT_GITHUB_TOKEN/GH_TOKEN/GITHUB_TOKEN env vars for authentication.
     * @returns Auth info + token if authentication was successful, undefined otherwise.
     */
    private tryGitHubTokenLogin;
    /** Attempts to use GitHub CLI for authentication. */
    private tryGhCliTokenLogin;
    /** Attempts to use GITHUB_COPILOT_API_TOKEN for authentication when COPILOT_API_URL is also set. */
    private tryCopilotApiTokenLogin;
    private tryApiKeyLogin;
    /** Attempts to use CLI OAuth token for authentication. */
    private tryLoginToken;
    /** Attempts to use CLI OAuth token for authentication. */
    private getAllGitHubLoginTokens;
    /**
     * Returns all the auth options available right now, sorted by priority.
     * @returns List of all available auth options, along with the token if available.
     */
    getAllAuthAvailable(): Promise<AuthInfoWithToken[]>;
    private getPrioritizedAuthMethods;
    private loadAuthInfo;
    /**
     * Returns the current auth info. Loads it lazily if not available.
     * @returns Current auth info.
     */
    getCurrentAuthInfo(): Promise<AuthInfo | null>;
    /**
     * Updates the current auth info with the provided user information.
     * @param host User's host
     * @param login User's login
     */
    loginUser(host: string, login: string, token: string): Promise<AuthInfo>;
    /**
     * Switches to the specified authentication info.
     * @param auth The authentication method to switch to.
     */
    switchToAuth(auth: AuthInfoWithToken): Promise<void>;
    /**
     * Clears the current credentials.
     * @returns True if, after logging out a user, there are more users logged in.
     *          False otherwise.
     */
    logout(): Promise<boolean>;
}

/**
 * Configuration options for AuthManager.
 */
declare interface AuthManagerConfig {
    /**
     * If set, read auth token from this specific environment variable.
     * This takes highest priority and bypasses normal auth method precedence.
     */
    authTokenEnvVar?: string;
    /**
     * If true, disable automatic login detection (stored OAuth tokens and gh CLI).
     */
    disableAutoLogin?: boolean;
}

/**
 * Minimal interface for subscribing to authentication state changes.
 * Satisfied by AuthManager — avoids coupling consumers to the full class.
 */
declare interface AuthSubscriber {
    onAuthChange(callback: AuthCallback): void;
    removeAuthCallback(callback: AuthCallback): void;
}

/**
 * Unified type for background tasks, discriminated by `type` field.
 */
export declare type BackgroundTask = ShellTask | AgentTask;

/**
 * Discriminated union of progress information for background tasks.
 */
export declare type BackgroundTaskProgress = AgentTaskProgress | ShellTaskProgress;

/**
 * Status of a background task (agent or shell).
 */
export declare type BackgroundTaskStatus = "running" | "idle" | "completed" | "failed" | "cancelled" | "killed";

/**
 * Base interface for all hook inputs
 */
export declare interface BaseHookInput {
    sessionId: string;
    timestamp: number;
    cwd: string;
}

export declare abstract class BaseLogger implements RunnerLogger {
    protected logLevel?: LogLevel;
    protected debugEnvironmentVariables?: string[];
    private secretFilter;
    constructor(logLevel?: LogLevel, debugEnvironmentVariables?: string[]);
    filterSecrets(messageOrError: string | Error): string | Error;
    /**
     * Returns true if the log level is not set, or the log level is set and the level is enabled.
     */
    shouldLog(level: LogLevel): boolean;
    isDebug(): boolean;
    abstract log(message: string): void;
    abstract info(message: string): void;
    abstract debug(message: string): void;
    abstract notice(message: string | Error): void;
    abstract warning(message: string | Error): void;
    abstract error(message: string | Error): void;
    abstract startGroup(name: string, level?: LogLevel): void;
    abstract endGroup(level?: LogLevel): void;
}

declare type BasicToolConfig = {
    serverName: string;
    name: string;
    namespacedName: string;
    mcpServerName?: string;
    mcpToolName?: string;
    title: string;
    description: string;
    input_schema: ToolInputSchema;
    readOnly?: boolean;
    safeForTelemetry?: Tool_2["safeForTelemetry"] & Tool["safeForTelemetry"];
    filterMode?: ContentFilterMode;
    disableSecretMasking?: boolean;
};

declare type BinaryResult = {
    data: string;
    mimeType: string;
    type: string;
    /**
     * A description of the binary data.
     */
    description?: string;
};

export declare type BlobAttachment = z.infer<typeof BlobAttachmentSchema>;

declare const BlobAttachmentSchema: z.ZodObject<{
    type: z.ZodLiteral<"blob">;
    data: z.ZodString;
    mimeType: z.ZodString;
    displayName: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    data: string;
    type: "blob";
    mimeType: string;
    displayName?: string | undefined;
}, {
    data: string;
    type: "blob";
    mimeType: string;
    displayName?: string | undefined;
}>;

/**
 * Typed context for CAPI-specific request headers.
 * Set at client creation time; mapped to HTTP headers in {@link CopilotOpenAIClient.prepareOptions}.
 */
declare type CAPIRequestContext = {
    /** The type of interaction — agent, subagent, background, or user-initiated. */
    interactionType: InteractionType;
    /** A unique GUID for this agent instance, sent as X-Agent-Task-Id. */
    agentTaskId: string;
    /** The parent agent's task ID, sent as X-Parent-Agent-Id. Only set for subagents. */
    parentAgentTaskId?: string;
    /** The client session ID, sent as X-Client-Session-Id. */
    clientSessionId?: string;
    /** Per-message interaction ID, sent as X-Interaction-Id. Overrides the default session-level value. */
    interactionId?: string;
    /** The client machine ID, sent as X-Client-Machine-Id. */
    clientMachineId?: string;
};

declare type ChatCompletionMessageParamsWithToolCalls = Omit<ChatCompletionAssistantMessageParam, "tool_calls"> & {
    tool_calls?: CopilotChatCompletionMessageToolCall[];
    copilot_annotations?: unknown;
    /** Phase of generation for phased-output models (e.g. gpt-5.3-codex). */
    phase?: string;
};

/**
 * Information about a checkpoint for display in the prompt.
 */
declare interface CheckpointInfo {
    /** Checkpoint number (1-indexed) */
    number: number;
    /** Title of the checkpoint */
    title: string;
    /** Filename of the checkpoint (e.g., "001-plan-design.md") */
    filename: string;
}

export declare const CLI_CLIENT_NAME = "github/cli";

declare interface Client_2 {
    readonly model: string;
    getCompletionWithTools(systemMessage: string, initialMessages: ChatCompletionMessageParam[], tools: Tool_2[], options?: GetCompletionWithToolsOptions): AsyncGenerator<Event_2>;
}

declare interface ClientFactory {
    createClient(options: any, capabilities: any): Client;
}

/**
 * Client information for telemetry events, matching Hydro's ClientInfo entity.
 */
declare interface ClientInfo {
    cli_version: string;
    os_platform: string;
    os_version: string;
    os_arch: string;
    node_version: string;
    copilot_plan?: string;
    /** Type of client (e.g., "cli-interactive", "cli-prompt", "sdk") */
    client_type?: string;
    /** Name of the client application (e.g., "copilot-cli", "autopilot", "sdk") */
    client_name?: string;
    /** Whether the user is a GitHub/Msft staff member */
    is_staff?: boolean;
    /** Stable machine identifier from @vscode/deviceid */
    dev_device_id?: string;
}

/**
 * Connection information for an MCP client.
 */
declare type ClientInfo_2 = {
    /**
     * Name of the MCP server this connection is for.
     */
    clientName: string;
    /**
     * Optional original/display name for this server.
     * This may contain "/" when the internal `clientName` has been adapted (e.g. "/" -> "__").
     */
    displayName?: string;
    /**
     * MCP client instance connected to the server.
     */
    mcpClient: Client;
    /**
     * Telemetry configuration for this connection.
     */
    safeForTelemetry?: Tool_2["safeForTelemetry"];
    /**
     * List of tools from the server to expose. ["*"] means all tools.
     */
    tools: string[];
    /**
     * Filter mode for the tools from this client.
     * If not specified, defaults to ContentFilterMode.HiddenCharacters.
     * If specified as a map, it applies to each tool by name.
     */
    filterMapping?: Record<string, ContentFilterMode> | ContentFilterMode;
    /**
     * Optional timeout in milliseconds for tool calls to this server.
     * If not specified, uses the default timeout.
     */
    timeout?: number;
    /**
     * Optional promise that resolves when the connection is established.
     * Used for deferred connections where the client is created immediately but
     * the connection is established in the background.
     */
    pendingConnection?: Promise<void>;
    /**
     * Whether this is the default Playwright server configured by the system,
     * as opposed to a user-provided Playwright server.
     */
    isDefaultServer?: boolean;
    /**
     * When true, secret masking is disabled for tool calls to this server.
     */
    disableSecretMasking?: boolean;
};

/**
 * The ideal set of options that a `{@link Client}` expose.
 */
declare type ClientOptions = {
    /**
     * The model to use for LLM completions.
     */
    model?: string;
    /**
     * The proportion of the model's input/prompt token limit
     * that should be given to tools as their token budget.
     */
    toolTokenBudgetProportion?: number;
    retryPolicy?: ClientRetryPolicy;
    /**
     * If for the current model, a higher level of thinking is possible, use it.
     * @default false
     */
    thinkingMode?: boolean;
    /**
     * The token budget for extended thinking/chain-of-thought for models that support it.
     * For Anthropic Claude models via CAPI, this maps to the `thinking_budget` parameter.
     * When set, enables extended thinking with the specified token budget.
     * This field remains optional even in ClientOptionsRequired since not all models support it.
     */
    thinkingBudget?: number | undefined;
    requestHeaders?: Record<string, string>;
    /**
     * Typed context for CAPI-specific request headers (interaction type, agent task IDs).
     * When set, these are mapped to HTTP headers by the CAPI client.
     */
    capiRequestContext?: CAPIRequestContext;
    /**
     * If true, enables cache control checkpoints on messages sent to the model.
     * This allows downstream services to better manage caching of responses.
     * Defaults to false.
     */
    enableCacheControl?: boolean;
    /**
     * The default reasoning effort level for the model to use, if supported by the client.
     */
    defaultReasoningEffort?: ReasoningEffort;
    /**
     * The maximum number of output tokens for completions. When set, this value is sent
     * as `max_tokens` in the API request to cap the response length.
     */
    maxOutputTokens?: number;
    /**
     * Model family override for the agent. When set, uses the specified model family's
     * default configuration instead of looking up config by model name.
     */
    modelFamily?: string;
};

/**
 * Retry policies for the AI client.
 */
declare type ClientRetryPolicy = {
    /**
     * The maximum number of retries for **any** type of retryable failure or error.
     */
    maxRetries?: number;
    /**
     * Specific error codes that should always be retried.
     * - If a `number`, that specific error code will be retried.
     * - If a `[number, number]`, all error codes in the range will be retried (inclusive).
     * - If a `[number, undefined]`, all error codes greater than or equal to the first number will be retried.
     * - To retry all error codes based on an upper bound, simply use `[0, number]`.
     *
     * Some error codes are retried by default even if not specified here, for example 429 (rate limit exceeded).
     */
    errorCodesToRetry?: (number | [number, number | undefined])[];
    /**
     * How to handle retries for rate limiting (429) errors. If a policy is not provided, a default
     * policy will be used.
     */
    rateLimitRetryPolicy?: {
        /**
         * The default wait time in between retries if the server does not
         * provide a `retry-after` header.
         */
        defaultRetryAfterSeconds?: number;
        /**
         * The initial extra wait time in between retries. The extra wait time will
         * be added to the `retry-after` header value (or {@link defaultRetryAfterSeconds} if
         * the header is not present). After each retry, the extra wait time will grow beyond
         * this value according to the {@link retryBackoffExtraGrowth} factor.
         */
        initialRetryBackoffExtraSeconds?: number;
        /**
         * The growth factor for the retry backoff extra time. E.g. 2x, 3x, etc.
         */
        retryBackoffExtraGrowth?: number;
        /**
         * The maximum wait time in between retries.
         */
        maxRetryAfterSeconds?: number;
    };
};

/** Diagnostic stats exposed by {@link CoalescingWriteQueue.stats}. */
declare interface CoalescingWriteQueueStats {
    writeCount: number;
    pendingLength: number;
    drainScheduled: boolean;
}

/**
 * Code change metrics tracked during a session
 */
export declare interface CodeChangeMetrics {
    linesAdded: number;
    linesRemoved: number;
    filesModified: Set<string>;
}

declare type Command = {
    readonly identifier: string;
    readonly readOnly: boolean;
};

export declare type CommandCompletedEvent = z.infer<typeof CommandCompletedEventSchema>;

/**
 * Emitted when a pending queued command has been resolved by a client.
 */
declare const CommandCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"command.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "command.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "command.completed";
    timestamp: string;
    parentId: string | null;
}>;

export declare type CommandQueuedEvent = z.infer<typeof CommandQueuedEventSchema>;

/**
 * Emitted when a queued slash command needs to be executed by a client.
 * The client should respond via session.respondToQueuedCommand(requestId, result).
 */
declare const CommandQueuedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"command.queued">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        command: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        command: string;
    }, {
        requestId: string;
        command: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        command: string;
    };
    id: string;
    ephemeral: true;
    type: "command.queued";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        command: string;
    };
    id: string;
    ephemeral: true;
    type: "command.queued";
    timestamp: string;
    parentId: string | null;
}>;

declare type CompactionCompletedEvent = {
    kind: "compaction_completed";
    turn: number;
    performedBy: string;
    success: boolean;
    error?: string;
    compactionResult?: CompactionEventResult;
};

declare type CompactionEvent = CompactionStartedEvent | CompactionCompletedEvent;

declare type CompactionEventResult = {
    tokenLimit: number;
    preCompactionTokens: number;
    preCompactionMessagesLength: number;
    postCompactionTokens?: number;
    postCompactionMessagesLength?: number;
    tokensRemoved?: number;
    messagesRemoved?: number;
    summaryContent: string;
    checkpointNumber?: number;
    compactionTokensUsed?: {
        input: number;
        output: number;
        cachedInput: number;
    };
};

/**
 * Result of a conversation history compaction operation.
 */
export declare interface CompactionResult {
    success: boolean;
    tokensRemoved: number;
    messagesRemoved: number;
    summaryContent: string;
}

declare type CompactionStartedEvent = {
    kind: "compaction_started";
    turn: number;
    performedBy: string;
    /** Token count from system message(s) at compaction start */
    systemTokens?: number;
    /** Token count from non-system messages (user, assistant, tool) at compaction start */
    conversationTokens?: number;
    /** Token count from tool definitions at compaction start */
    toolDefinitionsTokens?: number;
};

export declare function completeOrphanedToolCalls(messages: ChatCompletionMessageParam[]): ChatCompletionMessageParam[];

declare type CompletionWithToolsModel = {
    readonly name: string;
    readonly id?: string;
    readonly capabilities?: {
        readonly supports?: {
            readonly vision?: boolean;
        };
        readonly limits?: {
            readonly max_prompt_tokens?: number;
            readonly max_output_tokens?: number;
            readonly max_context_window_tokens?: number;
            readonly vision?: {
                readonly supported_media_types: string[];
                readonly max_prompt_images: number;
                readonly max_prompt_image_size: number;
            };
        };
    };
};

export declare class CompoundLogger implements RunnerLogger {
    readonly loggers: RunnerLogger[];
    constructor(loggers: RunnerLogger[]);
    isDebug(): boolean;
    debug(message: string): void;
    log(message: string): void;
    info(message: string): void;
    notice(message: string | Error): void;
    warning(message: string | Error): void;
    error(message: string | Error): void;
    startGroup(name: string, level?: LogLevel): void;
    endGroup(level?: LogLevel): void;
}

/**
 * ConfigEntry represents a single configuration entry in the ExP API response.
 */
declare interface ConfigEntry {
    Id: string;
    Parameters: Record<string, ExpFlagValue>;
}

export declare class ConsoleLogger extends BaseLogger implements RunnerLogger {
    constructor(logLevel?: LogLevel, debugEnvironmentVariables?: string[]);
    log(message: string): void;
    debug(message: string): void;
    info(message: string): void;
    notice(message: string | Error): void;
    warning(message: string | Error): void;
    error(message: string | Error): void;
    startGroup(name: string, level?: LogLevel): void;
    endGroup(level?: LogLevel): void;
}

export declare type ContentBlock = z.infer<typeof ContentBlockSchema>;

/**
 * Content block union type
 */
declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
    type: z.ZodLiteral<"text">;
    text: z.ZodString;
}, "strip", z.ZodTypeAny, {
    text: string;
    type: "text";
}, {
    text: string;
    type: "text";
}>, z.ZodObject<{
    type: z.ZodLiteral<"terminal">;
    text: z.ZodString;
    exitCode: z.ZodOptional<z.ZodNumber>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    text: string;
    type: "terminal";
    exitCode?: number | undefined;
    cwd?: string | undefined;
}, {
    text: string;
    type: "terminal";
    exitCode?: number | undefined;
    cwd?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"image">;
    data: z.ZodString;
    mimeType: z.ZodString;
}, "strip", z.ZodTypeAny, {
    data: string;
    type: "image";
    mimeType: string;
}, {
    data: string;
    type: "image";
    mimeType: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"audio">;
    data: z.ZodString;
    mimeType: z.ZodString;
}, "strip", z.ZodTypeAny, {
    data: string;
    type: "audio";
    mimeType: string;
}, {
    data: string;
    type: "audio";
    mimeType: string;
}>, z.ZodObject<{
    icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        src: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        sizes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
    }, "strip", z.ZodTypeAny, {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }, {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }>, "many">>;
    name: z.ZodString;
    title: z.ZodOptional<z.ZodString>;
    uri: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    mimeType: z.ZodOptional<z.ZodString>;
    size: z.ZodOptional<z.ZodNumber>;
} & {
    type: z.ZodLiteral<"resource_link">;
}, "strip", z.ZodTypeAny, {
    name: string;
    type: "resource_link";
    uri: string;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }[] | undefined;
    size?: number | undefined;
}, {
    name: string;
    type: "resource_link";
    uri: string;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }[] | undefined;
    size?: number | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"resource">;
    resource: z.ZodUnion<[z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }>, z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        blob: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }>]>;
}, "strip", z.ZodTypeAny, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}>]>;

/**
 * Response from the content exclusion API for a single repository.
 */
declare type ContentExclusionApiResponse = z_2.infer<typeof contentExclusionApiResponseSchema>;

/**
 * Zod schema for a single entry in the content exclusion API response array.
 */
declare const contentExclusionApiResponseSchema: z_2.ZodObject<{
    rules: z_2.ZodArray<z_2.ZodObject<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, z_2.ZodTypeAny, "passthrough">>, "many">;
    last_updated_at: z_2.ZodUnion<[z_2.ZodString, z_2.ZodNumber]>;
    scope: z_2.ZodEnum<["repo", "all"]>;
}, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
    rules: z_2.ZodArray<z_2.ZodObject<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, z_2.ZodTypeAny, "passthrough">>, "many">;
    last_updated_at: z_2.ZodUnion<[z_2.ZodString, z_2.ZodNumber]>;
    scope: z_2.ZodEnum<["repo", "all"]>;
}, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
    rules: z_2.ZodArray<z_2.ZodObject<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            type: string;
        }, {
            name: string;
            type: string;
        }>;
    }, z_2.ZodTypeAny, "passthrough">>, "many">;
    last_updated_at: z_2.ZodUnion<[z_2.ZodString, z_2.ZodNumber]>;
    scope: z_2.ZodEnum<["repo", "all"]>;
}, z_2.ZodTypeAny, "passthrough">>;

/**
 * Service for checking content exclusion rules.
 *
 * This service fetches exclusion rules from the GitHub API and caches them.
 * It provides methods to check if files should be excluded based on:
 * - Path patterns (glob matching)
 * - Content patterns (regex matching via ifAnyMatch/ifNoneMatch)
 *
 * Usage:
 * 1. Create an instance with auth info
 * 2. Call startFetching() at session start (non-blocking)
 * 3. Call isExcluded() when checking files (blocks until fetch complete if needed)
 */
declare class ContentExclusionService {
    private readonly host;
    private readonly token;
    private readonly featureEnabled;
    /** Promise for the initial fetch, awaited on first access */
    private fetchPromise;
    /** Whether the initial fetch failed (used to block access when copilotignore is enabled) */
    private fetchFailed;
    /** Directories passed to startFetching, used for cache refresh */
    private fetchDirectories;
    /** Cached rules per repository (keyed by normalized remote URL) */
    private rulesCache;
    /** Cache mapping absolute file paths to their git repo root (caches the promise to deduplicate parallel calls) */
    private gitRootCache;
    /** Cache mapping git repo roots to their normalized remote URLs (caches the promise to deduplicate parallel calls) */
    private repoUrlCache;
    /** Optional callback for emitting telemetry events */
    private readonly onTelemetry?;
    /** Additional policy entries provided via CLI option */
    private readonly additionalPolicies;
    constructor(host: string, token: string | undefined, featureEnabled: boolean, onTelemetry?: (event: TelemetryEvent) => void, additionalPolicies?: ContentExclusionApiResponse[]);
    /**
     * Starts fetching exclusion rules for repositories in the given directories.
     * This method is non-blocking - it kicks off the fetch but doesn't wait.
     *
     * @param directories Directories to scan for git repositories
     */
    startFetching(directories: string[]): void;
    /**
     * Returns whether any content exclusion rules are active.
     * Awaits the initial fetch if still in progress.
     */
    hasRules(): Promise<boolean>;
    /**
     * Checks if a file is excluded by content exclusion rules.
     *
     * This method will block on the initial fetch if it hasn't completed yet.
     *
     * @param absolutePath Absolute path to the file
     * @returns Exclusion check result with excluded status and reason
     */
    isExcluded(absolutePath: string): Promise<ExclusionCheckResult>;
    /**
     * Checks if any files in a list are excluded.
     * Useful for shell command checking via possiblePaths.
     *
     * @param absolutePaths Array of absolute file paths
     * @returns First excluded path and its result, or null if none excluded
     */
    findFirstExcluded(absolutePaths: string[]): Promise<{
        path: string;
        result: ExclusionCheckResult;
    } | null>;
    /**
     * Gets the formatted error message for an excluded file.
     */
    getExclusionMessage(filePath: string): string;
    /**
     * Fetches rules for all git repositories (including submodules) found in the given directories.
     */
    private fetchRulesForDirectories;
    private emitRulesFetchedTelemetry;
    /**
     * Fetches wildcard rules that apply to files outside git repositories.
     */
    private fetchWildcardRules;
    private mergeAdditionalPolicies;
    /**
     * Gets normalized remote URLs for a directory's git repository.
     */
    private getRepoUrlsForDirectory;
    /**
     * Discovers submodule remote URLs for all git roots found in the given directories.
     * The content exclusion API requires submodule URLs to be supplied explicitly.
     */
    private discoverSubmoduleUrls;
    /**
     * Caches rules from an API response.
     */
    private cacheRules;
    /**
     * Checks if the cache for a key is still valid.
     */
    private isCacheValid;
    /**
     * Gets the git root for a file path, using cache.
     */
    private getGitRootForPath;
    /**
     * Core exclusion check logic.
     */
    private checkExclusion;
    /**
     * Checks content-based exclusion rules (ifAnyMatch/ifNoneMatch).
     * Returns true if the file should be excluded based on content.
     */
    private checkContentRules;
    /**
     * Refreshes the cache if TTL has expired.
     * Called automatically during exclusion checks for long-running sessions.
     */
    private refreshIfNeeded;
}

declare enum ContentFilterMode {
    None = "none",
    Markdown = "markdown",
    HiddenCharacters = "hidden_characters"
}

/** Represents direct Copilot API authentication (via GITHUB_COPILOT_API_TOKEN + COPILOT_API_URL). */
declare type CopilotApiTokenAuthInfo = {
    readonly type: "copilot-api-token";
    readonly host: "https://github.com";
    readonly copilotUser?: CopilotUserResponse;
};

/**
 * Note: agent sessions API depend on this type!
 */
declare type CopilotChatCompletionChunk = Omit<ChatCompletionChunk, "choices"> & {
    choices: CopilotChatCompletionChunkChoices;
    copilot_usage?: CopilotUsage;
};

declare type CopilotChatCompletionChunkChoice = Omit<ChatCompletionChunk.Choice, "delta"> & {
    delta: CopilotChatCompletionChunkDelta;
};

declare type CopilotChatCompletionChunkChoices = Array<CopilotChatCompletionChunkChoice>;

declare type CopilotChatCompletionChunkDelta = Omit<ChatCompletionChunk.Choice.Delta, "tool_calls"> & ReasoningMessageParam & {
    tool_calls?: Array<CopilotChatCompletionToolCallDelta>;
    copilot_annotations?: string | undefined;
    /** Phase of generation for phased-output models (e.g. gpt-5.3-codex). */
    phase?: string;
};

/**
 * Re-export the OpenAI union type for convenience.
 * ChatCompletionMessageToolCall = ChatCompletionMessageFunctionToolCall | ChatCompletionMessageCustomToolCall
 */
declare type CopilotChatCompletionMessageToolCall = ChatCompletionMessageToolCall & {
    index?: number;
};

/**
 * Streaming tool call delta that supports both function and custom tool calls.
 */
declare type CopilotChatCompletionToolCallDelta = FunctionToolCallDelta | CustomToolCallDelta;

/**
 * CopilotExpAssignmentResponse represents the response structure from the ExP API for feature assignments.
 */
declare interface CopilotExpAssignmentResponse {
    Features: string[];
    Flights: Record<string, string>;
    Configs: ConfigEntry[];
    ParameterGroups: unknown;
    FlightingVersion: number;
    ImpressionId: string;
    AssignmentContext: string;
}

declare interface CopilotSessionsClient {
    sessionId(): string;
    error(error: Error): Promise<void>;
    log(logs: SessionLogsContent): Promise<void>;
    logNonCompletionContent(content: string): Promise<void>;
    createOrUpdateMCPStartupToolCall(params: {
        content?: string;
        serverName: string;
        toolNamesToDisplayNames?: Record<string, string>;
    }): Promise<void>;
    createOrUpdateCloneToolCall(params: {
        content?: string;
        repo: string;
    }): Promise<void>;
    logTitleAndBody(title: string, body: string, agentId?: string): Promise<void>;
    getLogs(sessionId: string): Promise<SessionLogsContents | string | undefined>;
}

/** Per-request cost/usage data returned by CAPI as a peer of `usage`. */
declare interface CopilotUsage {
    token_details: CopilotUsageTokenDetail[];
    total_nano_aiu: number;
}

/** A single token-type cost entry returned by CAPI in `copilot_usage.token_details`. */
declare interface CopilotUsageTokenDetail {
    batch_size: number;
    cost_per_batch: number;
    token_count: number;
    token_type: string;
}

declare type CopilotUserResponse = z.infer<typeof copilotUserResponseSchema>;

declare const copilotUserResponseSchema: z.ZodObject<{
    login: z.ZodOptional<z.ZodString>;
    access_type_sku: z.ZodOptional<z.ZodString>;
    analytics_tracking_id: z.ZodOptional<z.ZodString>;
    assigned_date: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    can_signup_for_limited: z.ZodOptional<z.ZodBoolean>;
    chat_enabled: z.ZodOptional<z.ZodBoolean>;
    copilot_plan: z.ZodOptional<z.ZodString>;
    copilotignore_enabled: z.ZodOptional<z.ZodBoolean>;
    endpoints: z.ZodOptional<z.ZodObject<{
        api: z.ZodOptional<z.ZodString>;
        "origin-tracker": z.ZodOptional<z.ZodString>;
        proxy: z.ZodOptional<z.ZodString>;
        telemetry: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        api?: string | undefined;
        telemetry?: string | undefined;
        proxy?: string | undefined;
        "origin-tracker"?: string | undefined;
    }, {
        api?: string | undefined;
        telemetry?: string | undefined;
        proxy?: string | undefined;
        "origin-tracker"?: string | undefined;
    }>>;
    organization_login_list: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    organization_list: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodObject<{
        login: z.ZodNullable<z.ZodOptional<z.ZodString>>;
        name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        name?: string | null | undefined;
        login?: string | null | undefined;
    }, {
        name?: string | null | undefined;
        login?: string | null | undefined;
    }>>, "many">>>;
    codex_agent_enabled: z.ZodOptional<z.ZodBoolean>;
    is_mcp_enabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
    quota_reset_date: z.ZodOptional<z.ZodString>;
    quota_snapshots: z.ZodOptional<z.ZodObject<{
        chat: z.ZodOptional<z.ZodObject<{
            entitlement: z.ZodOptional<z.ZodNumber>;
            overage_count: z.ZodOptional<z.ZodNumber>;
            overage_permitted: z.ZodOptional<z.ZodBoolean>;
            percent_remaining: z.ZodOptional<z.ZodNumber>;
            quota_id: z.ZodOptional<z.ZodString>;
            quota_remaining: z.ZodOptional<z.ZodNumber>;
            remaining: z.ZodOptional<z.ZodNumber>;
            unlimited: z.ZodOptional<z.ZodBoolean>;
            timestamp_utc: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        }, {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        }>>;
        completions: z.ZodOptional<z.ZodObject<{
            entitlement: z.ZodOptional<z.ZodNumber>;
            overage_count: z.ZodOptional<z.ZodNumber>;
            overage_permitted: z.ZodOptional<z.ZodBoolean>;
            percent_remaining: z.ZodOptional<z.ZodNumber>;
            quota_id: z.ZodOptional<z.ZodString>;
            quota_remaining: z.ZodOptional<z.ZodNumber>;
            remaining: z.ZodOptional<z.ZodNumber>;
            unlimited: z.ZodOptional<z.ZodBoolean>;
            timestamp_utc: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        }, {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        }>>;
        premium_interactions: z.ZodOptional<z.ZodObject<{
            entitlement: z.ZodOptional<z.ZodNumber>;
            overage_count: z.ZodOptional<z.ZodNumber>;
            overage_permitted: z.ZodOptional<z.ZodBoolean>;
            percent_remaining: z.ZodOptional<z.ZodNumber>;
            quota_id: z.ZodOptional<z.ZodString>;
            quota_remaining: z.ZodOptional<z.ZodNumber>;
            remaining: z.ZodOptional<z.ZodNumber>;
            unlimited: z.ZodOptional<z.ZodBoolean>;
            timestamp_utc: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        }, {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        completions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        chat?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        premium_interactions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
    }, {
        completions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        chat?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        premium_interactions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
    }>>;
    restricted_telemetry: z.ZodOptional<z.ZodBoolean>;
    quota_reset_date_utc: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    login?: string | undefined;
    access_type_sku?: string | undefined;
    analytics_tracking_id?: string | undefined;
    assigned_date?: string | null | undefined;
    can_signup_for_limited?: boolean | undefined;
    chat_enabled?: boolean | undefined;
    copilot_plan?: string | undefined;
    copilotignore_enabled?: boolean | undefined;
    endpoints?: {
        api?: string | undefined;
        telemetry?: string | undefined;
        proxy?: string | undefined;
        "origin-tracker"?: string | undefined;
    } | undefined;
    organization_login_list?: string[] | undefined;
    organization_list?: ({
        name?: string | null | undefined;
        login?: string | null | undefined;
    } | null)[] | null | undefined;
    codex_agent_enabled?: boolean | undefined;
    is_mcp_enabled?: boolean | null | undefined;
    quota_reset_date?: string | undefined;
    quota_snapshots?: {
        completions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        chat?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        premium_interactions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
    } | undefined;
    restricted_telemetry?: boolean | undefined;
    quota_reset_date_utc?: string | undefined;
}, {
    login?: string | undefined;
    access_type_sku?: string | undefined;
    analytics_tracking_id?: string | undefined;
    assigned_date?: string | null | undefined;
    can_signup_for_limited?: boolean | undefined;
    chat_enabled?: boolean | undefined;
    copilot_plan?: string | undefined;
    copilotignore_enabled?: boolean | undefined;
    endpoints?: {
        api?: string | undefined;
        telemetry?: string | undefined;
        proxy?: string | undefined;
        "origin-tracker"?: string | undefined;
    } | undefined;
    organization_login_list?: string[] | undefined;
    organization_list?: ({
        name?: string | null | undefined;
        login?: string | null | undefined;
    } | null)[] | null | undefined;
    codex_agent_enabled?: boolean | undefined;
    is_mcp_enabled?: boolean | null | undefined;
    quota_reset_date?: string | undefined;
    quota_snapshots?: {
        completions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        chat?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
        premium_interactions?: {
            entitlement?: number | undefined;
            overage_count?: number | undefined;
            overage_permitted?: boolean | undefined;
            percent_remaining?: number | undefined;
            quota_id?: string | undefined;
            quota_remaining?: number | undefined;
            remaining?: number | undefined;
            unlimited?: boolean | undefined;
            timestamp_utc?: string | undefined;
        } | undefined;
    } | undefined;
    restricted_telemetry?: boolean | undefined;
    quota_reset_date_utc?: string | undefined;
}>;

/**
 * Counts the total number of hooks in a QueryHooks object.
 */
export declare function countHooks(hooks: QueryHooks | undefined): number;

/**
 * Create an empty metrics object.
 */
export declare function createEmptyMetrics(sessionStartTime?: number): UsageMetrics;

/**
 * Type for a custom tool call delta (streaming).
 */
declare type CustomToolCallDelta = {
    index: number;
    id?: string;
    type?: "custom";
    custom?: {
        name?: string;
        input?: string;
    };
};

/**
 * Format specification for custom tools that use grammar-based input.
 */
declare type CustomToolInputFormat = {
    /**
     * The type of format. Currently only "grammar" is supported.
     */
    type: "grammar";
    /**
     * The syntax of the grammar (e.g., "lark").
     */
    syntax: string;
    /**
     * The grammar definition.
     */
    definition: string;
};

/**
 * A permission request for invoking an SDK-registered custom tool.
 */
declare type CustomToolPermissionRequest = {
    readonly kind: "custom-tool";
    /** The name of the custom tool being invoked */
    readonly toolName: string;
    /** The description of the custom tool */
    readonly toolDescription: string;
    readonly args?: unknown;
};

declare type DeepPartial<T> = {
    [P in keyof T]?: T[P] extends (infer U)[] ? U[] : T[P] extends object ? DeepPartial<T[P]> : T[P];
};

export declare const DEFAULT_INTEGRATION_ID = "copilot-developer-cli";

declare type DefaultConfig = z.infer<typeof DefaultConfigSchema>;

declare const DefaultConfigSchema: z.ZodObject<{
    alt_screen: z.ZodOptional<z.ZodBoolean>;
    mouse: z.ZodOptional<z.ZodBoolean>;
    ask_user: z.ZodOptional<z.ZodBoolean>;
    auto_update: z.ZodOptional<z.ZodBoolean>;
    bash_env: z.ZodOptional<z.ZodBoolean>;
    powershell_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    update_channel: z.ZodOptional<z.ZodEnum<["stable", "prerelease"]>>;
    banner: z.ZodOptional<z.ZodEnum<["always", "once", "never"]>>;
    beep: z.ZodOptional<z.ZodBoolean>;
    include_coauthor: z.ZodOptional<z.ZodBoolean>;
    compact_paste: z.ZodOptional<z.ZodBoolean>;
    copy_on_select: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    last_logged_in_user: z.ZodOptional<z.ZodObject<{
        host: z.ZodString;
        login: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        host: string;
        login: string;
    }, {
        host: string;
        login: string;
    }>>;
    logged_in_users: z.ZodOptional<z.ZodArray<z.ZodObject<{
        host: z.ZodString;
        login: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        host: string;
        login: string;
    }, {
        host: string;
        login: string;
    }>, "many">>;
    model: z.ZodOptional<z.ZodString>;
    reasoning_effort: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    render_markdown: z.ZodOptional<z.ZodBoolean>;
    status_line: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }>>;
    screen_reader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodString>;
    color_mode: z.ZodOptional<z.ZodString>;
    trusted_folders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    allowed_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    denied_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    store_token_plaintext: z.ZodOptional<z.ZodBoolean>;
    stream: z.ZodOptional<z.ZodBoolean>;
    streamer_mode: z.ZodOptional<z.ZodBoolean>;
    update_terminal_title: z.ZodOptional<z.ZodBoolean>;
    mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
    custom_agents: z.ZodOptional<z.ZodObject<{
        default_local_only: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        default_local_only?: boolean | undefined;
    }, {
        default_local_only?: boolean | undefined;
    }>>;
    ide: z.ZodOptional<z.ZodObject<{
        auto_connect: z.ZodOptional<z.ZodBoolean>;
        open_diff_on_edit: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        auto_connect?: boolean | undefined;
        open_diff_on_edit?: boolean | undefined;
    }, {
        auto_connect?: boolean | undefined;
        open_diff_on_edit?: boolean | undefined;
    }>>;
    companyAnnouncements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    feature_flags: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        enabled?: string[] | undefined;
    }, {
        enabled?: string[] | undefined;
    }>>;
    skill_directories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    extensions: z.ZodOptional<z.ZodObject<{
        disabled_extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        mode: z.ZodOptional<z.ZodEnum<["disabled", "load_only", "load_and_augment"]>>;
    }, "strip", z.ZodTypeAny, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabled_extensions?: string[] | undefined;
    }, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabled_extensions?: string[] | undefined;
    }>>;
    enabledPlugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    marketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodString, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"local">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "local";
            path: string;
        }, {
            source: "local";
            path: string;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        };
    }, {
        source: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        };
    }>>>;
    extraKnownMarketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodObject<{
            source: z.ZodLiteral<"directory">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "directory";
            path: string;
        }, {
            source: "directory";
            path: string;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"git">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "git";
            ref?: string | undefined;
        }, {
            url: string;
            source: "git";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            ref?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: {
            source: "directory";
            path: string;
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            repo: string;
            source: "github";
            ref?: string | undefined;
        };
    }, {
        source: {
            source: "directory";
            path: string;
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            repo: string;
            source: "github";
            ref?: string | undefined;
        };
    }>>>;
    installed_plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        marketplace: z.ZodString;
        version: z.ZodOptional<z.ZodString>;
        installed_at: z.ZodString;
        enabled: z.ZodBoolean;
        cache_path: z.ZodOptional<z.ZodString>;
        source: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"local">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "local";
            path: string;
        }, {
            source: "local";
            path: string;
        }>]>>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        enabled: boolean;
        marketplace: string;
        installed_at: string;
        version?: string | undefined;
        source?: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        } | undefined;
        cache_path?: string | undefined;
    }, {
        name: string;
        enabled: boolean;
        marketplace: string;
        installed_at: string;
        version?: string | undefined;
        source?: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        } | undefined;
        cache_path?: string | undefined;
    }>, "many">>;
    firstLaunchAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    asked_setup_terminals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    suppress_init_folders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    copilot_tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    copilot_url: z.ZodOptional<z.ZodString>;
    show_reasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: z.ZodOptional<z.ZodBoolean>;
    storeSessionsRemotely: z.ZodOptional<z.ZodBoolean>;
    hooks: z.ZodOptional<z.ZodObject<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    staff: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    log_level: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
    alt_screen: z.ZodOptional<z.ZodBoolean>;
    mouse: z.ZodOptional<z.ZodBoolean>;
    ask_user: z.ZodOptional<z.ZodBoolean>;
    auto_update: z.ZodOptional<z.ZodBoolean>;
    bash_env: z.ZodOptional<z.ZodBoolean>;
    powershell_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    update_channel: z.ZodOptional<z.ZodEnum<["stable", "prerelease"]>>;
    banner: z.ZodOptional<z.ZodEnum<["always", "once", "never"]>>;
    beep: z.ZodOptional<z.ZodBoolean>;
    include_coauthor: z.ZodOptional<z.ZodBoolean>;
    compact_paste: z.ZodOptional<z.ZodBoolean>;
    copy_on_select: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    last_logged_in_user: z.ZodOptional<z.ZodObject<{
        host: z.ZodString;
        login: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        host: string;
        login: string;
    }, {
        host: string;
        login: string;
    }>>;
    logged_in_users: z.ZodOptional<z.ZodArray<z.ZodObject<{
        host: z.ZodString;
        login: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        host: string;
        login: string;
    }, {
        host: string;
        login: string;
    }>, "many">>;
    model: z.ZodOptional<z.ZodString>;
    reasoning_effort: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    render_markdown: z.ZodOptional<z.ZodBoolean>;
    status_line: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }>>;
    screen_reader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodString>;
    color_mode: z.ZodOptional<z.ZodString>;
    trusted_folders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    allowed_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    denied_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    store_token_plaintext: z.ZodOptional<z.ZodBoolean>;
    stream: z.ZodOptional<z.ZodBoolean>;
    streamer_mode: z.ZodOptional<z.ZodBoolean>;
    update_terminal_title: z.ZodOptional<z.ZodBoolean>;
    mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
    custom_agents: z.ZodOptional<z.ZodObject<{
        default_local_only: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        default_local_only?: boolean | undefined;
    }, {
        default_local_only?: boolean | undefined;
    }>>;
    ide: z.ZodOptional<z.ZodObject<{
        auto_connect: z.ZodOptional<z.ZodBoolean>;
        open_diff_on_edit: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        auto_connect?: boolean | undefined;
        open_diff_on_edit?: boolean | undefined;
    }, {
        auto_connect?: boolean | undefined;
        open_diff_on_edit?: boolean | undefined;
    }>>;
    companyAnnouncements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    feature_flags: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        enabled?: string[] | undefined;
    }, {
        enabled?: string[] | undefined;
    }>>;
    skill_directories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    extensions: z.ZodOptional<z.ZodObject<{
        disabled_extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        mode: z.ZodOptional<z.ZodEnum<["disabled", "load_only", "load_and_augment"]>>;
    }, "strip", z.ZodTypeAny, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabled_extensions?: string[] | undefined;
    }, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabled_extensions?: string[] | undefined;
    }>>;
    enabledPlugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    marketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodString, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"local">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "local";
            path: string;
        }, {
            source: "local";
            path: string;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        };
    }, {
        source: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        };
    }>>>;
    extraKnownMarketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodObject<{
            source: z.ZodLiteral<"directory">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "directory";
            path: string;
        }, {
            source: "directory";
            path: string;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"git">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "git";
            ref?: string | undefined;
        }, {
            url: string;
            source: "git";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            ref?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: {
            source: "directory";
            path: string;
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            repo: string;
            source: "github";
            ref?: string | undefined;
        };
    }, {
        source: {
            source: "directory";
            path: string;
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            repo: string;
            source: "github";
            ref?: string | undefined;
        };
    }>>>;
    installed_plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        marketplace: z.ZodString;
        version: z.ZodOptional<z.ZodString>;
        installed_at: z.ZodString;
        enabled: z.ZodBoolean;
        cache_path: z.ZodOptional<z.ZodString>;
        source: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"local">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "local";
            path: string;
        }, {
            source: "local";
            path: string;
        }>]>>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        enabled: boolean;
        marketplace: string;
        installed_at: string;
        version?: string | undefined;
        source?: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        } | undefined;
        cache_path?: string | undefined;
    }, {
        name: string;
        enabled: boolean;
        marketplace: string;
        installed_at: string;
        version?: string | undefined;
        source?: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        } | undefined;
        cache_path?: string | undefined;
    }>, "many">>;
    firstLaunchAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    asked_setup_terminals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    suppress_init_folders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    copilot_tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    copilot_url: z.ZodOptional<z.ZodString>;
    show_reasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: z.ZodOptional<z.ZodBoolean>;
    storeSessionsRemotely: z.ZodOptional<z.ZodBoolean>;
    hooks: z.ZodOptional<z.ZodObject<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    staff: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    log_level: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
    alt_screen: z.ZodOptional<z.ZodBoolean>;
    mouse: z.ZodOptional<z.ZodBoolean>;
    ask_user: z.ZodOptional<z.ZodBoolean>;
    auto_update: z.ZodOptional<z.ZodBoolean>;
    bash_env: z.ZodOptional<z.ZodBoolean>;
    powershell_flags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    update_channel: z.ZodOptional<z.ZodEnum<["stable", "prerelease"]>>;
    banner: z.ZodOptional<z.ZodEnum<["always", "once", "never"]>>;
    beep: z.ZodOptional<z.ZodBoolean>;
    include_coauthor: z.ZodOptional<z.ZodBoolean>;
    compact_paste: z.ZodOptional<z.ZodBoolean>;
    copy_on_select: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    last_logged_in_user: z.ZodOptional<z.ZodObject<{
        host: z.ZodString;
        login: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        host: string;
        login: string;
    }, {
        host: string;
        login: string;
    }>>;
    logged_in_users: z.ZodOptional<z.ZodArray<z.ZodObject<{
        host: z.ZodString;
        login: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        host: string;
        login: string;
    }, {
        host: string;
        login: string;
    }>, "many">>;
    model: z.ZodOptional<z.ZodString>;
    reasoning_effort: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    render_markdown: z.ZodOptional<z.ZodBoolean>;
    status_line: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }>>;
    screen_reader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodString>;
    color_mode: z.ZodOptional<z.ZodString>;
    trusted_folders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    allowed_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    denied_urls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    store_token_plaintext: z.ZodOptional<z.ZodBoolean>;
    stream: z.ZodOptional<z.ZodBoolean>;
    streamer_mode: z.ZodOptional<z.ZodBoolean>;
    update_terminal_title: z.ZodOptional<z.ZodBoolean>;
    mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
    custom_agents: z.ZodOptional<z.ZodObject<{
        default_local_only: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        default_local_only?: boolean | undefined;
    }, {
        default_local_only?: boolean | undefined;
    }>>;
    ide: z.ZodOptional<z.ZodObject<{
        auto_connect: z.ZodOptional<z.ZodBoolean>;
        open_diff_on_edit: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        auto_connect?: boolean | undefined;
        open_diff_on_edit?: boolean | undefined;
    }, {
        auto_connect?: boolean | undefined;
        open_diff_on_edit?: boolean | undefined;
    }>>;
    companyAnnouncements: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    feature_flags: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        enabled?: string[] | undefined;
    }, {
        enabled?: string[] | undefined;
    }>>;
    skill_directories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    extensions: z.ZodOptional<z.ZodObject<{
        disabled_extensions: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        mode: z.ZodOptional<z.ZodEnum<["disabled", "load_only", "load_and_augment"]>>;
    }, "strip", z.ZodTypeAny, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabled_extensions?: string[] | undefined;
    }, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabled_extensions?: string[] | undefined;
    }>>;
    enabledPlugins: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    marketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodString, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"local">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "local";
            path: string;
        }, {
            source: "local";
            path: string;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        };
    }, {
        source: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        };
    }>>>;
    extraKnownMarketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodObject<{
            source: z.ZodLiteral<"directory">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "directory";
            path: string;
        }, {
            source: "directory";
            path: string;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"git">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "git";
            ref?: string | undefined;
        }, {
            url: string;
            source: "git";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            ref?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: {
            source: "directory";
            path: string;
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            repo: string;
            source: "github";
            ref?: string | undefined;
        };
    }, {
        source: {
            source: "directory";
            path: string;
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            repo: string;
            source: "github";
            ref?: string | undefined;
        };
    }>>>;
    installed_plugins: z.ZodOptional<z.ZodArray<z.ZodObject<{
        name: z.ZodString;
        marketplace: z.ZodString;
        version: z.ZodOptional<z.ZodString>;
        installed_at: z.ZodString;
        enabled: z.ZodBoolean;
        cache_path: z.ZodOptional<z.ZodString>;
        source: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }, {
            url: string;
            source: "url";
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"local">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "local";
            path: string;
        }, {
            source: "local";
            path: string;
        }>]>>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        enabled: boolean;
        marketplace: string;
        installed_at: string;
        version?: string | undefined;
        source?: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        } | undefined;
        cache_path?: string | undefined;
    }, {
        name: string;
        enabled: boolean;
        marketplace: string;
        installed_at: string;
        version?: string | undefined;
        source?: string | {
            repo: string;
            source: "github";
            path?: string | undefined;
            ref?: string | undefined;
        } | {
            url: string;
            source: "url";
            ref?: string | undefined;
        } | {
            source: "local";
            path: string;
        } | undefined;
        cache_path?: string | undefined;
    }>, "many">>;
    firstLaunchAt: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    asked_setup_terminals: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    suppress_init_folders: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    copilot_tokens: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    copilot_url: z.ZodOptional<z.ZodString>;
    show_reasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: z.ZodOptional<z.ZodBoolean>;
    storeSessionsRemotely: z.ZodOptional<z.ZodBoolean>;
    hooks: z.ZodOptional<z.ZodObject<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"prompt">;
            prompt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "prompt";
            prompt: string;
        }, {
            type: "prompt";
            prompt: string;
        }>]>, "many">>;
        sessionEnd: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
        }>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodDefault<z.ZodLiteral<"command">>;
            bash: z.ZodOptional<z.ZodString>;
            powershell: z.ZodOptional<z.ZodString>;
            command: z.ZodOptional<z.ZodString>;
            cwd: z.ZodOptional<z.ZodString>;
            env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            type?: "command" | undefined;
            command?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            bash?: string | undefined;
            timeoutSec?: number | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    staff: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    log_level: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, z.ZodTypeAny, "passthrough">>;

declare enum DefinedExpFlags {
    COPILOT_CI = "copilot_ci",
    COPILOT_CLI = "copilot_cli",
    GPT_DEFAULT_MODEL = "copilot_cli_gpt_default_model",
    GPT_5_4_FOR_SUBAGENTS = "copilot_cli_gpt_5_4_for_subagents",
    DYNAMIC_INSTRUCTIONS_RETRIEVAL = "copilot_cli_dynamic_instructions_retrieval",
    OPUS_1M_DEFAULT_MODEL = "copilot_cli_opus_1m_default_model",
    /** When true, overrides OPUS_MEDIUM_EFFORT_DEFAULT for A/B testing */
    OPUS_MEDIUM_EFFORT_DEFAULT = "copilot_cli_opus_medium_effort_default",
    WEBSOCKET_RESPONSES = "copilot_cli_websocket_responses",
    /** When true, enables tool search with deferred loading for MCP and external tools */
    TOOL_SEARCH = "copilot_cli_tool_search"
}

export declare type DirectoryAttachment = z.infer<typeof DirectoryAttachmentSchema>;

declare const DirectoryAttachmentSchema: z.ZodObject<{
    type: z.ZodLiteral<"directory">;
    path: z.ZodString;
    displayName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "directory";
    path: string;
    displayName: string;
}, {
    type: "directory";
    path: string;
    displayName: string;
}>;

declare interface Disposable_2 {
    dispose(): void | Promise<void>;
}

export declare type ElicitationCompletedEvent = z.infer<typeof ElicitationCompletedEventSchema>;

/**
 * Emitted when a pending elicitation request has been resolved by a client.
 * Other clients should dismiss any elicitation UI for this requestId.
 */
declare const ElicitationCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"elicitation.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.completed";
    timestamp: string;
    parentId: string | null;
}>;

export declare type ElicitationRequestedEvent = z.infer<typeof ElicitationRequestedEventSchema>;

/**
 * Emitted when the session needs structured form-based input from a client.
 * The client should respond via session.respondToElicitation(requestId, result).
 *
 * The data mirrors MCP's ElicitRequestFormParams (plus requestId):
 * message, requestedSchema, optional mode/task/_meta.
 */
declare const ElicitationRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"elicitation.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        elicitationSource: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
        /** MCP elicitation mode. Absent means "form". */
        mode: z.ZodOptional<z.ZodEnum<["form", "url"]>>;
        /** A restricted subset of JSON Schema describing the form fields (form mode only). */
        requestedSchema: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"object">;
            properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }>>;
        /** URL to open in the browser (url mode only). */
        url: z.ZodOptional<z.ZodString>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        elicitationSource: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
        /** MCP elicitation mode. Absent means "form". */
        mode: z.ZodOptional<z.ZodEnum<["form", "url"]>>;
        /** A restricted subset of JSON Schema describing the form fields (form mode only). */
        requestedSchema: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"object">;
            properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }>>;
        /** URL to open in the browser (url mode only). */
        url: z.ZodOptional<z.ZodString>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        elicitationSource: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
        /** MCP elicitation mode. Absent means "form". */
        mode: z.ZodOptional<z.ZodEnum<["form", "url"]>>;
        /** A restricted subset of JSON Schema describing the form fields (form mode only). */
        requestedSchema: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"object">;
            properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }>>;
        /** URL to open in the browser (url mode only). */
        url: z.ZodOptional<z.ZodString>;
    }, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        mode?: "url" | "form" | undefined;
        requestedSchema?: {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        mode?: "url" | "form" | undefined;
        requestedSchema?: {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.requested";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * Extends the MCP SDK's ElicitRequestFormParams with an optional toolCallId
 * so the runtime can correlate elicitation prompts with the tool call visible
 * to remote UIs.
 */
declare type ElicitRequestWithToolCallId = ElicitRequestFormParams & {
    toolCallId?: string;
};

export declare type EmbeddedResource = z.infer<typeof EmbeddedResourceSchema>;

/**
 * Embedded resource content block
 */
declare const EmbeddedResourceSchema: z.ZodObject<{
    type: z.ZodLiteral<"resource">;
    resource: z.ZodUnion<[z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }>, z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        blob: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }>]>;
}, "strip", z.ZodTypeAny, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}>;

/**
 * Enables a model's policy for the current user.
 * This is used for models that are available but require user consent (policy.state !== 'enabled').
 */
export declare function enableModelPolicy(authInfo: AuthInfo, modelId: string, integrationId?: string, sessionId?: string, logger?: RunnerLogger): Promise<EnableModelPolicyResult>;

export declare type EnableModelPolicyResult = {
    success: boolean;
    error?: string;
    canBeEnabled?: boolean;
};

/** Represents the Personal Access Token (PAT) or server-to-server token authentication information. */
declare type EnvAuthInfo = {
    readonly type: "env";
    readonly host: string;
    /** The login of the user. Undefined for server-to-server tokens (ghs_). */
    readonly login?: string;
    readonly token: string;
    readonly envVar: string;
    readonly copilotUser?: CopilotUserResponse;
};

/**
 * EnvValueMode controls how the value of a key/value pair in the `env` block of an MCP server config is
 * interpreted. `direct` means the value is used as-is. `indirect` means the value is the name
 * of an environment variable whose value should be used.
 */
declare type EnvValueMode = "direct" | "indirect";

export declare type ErrorOccurredHook = (input: ErrorOccurredHookInput) => Promise<ErrorOccurredHookOutput | void>;

/**
 * Error occurred hook types
 */
export declare interface ErrorOccurredHookInput extends BaseHookInput {
    error: Error;
    errorContext: "model_call" | "tool_execution" | "system" | "user_input";
    recoverable: boolean;
}

export declare interface ErrorOccurredHookOutput {
    suppressOutput?: boolean;
    errorHandling?: "retry" | "skip" | "abort";
    retryCount?: number;
    userNotification?: string;
}

declare type Event_2 = MessageEvent_2 | ResponseEvent | ModelCallFailureEvent | TurnEvent | TruncationEvent | UsageInfoEvent | CompactionEvent | ImageProcessingEvent | ImageRemovalEvent | ModelCallSuccessEvent | ToolExecutionEvent | TelemetryEvent_2 | MessagesSnapshotEvent;

declare type EventData<T extends EventType> = EventPayload<T>["data"];

declare type EventHandler<T extends EventType> = (event: EventPayload<T>) => void | Promise<void>;

declare type EventPayload<T extends EventType> = Extract<SessionEvent, {
    type: T;
}>;

/**
 * Telemetry can be emitted by the runtime via progress events. Telemetry is attached to progress events
 * on a `telemetry` property whose type is this.
 */
declare type EventTelemetry<EventT = string, TelemetryT extends Telemetry = Telemetry> = {
    /**
     * The name of the telemetry event associated with the emitted runtime progress event.
     */
    event: EventT;
    /**
     * String-esque properties that are associated with the telemetry event.
     * WARNING: Do not put sensitive data here. Use restrictedProperties for that.
     */
    properties: TelemetryT["properties"];
    /**
     * String-esque properties that are associated with the telemetry event. These are only available on the restricted topics
     */
    restrictedProperties: TelemetryT["restrictedProperties"];
    /**
     * Number-esque metrics that are associated with the telemetry event. Both integer and floating point values are possible.
     */
    metrics: TelemetryT["metrics"];
};

declare type EventType = SessionEvent["type"];

/**
 * Result of checking if a file is excluded.
 */
declare interface ExclusionCheckResult {
    /** Whether the file is excluded */
    excluded: boolean;
    /** If excluded, the reason/source */
    reason?: string;
    /** If excluded, the source that set the rule */
    source?: {
        name: string;
        type: string;
    };
}

export declare function executeHooks<TInput extends BaseHookInput, TOutput>(hooks: ((input: TInput) => Promise<TOutput | void>)[] | undefined, input: TInput, logger: RunnerLogger, hookType?: keyof QueryHooks, emitter?: HookEventEmitter): Promise<void | TOutput>;

declare type ExitPlanModeAction = z_2.infer<typeof exitPlanModeActionSchema>;

declare const exitPlanModeActionSchema: z_2.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>;

export declare type ExitPlanModeCompletedEvent = z.infer<typeof ExitPlanModeCompletedEventSchema>;

/**
 * Emitted when a pending exit plan mode request has been resolved by a client.
 * Other clients should dismiss any exit plan mode UI for this requestId.
 */
declare const ExitPlanModeCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"exit_plan_mode.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.completed";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * Request for plan approval dialog.
 */
declare type ExitPlanModeRequest = {
    /** Summary of the plan written by the agent */
    summary: string;
    /** Exit options shown to the user */
    actions: ExitPlanModeAction[];
    /** Which action should be highlighted and shown first */
    recommendedAction: ExitPlanModeAction;
    /** The LLM-assigned tool call ID, threaded from the tool execution context */
    toolCallId?: string;
};

export declare type ExitPlanModeRequestedEvent = z.infer<typeof ExitPlanModeRequestedEventSchema>;

/**
 * Emitted when the session needs plan approval from a client.
 * The client should respond via session.respondToExitPlanMode(requestId, result).
 */
declare const ExitPlanModeRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"exit_plan_mode.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        summary: z.ZodString;
        planContent: z.ZodString;
        actions: z.ZodArray<z.ZodString, "many">;
        recommendedAction: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    }, {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.requested";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * Response from the plan approval dialog.
 */
declare type ExitPlanModeResponse = {
    /** Whether the plan was approved */
    approved: boolean;
    /** Which action the user selected */
    selectedAction?: ExitPlanModeAction;
    /** Whether edits should be auto-approved without confirmation */
    autoApproveEdits?: boolean;
    /** Feedback from the user if they requested changes */
    feedback?: string;
};

/** Audience filter values submitted with ExP requests for experiment targeting. */
declare interface ExpAudienceFilters {
    analyticsTrackingID: string;
    cliVersion: string;
    isStaffMSFT: boolean;
    isStaffGH: boolean;
    isExperimental: boolean;
    /** Timestamp of the first CLI launch */
    firstLaunchAt: Date;
    /** Copilot subscription plan from the API */
    copilotPlan?: string;
}

/**
 * Client defines the interface for interacting with the ExP API.
 */
declare interface ExperimentsClientInterface {
    getExperimentsResponse(randomizationUnit: TrafficFilter, trafficFilters: readonly TrafficFilter[], endpoint: string): Promise<CopilotExpAssignmentResponse>;
}

/** Type-safe key for known experiment flags */
declare type ExpFlagKey = `${DefinedExpFlags}`;

/**
 * ExP flags record. Keyed by arbitrary string because the TAS API
 * returns parameters beyond the statically-known DefinedExpFlags.
 */
declare type ExpFlags = Record<string, ExpFlagValue>;

/** Value type for ExP (Experiment Platform) flags */
declare type ExpFlagValue = string | number | boolean | null;

/** Result metadata from an ExP context retrieval attempt */
declare interface ExpRetrievalResult {
    /** Whether the ExP context was successfully retrieved */
    success: boolean;
    /** Duration of the retrieval in milliseconds */
    durationMs: number;
    /** Number of configs in the response (success only) */
    configCount?: number;
    /** Number of features in the response (success only) */
    featureCount?: number;
    /** Assigned experiment features (success only) */
    assignedExperiments?: string[];
    /** Flights and their values from the response (success only) */
    flights?: Record<string, string>;
    /** Resolved feature flag values from config parameters (success only) */
    configFeatures?: Record<string, ExpFlagValue>;
    /** Error message (failure only) */
    error?: string;
}

/** Callback type for ExP retrieval result telemetry */
declare type ExpRetrievalTelemetryCallback = (result: ExpRetrievalResult) => void;

/**
 * Controller interface for managing extensions (subprocess-based tools).
 * Implemented by the server layer and injected into the session via updateOptions.
 */
export declare interface ExtensionController {
    /** List all discovered extensions with their current status. */
    listExtensions(): Array<{
        id: string;
        name: string;
        source: string;
        status: string;
        pid?: number;
    }>;
    /** Enable a disabled extension and reload to apply. */
    enableExtension(id: string): Promise<void>;
    /** Disable an extension, stop its process, and remove its tools. */
    disableExtension(id: string): Promise<void>;
    /** Reload all extensions from disk. */
    reloadExtensions(): Promise<void>;
}

export declare type ExternalToolCompletedEvent = z.infer<typeof ExternalToolCompletedEventSchema>;

/**
 * Emitted when a pending external tool request has been resolved by a client.
 */
declare const ExternalToolCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.completed";
    timestamp: string;
    parentId: string | null;
}>;

export declare interface ExternalToolDefinition {
    name: string;
    description: string;
    /** Human-readable display title shown in the tool call timeline. Falls back to name if not set. */
    title?: string;
    parameters?: Record<string, unknown>;
    /**
     * When true, explicitly indicates this tool is intended to override a built-in tool
     * of the same name. If an external tool name clashes with a built-in tool and this
     * flag is not set, session creation will fail with an error.
     */
    overridesBuiltInTool?: boolean;
    /** When true, the tool can execute without a permission prompt. */
    skipPermission?: boolean;
}

/** Serializable external tool request, inferred from the event schema (minus the requestId added by the store). */
declare type ExternalToolRequest = Omit<ExternalToolRequestedEvent["data"], "requestId">;

export declare type ExternalToolRequestedEvent = z.infer<typeof ExternalToolRequestedEventSchema>;

/**
 * Emitted when an external tool invocation needs to be dispatched to a client.
 * The client should respond via session.respondToExternalTool(requestId, result).
 */
declare const ExternalToolRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        sessionId: z.ZodString;
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        traceparent: z.ZodOptional<z.ZodString>;
        tracestate: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.requested";
    timestamp: string;
    parentId: string | null;
}>;

declare type FeatureFlag = keyof FeatureFlagAvailabilityMap;

/**
 * Feature flag availability tiers:
 * - "on": Available to all users, cannot be turned off
 * - "team": Only available by default for team members (determined by repo remote URL hash match)
 * - "staff-or-experimental": Available to staff users OR experimental mode users
 * - "staff": Only available to staff users
 * - "experimental": Only available when experimental mode is explicitly enabled
 * - "off": Always disabled unless explicitly enabled via env var or config
 */
declare type FeatureFlagAvailability = "on" | "team" | "staff-or-experimental" | "staff" | "experimental" | "off";

/**
 * Internal feature flag availability definitions. Defines which tier each flag belongs to.
 *
 * @internal Exported for testing only
 */
declare const featureFlagAvailability: Record<string, FeatureFlagAvailability>;

declare type FeatureFlagAvailabilityMap = typeof featureFlagAvailability;

/** Callback type for feature flag change listeners */
declare type FeatureFlagChangeListener = (flags: FeatureFlags, expFlags: ExpFlags, expResponse: CopilotExpAssignmentResponse) => void;

/** Options for initializing feature flags */
declare interface FeatureFlagInitOptions {
    /** Whether the user is a staff member (from config) */
    isStaff: boolean;
    /** Whether experimental mode is enabled */
    isExperimental: boolean;
    /** Whether the user is in a team repository */
    isTeam: boolean;
    /** Whether streamer mode is enabled (suppresses staff status for experimentation) */
    streamerMode?: boolean;
    /** Optional config object for config-based overrides */
    config?: DefaultConfig;
    /** Timestamp of first CLI launch, for ExP audience targeting */
    firstLaunchAt?: Date;
}

/** Resolved feature flags with boolean values for runtime use */
declare type FeatureFlags = Readonly<Record<FeatureFlag, boolean>>;

/**
 * Service for accessing feature flags globally across the CLI.
 *
 * This service provides a centralized way to access feature flags from both
 * React and non-React code. It handles the full resolution chain:
 * 1. Base resolution from user status (staff/experimental)
 * 2. Environment variable overrides
 * 3. Config file overrides
 *
 * The service supports subscriptions for reactive updates - when flags change,
 * all registered listeners are notified.
 * The service can be initialized with either pre-resolved flags or with options
 *
 * @example
 * // Subscribe to changes
 * const unsubscribe = service.subscribe((flags, expFlags, expResponse) => {
 *     console.log("Feature flags changed:", flags);
 *     console.log("Exp flags changed:", expFlags);
 * });
 * // Later: unsubscribe();
 */
declare class FeatureFlagService {
    private flags;
    private expFlags;
    private listeners;
    /** Current ExP response (always synchronously available; starts as EMPTY_EXP_RESPONSE) */
    private latestExpResponse;
    /** Tracks whether the initial ExP fetch has completed */
    private expFetchStatus;
    /** Callbacks waiting for the initial ExP fetch to complete */
    private expFetchWaiters;
    private experimentsClient;
    private expRetrievalTelemetryCallback?;
    private readonly options;
    /**
     * Cached experiment assignment context string for telemetry.
     * Updated when ExP response is fetched successfully.
     */
    private latestAssignmentContext;
    constructor(experimentsClient: ExperimentsClientInterface, options: FeatureFlagInitOptions);
    /**
     * Subscribes to an auth source so that ExP assignments are fetched
     * automatically whenever authentication state changes.
     */
    subscribeToAuth(auth: AuthSubscriber): void;
    private handleAuthChange;
    /**
     * Resets the service instance. Primarily for testing purposes.
     */
    resetInstance(): void;
    resetExpResponse(): void;
    /**
     * Sets the ExP response, updates flags, resolves any waiters, and notifies listeners.
     */
    private resolveExpFetch;
    /**
     * Registers a callback that will be invoked with telemetry data after each
     * ExP retrieval attempt. Used by the telemetry service to emit telemetry
     * without owning the fetch itself.
     */
    onExpRetrievalResult(callback: ExpRetrievalTelemetryCallback): void;
    retrieveExpResponse(telemetryUrl: string | undefined, audience: ExpAudienceFilters): Promise<ExpRetrievalResult>;
    private extractExpFlagsFromResponse;
    /**
     * Gets the value of a specific feature flag.
     *
     * @param flag The feature flag name
     * @returns The boolean value of the flag
     */
    getFlag(flag: FeatureFlag): boolean;
    /**
     * Gets all feature flags.
     * Returns a frozen copy to prevent external mutations.
     *
     * @returns A readonly frozen copy of all feature flags
     */
    getAllFlags(): FeatureFlags;
    /**
     * Gets the value of a specific ExP (Experiment Platform) flag.
     * Waits for the ExP response to be available before returning.
     *
     * @param flag The ExP flag name
     * @returns The flag value, or undefined if not set
     */
    getExpFlag(flag: ExpFlagKey): Promise<ExpFlagValue | undefined>;
    /**
     * Gets a feature flag value with ExP override support.
     * Awaits the ExP response, then:
     * - If the ExP flag has a boolean value (treatment or control), returns it.
     * - Otherwise falls back to the static feature flag value.
     *
     * @param expFlag The ExP flag to check first
     * @param featureFlag The feature flag to fall back to
     * @returns The resolved boolean value
     */
    getFlagWithExpOverride(expFlag: ExpFlagKey, featureFlag: FeatureFlag): Promise<boolean>;
    /**
     * Like {@link getFlagWithExpOverride}, but races the ExP lookup against a
     * timeout so that a slow or unreachable ExP endpoint does not block
     * callers on the critical path (e.g. tool initialisation).
     * On timeout the static feature flag value is returned instead.
     *
     * When the ExP response is already available this returns immediately
     * without creating a timer. When the ExP fetch is still pending the
     * static fallback is returned directly to avoid accumulating waiters
     * that would never be cleaned up if ExP never resolves.
     *
     * @param expFlag The ExP flag to check first
     * @param featureFlag The feature flag to fall back to
     * @param timeoutMs Maximum time to wait for the ExP response
     * @returns The resolved boolean value
     */
    getFlagWithExpOverrideTimeout(expFlag: ExpFlagKey, featureFlag: FeatureFlag, timeoutMs: number): Promise<boolean>;
    /**
     * Whether the GPT-5.4 sub-agent default model policy is enabled.
     * Awaits the ExP assignment for `copilot_cli_gpt_5_4_for_subagents`;
     * falls back to the `CODEX_FOR_SUBAGENTS` feature flag when ExP has no assignment.
     */
    isGpt54ForSubagentsEnabled(): Promise<boolean>;
    /**
     * Whether embedding-based dynamic instruction retrieval is enabled.
     * Awaits the ExP assignment for `copilot_cli_dynamic_instructions_retrieval`;
     * falls back to the `DYNAMIC_INSTRUCTIONS_RETRIEVAL` feature flag when ExP has no assignment.
     */
    isDynamicInstructionsRetrievalEnabled(): Promise<boolean>;
    /**
     * Whether the opus medium effort default policy is enabled.
     * Awaits the ExP assignment for `copilot_cli_opus_medium_effort_default`;
     * falls back to the `OPUS_MEDIUM_EFFORT_DEFAULT` feature flag when ExP has no assignment.
     */
    isOpusMediumEffortDefaultEnabled(): Promise<boolean>;
    /**
     * Whether WebSocket transport for the Responses API is enabled.
     * Awaits the ExP assignment for `copilot_cli_websocket_responses`;
     * falls back to the `WEBSOCKET_RESPONSES` feature flag when ExP has no assignment.
     */
    isWebSocketResponsesEnabled(): Promise<boolean>;
    /**
     * Whether tool search with deferred loading is enabled.
     * Awaits the ExP assignment for `copilot_cli_tool_search`;
     * falls back to the `TOOL_SEARCH` feature flag when ExP has no assignment.
     */
    isToolSearchEnabled(): Promise<boolean>;
    /**
     * Returns a promise that resolves once the initial ExP fetch has completed.
     * If the fetch has already completed, resolves immediately.
     *
     * Use this to gate work that requires ExP assignment context (e.g.
     * experimentation-critical telemetry).
     */
    waitForExpResponse(): Promise<void>;
    /**
     * Gets all ExP (Experiment Platform) flags.
     *
     * @returns A readonly copy of all ExP flags
     */
    getAllExpFlagsSync(): ExpFlags;
    /**
     * Gets the latest ExP response synchronously.
     */
    getLatestExpResponse(): CopilotExpAssignmentResponse;
    /**
     * Gets the latest cached assignment context if available.
     * Returns undefined if no ExP response has been fetched yet or if the fetch failed.
     * This is a synchronous accessor for telemetry purposes - it returns immediately
     * without waiting for any pending ExP requests.
     *
     * @returns The assignment context string, or undefined if not available
     */
    getLatestAssignmentIfPresent(): string | undefined;
    /**
     * Subscribes to feature flag changes.
     * The listener will be called whenever flags are updated.
     *
     * @param listener Callback function that receives the new flags and expFlags
     * @returns Unsubscribe function - call this to remove the listener
     *
     * @example
     * const unsubscribe = service.subscribe((flags, expFlags) => {
     *     console.log("New flags:", flags, expFlags);
     * });
     * // When done:
     * unsubscribe();
     */
    subscribe(listener: FeatureFlagChangeListener): () => void;
    /**
     * Resolves feature flags using the full resolution chain.
     * @param options Feature flag initialization options
     * @param expFlags Current ExP flags (used to apply experiment-based overrides)
     */
    private resolveFlags;
    private notifyListeners;
}

export declare type FileAttachment = z.infer<typeof FileAttachmentSchema>;

declare const FileAttachmentSchema: z.ZodObject<{
    type: z.ZodLiteral<"file">;
    path: z.ZodString;
    displayName: z.ZodString;
    lineRange: z.ZodOptional<z.ZodObject<{
        start: z.ZodNumber;
        end: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        end: number;
        start: number;
    }, {
        end: number;
        start: number;
    }>>;
}, "strip", z.ZodTypeAny, {
    type: "file";
    path: string;
    displayName: string;
    lineRange?: {
        end: number;
        start: number;
    } | undefined;
}, {
    type: "file";
    path: string;
    displayName: string;
    lineRange?: {
        end: number;
        start: number;
    } | undefined;
}>;

export declare class FileLogger extends BaseLogger implements RunnerLogger, LogWriter {
    private readonly filePath;
    private readonly queue;
    constructor(filePath: string, logLevel?: LogLevel, debugEnvironmentVariables?: string[]);
    /** Promise that resolves when pending writes are complete. Used to serialize
     * writes and for testing. */
    get writeQueue(): Promise<void>;
    outputPath(): string;
    log(message: string): void;
    debug(message: string): void;
    info(message: string): void;
    notice(message: string | Error): void;
    warning(message: string | Error): void;
    error(message: string | Error): void;
    startGroup(name: string, level?: LogLevel): void;
    endGroup(level?: LogLevel): void;
    /** @internal Exported for testing only. */
    get stats(): CoalescingWriteQueueStats;
    write(category: string, message: string): void;
    /** Implementation for LogWriter interface */
    writeLog(level: LogLevel_2, message: string): Promise<void>;
}

/**
 * A range of lines in a file.
 */
declare interface FileRange {
    /** The path of the file, relative to the repository root. */
    path: string;
    /** The start line of the range (1-based, inclusive). */
    startLine: number;
    /** The end line of the range (1-based, inclusive). */
    endLine: number;
}

/**
 * Type for a function tool call delta (streaming).
 */
declare type FunctionToolCallDelta = {
    index: number;
    id?: string;
    type?: "function";
    function?: {
        name?: string;
        arguments?: string;
    };
};

/**
 * Retrieves the list of available models based on availability, policies, and integration including
 * capabilities and billing information, which may be cached from previous calls.
 *
 * This list is in order of preference to be the default model for new sessions where the first model is
 * the most preferred.  It can be empty if no models are available.
 *
 * @deprecated Used solely by vscode-copilot-chat extension, use {@link retrieveAvailableModels} instead.
 */
export declare function getAvailableModels(authInfo: AuthInfo): Promise<Model[]>;

declare type GetCompletionWithToolsOptions = {
    /**
     * If `true`, then calls do `getCompletionWithTools` will check if the token counts of
     * the initial system messages, user messages, and tool definitions, exceed the limits
     * of the model. If they do, then the call will throw an error. If `false`, then the
     * call will not perform any checks.
     *
     * Defaults to `false`.
     */
    failIfInitialInputsTooLong?: boolean;
    toolChoice?: ChatCompletionToolChoiceOption;
    requestHeaders?: Record<string, string>;
    /**
     * If true, performs the request in streaming mode. This results in additional events
     * as each chunk is received from the service.
     */
    stream?: boolean;
    /**
     * If this call is a continuation of a previous `getCompletionWithTools` call, this specifies what turn
     * that conversation was/is on. This is used to determine the initial turn count in this
     * call to `getCompletionWithTools`.
     */
    initialTurnCount?: number;
    /**
     * Processors provide a way to do work during different stages of the completion with tools
     * lifecycle. Processors will be called in the order they are provided.
     */
    processors?: {
        preRequest?: IPreRequestProcessor[];
        postRequest?: IPostRequestProcessor[];
        onRequestError?: IOnRequestErrorProcessor[];
        preToolsExecution?: IPreToolsExecutionProcessor[];
        postToolExecution?: IPostToolExecutionProcessor[];
        onStreamingChunk?: IOnStreamingChunkProcessor[];
    };
    /**
     * Signal to abort the completion request.
     */
    abortSignal?: AbortSignal;
    /**
     * An optional identifier for the completion with tools call. This can be used for logging
     * and tracing purposes.
     */
    callId?: string;
    /**
     * The reasoning effort level for the model to use, if supported by the client.
     */
    reasoningEffort?: ReasoningEffort;
    /**
     * Optional callback to refresh the tool list mid-turn. Called after each batch of
     * tool executions. If it returns a new tool array, the toolSet and tool definitions
     * sent to the model are rebuilt for subsequent rounds within the same turn.
     * Return undefined to keep the current tools.
     */
    refreshTools?: () => Tool_2[] | undefined;
};

/** Gets the list of available custom agents. */
export declare function getCustomAgents(authInfo: AuthInfo, workingDir: string, integrationId?: string, logger?: RunnerLogger, settings?: RuntimeSettings, additionalPlugins?: InstalledPlugin[]): Promise<SweCustomAgent[]>;

/** Represents the GitHub CLI authentication information. */
declare type GhCliAuthInfo = {
    readonly type: "gh-cli";
    readonly host: string;
    readonly login: string;
    readonly token: string;
    readonly copilotUser?: CopilotUserResponse;
};

declare interface GitHandler {
    /**
     * Clone a repository.
     * @param settings The runtime settings.
     * @param repo The repository to clone.
     * @param repoLocation The location to clone the repository to.
     * @param branchName The name of the branch to clone.
     * @param commitCount The number of commits to fetch during cloning. Used for PR comment fix scenarios only. Defaults to 2.
     * @param baseCommit The base commit to use for the clone. Used for PR comment fix scenarios only.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     */
    cloneRepo: (settings: RuntimeSettings, repo: string, repoLocation: string, branchName: string, commitCount?: number, baseCommit?: string, execOptions?: RunnerExecOptions) => Promise<void>;
    /**
     * Commit changes to the repository without pushing.
     * @param settings The runtime settings.
     * @param branchName The name of the branch to commit to.
     * @param repoLocation The location of the repository.
     * @param commitMessage The commit message.
     * @param allowEmptyCommit Whether to allow empty commits.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise indicating the success of the operation.
     */
    commitChanges: (settings: RuntimeSettings, branchName: string, repoLocation: string, commitMessage: string, allowEmptyCommit?: boolean, noVerify?: boolean, execOptions?: RunnerExecOptions) => Promise<string>;
    /**
     * Commit and push changes to the repository.
     * @param settings The runtime settings.
     * @param branchName The name of the branch to commit to.
     * @param repoLocation The location of the repository.
     * @param commitMessage The commit message.
     * @param allowEmptyCommit Whether to allow empty commits.
     * @param noVerify Whether to skip pre-commit/push hooks.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise indicating the success of the operation.
     */
    commitAndPushChanges: (settings: RuntimeSettings, branchName: string, repoLocation: string, commitMessage: string, allowEmptyCommit?: boolean, noVerify?: boolean, execOptions?: RunnerExecOptions) => Promise<string>;
    /**
     * Stages all changes in the repository (including new files).
     *
     * @param repoLocation The location of the repository.
     */
    stageChanges(repoLocation: string, execOptions?: RunnerExecOptions): Promise<string>;
    /**
     * Get the diff of a branch.
     * @param repoLocation The location of the repository.
     * @param stagedChanges If true, compare against staged changes. If false compare against all changes.
     * @param baseCommit The base commit to compare against. If this parameter is not provided, the diff will be calculated against the current working tree.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise containing the diff.
     */
    diff: (repoLocation: string, stagedChanges?: boolean, baseCommit?: string, execOptions?: RunnerExecOptions) => Promise<string>;
    /**
     * Get the parsed diff of a branch, as a list of diff file ranges.
     * @param repoLocation The location of the repository.
     * @param baseCommit The base commit to compare against. If this parameter is not provided, the diff will be calculated against the current working tree.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise containing the list of diff file ranges.
     */
    getDiffRanges: (repoLocation: string, baseCommit?: string, execOptions?: RunnerExecOptions) => Promise<FileRange[]>;
    /**
     * Get the most recent commits in a repository.
     * @param repoLocation The location of the repository.
     * @param count The number of commits to retrieve.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise containing the list of commit hashes.
     */
    getMostRecentCommits: (repoLocation: string, count: number, execOptions?: RunnerExecOptions) => Promise<string[]>;
    /**
     * Get the paths of files that have been changed between two commits, or between a commit and the working tree.
     * @param repoLocation The location of the repository.
     * @param moreRecentCommit The more recent commit hash.
     * @param baseCommit The base commit hash to compare against. If this parameter is not provided, the diff will be calculated against the current working tree.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise containing the list of changed file paths.
     */
    getChangedPaths: (repoLocation: string, moreRecentCommit: string, baseCommit?: string, execOptions?: RunnerExecOptions) => Promise<string[]>;
    /**
     * Get the current commit hash of a repository.
     * @param repoLocation The location of the repository.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise containing the current commit hash.
     */
    getCurrentCommitHash: (repoLocation: string, execOptions?: RunnerExecOptions) => Promise<string>;
    /**
     * Show the contents of a file at a specific commit.
     * @param repoLocation The location of the repository.
     * @param filePath The path of the file, relative to the repository root.
     * @param commitHash The commit hash to show the file at.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     * @returns A promise containing the file contents.
     */
    showFileAtCommit(repoLocation: string, filePath: string, commitHash: string, execOptions?: RunnerExecOptions): Promise<string>;
    /**
     * Resolve baseCommit to a SHA. If it's already a SHA or exists locally, return it.
     * If it's a branch name that doesn't exist locally, fetch it from remote and resolve to SHA.
     *
     * @param location The repository location.
     * @param baseCommit The base commit to resolve.
     * @param execOptions The execution options. Optional, set to empty if not specified.
     *
     * @returns The resolved SHA of the base commit.
     */
    resolveBaseCommitToSha(location: string, baseCommit: string, execOptions?: RunnerExecOptions): Promise<string>;
    /**
     * Returns the Git OIDs of all tracked files (in the index and in the working
     * tree) that are under the given base path, including files in active
     * submodules. Untracked files and files not under the given base path are
     * ignored.
     *
     * @param basePath A path into the Git repository.
     * @returns a map from file paths (relative to `basePath`) to Git OIDs.
     * @throws {Error} if "git ls-files" produces unexpected output.
     */
    getFileOidsUnderPath(basePath: string): Promise<{
        [key: string]: string;
    }>;
    execGit(gitArgs: string[], execOptions: RunnerExecOptions, filteredCmdArgs: string[]): Promise<RunnerExecOutput>;
}

/** Options controlling what the built-in GitHub MCP server exposes. */
declare interface GitHubMcpConfigOptions {
    /** When true, use the read-write `/mcp` endpoint and expose all tools via `X-MCP-Toolsets: all`. */
    enableAllTools?: boolean;
    /** Extra toolset names to request via the `X-MCP-Toolsets` header (e.g., `["all"]`). */
    additionalToolsets?: string[];
    /** Extra tool names to request via `X-MCP-Tools` (overrides the default list when non-empty). */
    additionalTools?: string[];
}

/** Map of GitHub resource scopes to their permission levels. */
declare type GitHubPermissions = Record<string, string>;

export declare type GitHubReferenceAttachment = z.infer<typeof GitHubReferenceAttachmentSchema>;

declare const GitHubReferenceAttachmentSchema: z.ZodObject<{
    type: z.ZodLiteral<"github_reference">;
    number: z.ZodNumber;
    title: z.ZodString;
    referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
    state: z.ZodString;
    url: z.ZodString;
}, "strip", z.ZodTypeAny, {
    number: number;
    url: string;
    type: "github_reference";
    title: string;
    referenceType: "pr" | "issue" | "discussion";
    state: string;
}, {
    number: number;
    url: string;
    type: "github_reference";
    title: string;
    referenceType: "pr" | "issue" | "discussion";
    state: string;
}>;

declare interface HandoffProgress {
    step: HandoffStep;
    status: "in-progress" | "complete";
    message?: string;
}

declare type HandoffStep = "load-session" | "validate-repo" | "check-changes" | "checkout-branch" | "create-session" | "save-session";

/** Represents the HMAC-based authentication information. */
declare type HMACAuthInfo = {
    readonly type: "hmac";
    readonly host: "https://github.com";
    readonly hmac: string;
    readonly copilotUser?: CopilotUserResponse;
};

export declare type HookEndEvent = z.infer<typeof HookEndEventSchema>;

/**
 * Hook invocation completes
 */
declare const HookEndEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"hook.end">;
    data: z.ZodObject<{
        hookInvocationId: z.ZodString;
        hookType: z.ZodString;
        output: z.ZodUnknown;
        success: z.ZodBoolean;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
            stack: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            stack?: string | undefined;
        }, {
            message: string;
            stack?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    id: string;
    type: "hook.end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    id: string;
    type: "hook.end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/** Callback for emitting hook lifecycle events from within executeHooks. */
export declare type HookEventEmitter = {
    emitHookStart(data: HookStartEvent["data"]): void;
    emitHookEnd(data: HookEndEvent["data"]): void;
};

/**
 * A permission request triggered by a preToolUse hook returning `permissionDecision: "ask"`.
 * Dispatched directly to the CLI and never flows through `createPermissionService`.
 */
declare type HookPermissionRequest = {
    readonly kind: "hook";
    /** The name of the tool the hook is gating */
    readonly toolName: string;
    /** The tool call arguments */
    readonly toolArgs?: unknown;
    /** Optional message from the hook explaining why confirmation is needed */
    readonly hookMessage?: string;
};

export declare type HookStartEvent = z.infer<typeof HookStartEventSchema>;

/**
 * Hook invocation begins
 */
declare const HookStartEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"hook.start">;
    data: z.ZodObject<{
        hookInvocationId: z.ZodString;
        hookType: z.ZodString;
        input: z.ZodUnknown;
    }, "strip", z.ZodTypeAny, {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    }, {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    id: string;
    type: "hook.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    id: string;
    type: "hook.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

declare interface HTTPTransportConfig {
    type: "http";
    url: string;
    headers?: Record<string, string>;
    authProvider?: OAuthClientProvider;
}

/**
 * Union type for all Hydro events that can be sent.
 * Standard events have `restricted?: false`. Restricted events (`cli.restricted_*`)
 * require `restricted: true` to ensure they are routed to the restricted telemetry client.
 */
declare type HydroEvent = ({
    name: "cli.telemetry";
    event: HydroTelemetry;
} & {
    restricted?: false;
}) | ({
    name: "cli.model_call";
    event: HydroModelCall;
} & {
    restricted?: false;
}) | ({
    name: "cli.tool_call";
    event: HydroToolCall;
} & {
    restricted?: false;
}) | ({
    name: "cli.restricted_telemetry";
    event: HydroRestrictedTelemetry;
} & {
    restricted: true;
}) | ({
    name: "cli.restricted_tool_call";
    event: HydroRestrictedToolCall;
} & {
    restricted: true;
});

/**
 * Structured model call telemetry event.
 * Maps to: copilot_cli.v0.ModelCall (model_call.proto)
 */
declare interface HydroModelCall {
    /** Timestamp when the event was created (ISO 8601 format) */
    created_at?: string;
    /** API response ID (e.g., chatcmpl-xxx from OpenAI). Referenced by other events as model_call_id */
    api_id?: string;
    /** Model used for this call */
    model: string;
    /** Completion token count */
    completion_tokens_count?: number;
    /** Prompt token count */
    prompt_tokens_count?: number;
    /** Total token count */
    total_tokens_count?: number;
    /** Cached tokens count */
    cached_tokens_count?: number;
    /** Number of tool calls in this response */
    tool_calls_count?: number;
    /** Duration measured internally (not from API) in milliseconds */
    duration_ms?: number;
    /** Session identifier (auto-filled by SessionTelemetry) */
    session_id?: string;
    /** Copilot tracking ID */
    copilot_tracking_id?: string;
    /** Experiment assignment context */
    exp_assignment_context?: string;
    /** GitHub request tracing ID */
    request_id?: string;
    /** HTTP status of model call response */
    status?: number;
    /** Feature flags enabled at time of this call */
    features?: Record<string, string>;
    /** Client environment metadata */
    client?: ClientInfo;
}

/**
 * Restricted bag-shaped telemetry event.
 * Maps to: copilot_cli.v0.RestrictedTelemetry (restricted_telemetry.proto)
 */
declare interface HydroRestrictedTelemetry {
    /** Event type/kind */
    kind: string;
    /** Timestamp when the event was created (ISO 8601 format) */
    created_at?: string;
    /** Reference to the model call that produced this event */
    model_call_id?: string;
    /** Joined properties including restricted props */
    properties: Record<string, string | undefined>;
    /** Numeric metrics */
    metrics: Record<string, number | undefined>;
    /** Experiment assignment context */
    exp_assignment_context?: string;
    /** Feature flags enabled for this session */
    features?: Record<string, string>;
    /** Session identifier (auto-filled by SessionTelemetry) */
    session_id?: string;
    /** Copilot tracking ID for user-level attribution */
    copilot_tracking_id?: string;
    /** Client environment metadata */
    client?: ClientInfo;
}

/**
 * Restricted tool call telemetry event with sensitive content.
 * Maps to: copilot_cli.v0.RestrictedToolCall (restricted_tool_call.proto)
 */
declare interface HydroRestrictedToolCall {
    /** Timestamp when the event was created (ISO 8601 format) */
    created_at?: string;
    /** Links to the model call that requested this tool */
    model_call_id?: string;
    /** Tool name (hashed for privacy unless safe_for_telemetry) */
    tool_name: string;
    /** Tool call ID from the model response */
    tool_call_id: string;
    /** Result of tool execution */
    result_type: ToolResultType;
    /** Execution duration in milliseconds */
    duration_ms: number;
    /** Session identifier (auto-filled by SessionTelemetry) */
    session_id?: string;
    /** Copilot tracking ID */
    copilot_tracking_id?: string;
    /** Experiment assignment context */
    exp_assignment_context?: string;
    /** Feature flags enabled at time of this call */
    features?: Record<string, string>;
    /** Client environment metadata */
    client?: ClientInfo;
    /** Restricted content: tool call arguments */
    arguments?: string;
    /** Restricted content: tool call response content */
    content?: string;
    /** Restricted content: tool call error */
    error?: string;
}

/**
 * Generic bag-shaped telemetry event.
 * Maps to: copilot_cli.v0.Telemetry (telemetry.proto)
 */
declare interface HydroTelemetry {
    /** Event type/kind (e.g., "get_completion_with_tools_turn", "tool_call_executed") */
    kind: string;
    /** Timestamp when the event was created (ISO 8601 format) */
    created_at?: string;
    /** Reference to the model call that produced this event */
    model_call_id?: string;
    /** Non-restricted properties (key-value pairs) */
    properties: Record<string, string | undefined>;
    /** Numeric metrics */
    metrics: Record<string, number | undefined>;
    /** Experiment assignment context */
    exp_assignment_context?: string;
    /** Feature flags enabled for this session */
    features?: Record<string, string>;
    /** Session identifier (auto-filled by SessionTelemetry) */
    session_id?: string;
    /** Copilot tracking ID for user-level attribution */
    copilot_tracking_id?: string;
    /** Client environment metadata */
    client?: ClientInfo;
}

/**
 * Structured tool call telemetry event.
 * Maps to: copilot_cli.v0.ToolCall (tool_call.proto)
 */
declare interface HydroToolCall {
    /** Timestamp when the event was created (ISO 8601 format) */
    created_at?: string;
    /** Links to the model call that requested this tool */
    model_call_id?: string;
    /** Tool name (hashed for privacy unless safe_for_telemetry) */
    tool_name: string;
    /** Tool call ID from the model response */
    tool_call_id: string;
    /** Result of tool execution */
    result_type: ToolResultType;
    /** Execution duration in milliseconds */
    duration_ms: number;
    /** Session identifier (auto-filled by SessionTelemetry) */
    session_id?: string;
    /** Copilot tracking ID */
    copilot_tracking_id?: string;
    /** Experiment assignment context */
    exp_assignment_context?: string;
    /** Feature flags enabled at time of this call */
    features?: Record<string, string>;
    /** Client environment metadata */
    client?: ClientInfo;
}

export declare type ImageContent = z.infer<typeof ImageContentSchema>;

/**
 * Image content block with base64-encoded data
 */
declare const ImageContentSchema: z.ZodObject<{
    type: z.ZodLiteral<"image">;
    data: z.ZodString;
    mimeType: z.ZodString;
}, "strip", z.ZodTypeAny, {
    data: string;
    type: "image";
    mimeType: string;
}, {
    data: string;
    type: "image";
    mimeType: string;
}>;

/**
 * This event is temporary until we extract vision support from being internal to getCompletionWithTools.
 */
declare type ImageProcessingEvent = {
    kind: "image_processing";
    turn: number;
    imageProcessingMetrics: ImageProcessingMetrics;
};

declare type ImageProcessingMetrics = ({
    imagesExtractedCount: number;
    base64ImagesCount: number;
    imagesRemovedDueToSize: number;
    imagesRemovedDueToDimensions: number;
    imagesResized: number;
    imagesResolvedFromGitHubMCPCount: number;
    allImagesSendToLlm?: number;
} & Record<string, number>) | Record<string, never>;

/**
 * This event is temporary until we extract vision support from being internal to getCompletionWithTools.
 */
declare type ImageRemovalEvent = {
    kind: "images_removed";
    turn: number;
    largeImagesRemoved?: number;
    imagesRemoved: number;
};

/**
 * The inbound message that triggered an agent turn.
 * Captured from the AgentMessage delivered via write_agent or steering.
 */
declare interface InboundMessageInfo {
    /** Agent ID of the sender, if sent by another agent (undefined for steering messages) */
    fromAgentId?: string;
    /** The message content */
    content: string;
}

/** Infer the function signature for a client→server method. */
declare type InferMethod<M> = M extends {
    params: z_2.ZodTypeAny;
    result: z_2.ZodTypeAny;
} ? (params: z_2.infer<M["params"]>) => z_2.infer<M["result"]> | Promise<z_2.infer<M["result"]>> : M extends {
    params: z_2.ZodTypeAny;
} ? (params: z_2.infer<M["params"]>) => unknown : M extends {
    result: z_2.ZodTypeAny;
} ? () => z_2.infer<M["result"]> | Promise<z_2.infer<M["result"]>> : never;

/**
 * Configuration for infinite sessions with automatic context compaction and workspace persistence.
 * When enabled, sessions automatically manage context window limits through background compaction
 * and persist state to a workspace directory.
 */
declare interface InfiniteSessionConfig {
    /**
     * Whether infinite sessions are enabled.
     * @default true
     */
    enabled?: boolean;
    /**
     * Context utilization threshold (0.0-1.0) at which background compaction starts.
     * Compaction runs asynchronously, allowing the session to continue processing.
     * @default 0.80
     */
    backgroundCompactionThreshold?: number;
    /**
     * Context utilization threshold (0.0-1.0) at which the session blocks until compaction completes.
     * This prevents context overflow when compaction hasn't finished in time.
     * @default 0.95
     */
    bufferExhaustionThreshold?: number;
}

/**
 * A message to be injected into the conversation history after tool execution.
 * Used by tools like skills that need to add content to the conversation.
 */
declare type InjectedUserMessage = {
    /**
     * The content to inject as a user message.
     */
    content: string;
    /**
     * A source identifier for tracking where this message came from.
     * Used for filtering in the timeline display.
     * Example: "skill-pdf", "skill-code-reviewer"
     */
    source: string;
};

/**
 * In-memory transport that directly calls server methods without serialization.
 * This transport is used for servers that run in the same process as the client.
 */
declare class InMemoryClientTransport implements Transport {
    private server;
    onmessage?: (message: JSONRPCMessage) => void;
    onerror?: (error: Error) => void;
    onclose?: () => void;
    private serverTransport?;
    private closed;
    constructor(server: McpServer);
    /**
     * Set up bidirectional connection between client and server transports
     */
    start(): Promise<void>;
    send(message: JSONRPCMessage): Promise<void>;
    receive(message: JSONRPCMessage): void;
    close(): Promise<void>;
}

declare interface InMemoryTransportConfig {
    type: "memory";
    server: McpServer;
}

declare class InProcMCPTransport extends MCPTransport<ClientInfo_2> {
    private toolIdToClientInfo;
    /** Maps tool IDs (which may be truncated) to original MCP tool names for invocation. */
    private toolIdToOriginalName;
    /** Handler for URL elicitation required errors from tool invocations. */
    private urlElicitationHandler?;
    constructor(settings: RuntimeSettings, logger: RunnerLogger, cacheProviderTools?: boolean);
    /**
     * Set the handler for URL elicitation required errors.
     * This handler is called when a tool invocation returns a UrlElicitationRequiredError (-32042).
     */
    setUrlElicitationHandler(handler: ((serverName: string, elicitation: ElicitRequestURLParams) => Promise<ElicitResult>) | undefined): void;
    /**
     * Hook called when a provider (MCP client) is being refreshed.
     * Clears the tool ID mappings for this client.
     */
    protected onProviderRefresh(clientInfo: ClientInfo_2): Promise<void>;
    protected doInvokeTool(toolId: string, toolParams: any, toolCallId?: string, _customAgentName?: string): Promise<InvokeToolResponseData>;
    private doInvokeToolWithRetry;
    protected getProviderCacheKey(provider: ClientInfo_2): string;
    protected loadToolsFromProvider(clientInfo: ClientInfo_2): Promise<Record<string, BasicToolConfig>>;
    private static getToolIdFromClientAndToolName;
    private static getToolNameFromIdAndClientName;
}

/**
 * An installed plugin entry in user/project config.
 */
declare interface InstalledPlugin {
    /** Plugin name */
    name: string;
    /** Marketplace the plugin came from (empty string for direct repo installs) */
    marketplace: string;
    /** Version installed (if available) */
    version?: string;
    /** Installation timestamp */
    installed_at: string;
    /** Whether the plugin is currently enabled */
    enabled: boolean;
    /** Path where the plugin is cached locally */
    cache_path?: string;
    /** Source for direct repo installs (when marketplace is empty) */
    source?: MarketplaceSource;
}

declare type InstructionSource = {
    /** Unique identifier for this source (used for toggling) */
    id: string;
    /** Human-readable label */
    label: string;
    /** File path relative to repo or absolute for home */
    sourcePath: string;
    /** Raw content of the instruction file */
    content: string;
    /** Category of instruction source — used for merge logic */
    type: InstructionSourceType;
    /** Where this source lives — used for UI grouping */
    location: InstructionSourceLocation;
};

/** Where an instruction source lives — used for UI grouping */
declare enum InstructionSourceLocation {
    User = "user",
    Repository = "repository",
    WorkingDirectory = "working-directory"
}

/** Represents an individual instruction source before merging */
/** Category of instruction source — used for merge logic */
declare enum InstructionSourceType {
    Home = "home",
    Repo = "repo",
    Model = "model",
    VSCode = "vscode",
    NestedAgents = "nested-agents",
    ChildInstructions = "child-instructions"
}

export declare const INTEGRATION_ID: string;

/** Interaction type for CAPI telemetry, sent as X-Interaction-Type header. */
declare type InteractionType = 
/** Main agent loop processing a user message */
"conversation-agent"
/** Sub-agent invoked by the task tool (explore, code-review, custom agents) */
| "conversation-subagent"
/** Background operations (session naming, compaction) */
| "conversation-background"
/** First billable request in a user-initiated turn (set by PremiumRequestProcessor) */
| "conversation-user";

export declare namespace internal {
    export {
        NoopTelemetryService,
        scoreSessionRelevance,
        scoreAndSortSessions,
        HandoffStep,
        HandoffProgress,
        PruneResult,
        RelevanceScore,
        ScoredSessionMetadata,
        RELEVANCE_LABELS,
        LocalSessionManager
    }
}

/**
 * Information about a skill that was invoked during the session.
 * Used to preserve skill context across compaction.
 */
export declare interface InvokedSkillInfo {
    /** The skill name */
    name: string;
    /** Path to the SKILL.md file */
    path: string;
    /** The full content of the skill file */
    content: string;
    /** Turn number when the skill was invoked */
    invokedAtTurn: number;
}

declare type InvokeToolResponseData = {
    isToolError: boolean;
    content: any[];
    structuredContent?: unknown;
    /** When true, secret masking would have applied but was skipped. */
    secretMaskingSkipped?: boolean;
    /** When true, server config explicitly disabled secret masking. */
    secretMaskingDisabledForServer?: boolean;
};

declare interface IOnRequestErrorProcessor extends IToJson {
    /**
     * Called before an error is rethrown by the client. The processor may modify
     * the error in place.
     */
    preErrorThrow(error: unknown): Promise<void>;
    /**
     * Called when a request to the model fails. The processor should not modify
     * the error.
     */
    onRequestError(context: OnRequestErrorContext): Promise<OnRequestErrorResult | void>;
}

declare interface IOnStreamingChunkProcessor extends IToJson {
    /**
     * Called when a streaming chunk is received.
     */
    onStreamingChunk(context: StreamingChunkContext): void;
}

declare interface IPostRequestProcessor extends IToJson {
    /**
     * Called after a successful request to the model, before the model_call_success event.
     * Processors can inspect the response and throw an error to trigger retry logic
     * via onRequestError processors.
     *
     * - Any {@link Event}s emitted by this method will be re-emitted by the completion with tools call.
     * - To trigger a retry, throw an error that an {@link IOnRequestErrorProcessor} can handle.
     */
    postRequest(context: PostRequestContext): AsyncGenerator<Event_2, PostRequestResult | void>;
}

declare interface IPostToolExecutionProcessor extends IToJson {
    /**
     * Called after a tool has been executed. The processor should not
     * modify the tool result.
     */
    postToolExecution(context: PostToolExecutionContext): Promise<void>;
}

declare interface IPreRequestProcessor extends IToJson {
    /**
     * Called before a request (including retries of requests) is made to the model.
     *
     * - Any {@link Event}s emitted by this method will be re-emitted by the completion with tools call.
     */
    preRequest(context: PreRequestContext): AsyncGenerator<Event_2>;
}

declare interface IPreToolsExecutionProcessor extends IToJson {
    /**
     * Called before any tool calls are executed.
     */
    preToolsExecution(context: PreToolsExecutionContext): Promise<PreToolsExecutionResult>;
}

/**
 * The complete settings type that represents all possible configuration options.
 */
declare interface IRuntimeSettings {
    version: string;
    clientName: string;
    github: {
        serverUrl: string;
        uploadsUrl: string;
        downloadsUrl: string;
        secretScanningUrl: string;
        host: string;
        hostProtocol: string;
        token: string;
        user: {
            name: string;
            email: string;
            actorId?: number;
            actorLogin?: string;
        };
        owner: {
            id: number;
            name: string;
        };
        repo: {
            id: number;
            name: string;
            branch: string;
            commit: string;
            readWrite: boolean;
            signCommits: boolean;
        };
        pr: {
            commitCount?: number;
        };
    };
    problem: {
        statement: string;
        contentFilterMode?: ContentFilterMode;
        action: AgentAction;
        customAgentName?: string;
    };
    service: {
        instance: {
            id: string;
        };
        /**
         * - Options beyond `model` are currently only respected
         * when going through `RuntimeHarness` methods.
         * - The value of this {@link ClientOptions.model} is NOT
         * the name of a model, it is AgentName:ModelName.
         */
        agent: ClientOptions;
        /**
         * Settings for tools that are used by the agent. Refer to the
         * source/documentation for each tool for their specific settings.
         */
        tools: {
            [toolName: string]: {
                [key: string]: unknown;
            };
        };
        callback: {
            url: string;
        };
    };
    api: {
        aipSweAgent: {
            token: string;
        };
        anthropic: {
            key: string;
            baseUrl: string;
        };
        openai: {
            baseUrl: string;
            apiKey: string;
            azureKeyVaultUri: string;
            azureSecretName: string;
            azure: {
                url: string;
                apiVersion: string;
                /** Bearer token for Azure AD authentication. When set, used instead of API key or managed identity. */
                bearerToken?: string;
            };
        };
        copilot: {
            url: string;
            integrationId: string;
            hmacKey: string;
            azureKeyVaultUri: string;
            token: string;
            useSessions: boolean;
            useAsyncSessions: boolean;
            sessionId: string;
            previousSessionIds: string[];
            /**
             * The W3C Trace Context traceparent header value for distributed tracing.
             * Format: {version}-{trace-id}-{parent-id}-{trace-flags}
             * Example: 00-0af7651916cd43dd8448eb211c80319c-b7ad6b7169203331-01
             */
            traceParent: string;
        };
        github: {
            /**
             * The GITHUB_PERSONAL_ACCESS_TOKEN that is passed to `github-mcp-server` when it is
             * started. (Currently only supported in the `cpd` entry point.)
             */
            mcpServerToken: string;
        };
    };
    blackbird: {
        mode: "initial-search" | "tool";
        backfillScoreThreshold?: number;
        repoNwo?: string;
        /**
         * The auth object contains the credentials for Blackbird's Metis API.
         * - modelBasedRetrievalToken: Token for model-based retrieval.
         * - metisApiKey: API key for Metis.
         */
        auth: {
            modelBasedRetrievalToken: string;
            metisApiKey: string;
        };
    };
    swebench_base_commit?: string;
    trajectory: {
        outputFile: string;
    };
    logs: {
        eventsLogDir: string;
    };
    job: {
        nonce?: string;
        eventType?: string;
    };
    onlineEvaluation: {
        disableOnlineEvaluation?: boolean;
        enableOnlineEvaluationOutputFile?: boolean;
    };
    /**
     * Test-only: Pre-formatted memories to inject into the agent's context.
     * Used by eval tests to seed memories without file I/O or cloud API calls.
     * When set, getMemoriesPrompt() returns this value directly.
     */
    testInjectedMemories?: string;
    tools: {
        bash: {
            /**
             * The default timeout for bash commands in seconds. If undefined, a default of 120 seconds (2 minutes) is used.
             */
            defaultTimeout?: number;
        };
        /**
         * Settings shared by all validation tools.
         */
        validation?: {
            /**
             * The shared timeout budget for all the validation tools in seconds. If undefined, a default of 180 seconds is used.
             * This timeout is shared across all validation tools, and once the total time spent exceeds this budget, no further validation tools will be run.
             * A validation tool will be cancelled if it is in progress when the budget is exceeded.
             */
            timeout?: number;
            /**
             * The timeout for the dependabot checker in seconds. Default is 240 seconds.
             */
            dependabotTimeout?: number;
            /**
             * Settings for the CodeQL security checker tool.
             * When enabled is false, the tool will not run even if feature flags are enabled.
             * When enabled is true or undefined, the tool's availability will be determined by its feature flags.
             */
            codeql?: {
                enabled?: boolean;
            };
            /**
             * Settings for the code review (Autofind) tool.
             * When enabled is false, the tool will not run even if feature flags are enabled.
             * When enabled is true or undefined, the tool's availability will be determined by its feature flags.
             */
            codeReview?: {
                enabled?: boolean;
            };
            /**
             * Settings for the dependency/advisory checker tool and the corresponding post-commit hook.
             * When enabled is false, the tool will not run even if feature flags are enabled.
             * When enabled is true or undefined, the tool's availability will be determined by its feature flags.
             * The validation settings for the dependency/advisory checker tool control the availability of
             * DependaBot in the agent's toolbox and with respect its use post-commit.
             */
            advisory?: {
                enabled?: boolean;
            };
            /**
             * Settings for the secret scanning hook.
             * When enabled is false, the hook will not run even if feature flags are enabled.
             * When enabled is true or undefined, the hook's availability will be determined by its feature flags.
             * Note: the secret scanning hook is a pre-commit and pre-PR description hook that scans for secrets
             * before code is committed, and before PR descriptions are created/changed.
             */
            secretScanning?: {
                enabled?: boolean;
            };
        };
        /**
         * Settings for handling large tool outputs.
         */
        largeOutput?: {
            /**
             * Maximum size in bytes before output is written to a temp file. Default is 50KB.
             */
            maxSizeBytes?: number;
            /**
             * Directory to write temp files to. Default is os.tmpdir().
             */
            outputDir?: string;
        };
    };
    /**
     * Snippy blocking mode controls how the agent handles code that matches public code.
     * This is set by the organization's Copilot policy "Suggestions matching public code".
     *
     * Values:
     * - "blocked": Policy says block public code. Uses hard blocking (if FF enabled).
     * - "allowed": Policy says allow public code. Uses soft blocking (if FF enabled).
     * - undefined: Falls back to "allowed" behavior.
     */
    snippyBlockingMode: "allowed" | "blocked";
    /**
     * The set of feature flags passed to the agent runtime process by sweagentd.
     *
     * Only flags listed in internal/launcher/runtime_feature_flags.go are passed
     * to the runtime.
     *
     * To add a new flag:
     * - Define it in accordance with the feature flag docs: https://thehub.github.com/epd/engineering/products-and-services/dotcom/features/feature-flags/
     * - Add it to runtime_feature_flags.go
     * - Check whether it exists in the following object.
     *
     * Read a feature flag value with: @see isFeatureFlagEnabled
     *
     *    if (isFeatureFlagEnabled(settings, 'copilot_swe_agent_flag_name')) {
     *    }
     *
     * Report feature flag values in telemetry with: @see featureFlagsAsString in
     * a property named @see FEATURE_FLAGS_TELEMETRY_PROPERTY_NAME.
     *
     * NOTE: feature flag names may be visible to the user in logs or other output.
     */
    featureFlags: {
        [key: string]: boolean;
    };
    /**
     * EXP experiment configuration
     */
    experiments: {
        [key: string]: string;
    };
    /**
     * How many ms the runtime/the thing hosting the runtime has available to run
     * before it is considered to have timed out.
     */
    timeoutMs: number;
    /**
     * The time when the runtime/the thing hosting the runtime started, in ms since epoch.
     * May not be 100% accurate. Not typically set by hand.
     */
    startTimeMs: number;
    /**
     * Custom configuration directory for the session.
     * When set, overrides the default Copilot config directory (~/.copilot or $COPILOT_HOME).
     */
    configDir: string;
    /**
     * LSP-specific settings.
     */
    lsp?: {
        clientName: string;
    };
}

/**
 * Returns true if the DEBUG or COPILOT_AGENT_DEBUG environment variable is set to 1 or true (case-insensitive).
 * If additionalVariables are provided, they are also checked.
 * @param additionalVariables Additional environment variables to check for debug logging.
 */
export declare function isDebugEnvironment(...additionalVariables: string[]): boolean;

/**
 * Something which must have an implementation of `toJSON()`. This can be used
 * for classes whose instances will likely be used with `JSON.stringify()` to avoid
 * any issues with stringification such as circular references or non-enumerable properties.
 *
 * More information on `toJSON()`: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify#:~:text=If%20the%20value%20has%20a%20toJSON()%20method%2C%20it%27s%20responsible%20to%20define%20what%20data%20will%20be%20serialized.
 */
declare interface IToJson {
    toJSON(): string;
}

declare type LargeOutputOptions = {
    maxOutputSizeBytes: number;
    outputDir?: string;
};

/**
 * Configuration for handling large tool outputs.
 */
declare interface LargeToolOutputConfig {
    /**
     * Whether large output handling is enabled. Default is true.
     */
    enabled?: boolean;
    /**
     * Maximum size in bytes before output is written to a temp file. Default is 50KB.
     */
    maxSizeBytes?: number;
    /**
     * Directory to write temp files to. Default is os.tmpdir().
     */
    outputDir?: string;
}

/**
 * Session class with event sourcing
 */
export declare class LocalSession extends Session<LocalSessionMetadata> {
    private callback;
    private isProcessing;
    private itemQueue;
    private premiumRequestProcessor;
    private immediatePromptProcessor;
    private compactionProcessor;
    /** Embedding-based instruction retrieval processor (active when DYNAMIC_INSTRUCTIONS_RETRIEVAL flag is on). */
    private embeddingRetrievalProcessor?;
    /** Cached embedding provider, reused across index rebuilds within the same session. */
    private cachedEmbeddingProvider?;
    /** Dirty flag: when true the embedding instruction index needs to be (re)built. */
    private instructionIndexDirty;
    /** Guard to prevent concurrent index rebuilds. */
    private instructionIndexRebuilding;
    /** Tracks the skills cache generation at last index build to detect skill changes. */
    private lastSkillsCacheGeneration;
    private abortController?;
    private activeSubAgents;
    mcpHostCache: McpHostCache;
    /** Per-session telemetry sender, set by LocalSessionManager after session creation */
    protected sessionTelemetry?: TelemetrySender & {
        dispose(): void;
    };
    /** Dispose per-session telemetry and clear the telemetry sender */
    dispose(): void;
    private modelListCache;
    private hasEmittedModelResolutionInfo;
    private warnedUnknownTools;
    private sessionWorkspace;
    private workspaceEnabled;
    private lastTodoContent;
    private lastPlanUpdateTurn;
    private currentTurn;
    private static readonly PLAN_REMINDER_TURN_THRESHOLD;
    private cachedRepoMemories;
    private compactionCancelled;
    private manualCompactionAbortController;
    /** Shell tool context owned by this session, created lazily during tool init. */
    private shellContext;
    /**
     * Creates a new Session instance.
     *
     * In practice, use SessionManager.createSession() to create sessions and SessionManager.getSession() / SessionManager.getLastSession() to retrieve existing sessions.
     *
     * @param options - Configuration options for the session including model provider, tools, hooks, environment settings, and metadata (sessionId, startTime, modifiedTime). If metadata is not provided, new values are generated.
     */
    constructor(options?: SessionOptions);
    /**
     * Normalize infiniteSessions config from boolean or object to a full config object.
     */
    private normalizeInfiniteSessionsConfig;
    /**
     * Update workspace summary from user message content.
     */
    private updateWorkspaceSummary;
    /**
     * Initialize workspace - load existing or create new.
     * Workspaces are always created when infinite sessions are enabled.
     */
    private initializeWorkspace;
    /**
     * Update the workspace context based on current workspace state.
     * This context is used in system prompts to inform the agent about workspace files.
     */
    private updateWorkspaceContext;
    /**
     * Updates session options after creation.
     * This method allows selectively updating configuration options without recreating the session.
     * Only the provided options will be updated; omitted options remain unchanged.
     *
     * @param options - Partial session options to update
     *
     * @example
     * ```typescript
     * // Update multiple options at once
     * session.updateOptions({
     *   logger: fileLogger,
     *   mcpServers: mcpConfig,
     *   customAgents: loadedAgents
     * });
     *
     * // Or use convenience methods for single updates
     * session.setAuthInfo(newAuthInfo); // Preferred for auth
     * session.setSelectedModel(newModel); // Preferred for model
     * ```
     */
    updateOptions(options: Partial<UpdatableSessionOptions>): void;
    /** After compaction, reset the embedding dedup set so instructions can be re-injected. */
    protected onCompactionApplied(): void;
    getMetadata(): LocalSessionMetadata;
    /**
     * Get the current workspace, if any.
     */
    getWorkspace(): Workspace | null;
    /**
     * Check if workspace features are enabled.
     */
    isWorkspaceEnabled(): boolean;
    /**
     * Get the workspace path for this session.
     * Returns null if workspace features are not enabled.
     * Returns the path even if workspace.yaml doesn't exist yet (for prompt context).
     */
    getWorkspacePath(): string | null;
    /**
     * Get the number of checkpoints (compaction summaries) in the workspace.
     */
    getCheckpointCount(): number;
    /**
     * Update the session's summary (AI-generated name).
     * Updates both in-memory workspace and persists to disk.
     * Will not overwrite a manually set name.
     */
    updateSessionSummary(summary: string): Promise<void>;
    /**
     * Rename the session (set custom name).
     * Updates both in-memory workspace and persists to disk.
     * Emits session.title_changed event so UI can update.
     */
    renameSession(name: string): Promise<void>;
    /**
     * List checkpoints with their titles for context injection.
     */
    listCheckpointTitles(): Promise<{
        number: number;
        title: string;
        filename: string;
    }[]>;
    /**
     * Check if a plan.md file exists in the workspace.
     */
    hasPlan(): boolean;
    getPlanPath(): string | null;
    /**
     * Read the plan.md content from the workspace.
     * Returns null if workspace is not enabled or plan doesn't exist.
     */
    readPlan(): Promise<string | null>;
    /**
     * Get plan.md content for post-compaction message.
     * Returns null if workspace is not enabled or plan doesn't exist.
     */
    private getPlanContentForCompaction;
    /**
     * Write plan content to the workspace plan.md file.
     */
    writePlan(content: string): Promise<void>;
    /**
     * Delete the workspace plan.md file.
     */
    deletePlan(): Promise<void>;
    /**
     * List files in the workspace files directory.
     */
    listWorkspaceFiles(): Promise<string[]>;
    /**
     * Read a file from the workspace files directory.
     */
    readWorkspaceFile(filePath: string): Promise<string>;
    /**
     * Write a file to the workspace files directory.
     */
    writeWorkspaceFile(filePath: string, content: string): Promise<void>;
    /**
     * Update the last todo content (called when update_todo tool is used).
     * This content will be included in post-compaction messages.
     */
    setLastTodoContent(content: string | null): void;
    /**
     * Get the last todo content.
     */
    getLastTodoContent(): string | null;
    /**
     * Check if a plan update reminder should be shown.
     * Returns true if:
     * - Workspace is enabled
     * - Plan.md hasn't been updated in the last N turns
     * - A plan.md file exists (we only remind to update, not create)
     */
    shouldShowPlanReminder(): boolean;
    /**
     * Get the plan reminder message to inject into user prompts.
     * Returns null if no reminder should be shown.
     */
    getPlanReminderMessage(): string | null;
    /**
     * Mark plan as recently updated (resets the reminder timer).
     * Called when plan.md is detected to be written.
     */
    markPlanUpdated(): void;
    /**
     * Handle a subagent_session_boundary event by emitting the appropriate
     * subagent lifecycle session event (started/completed/failed).
     */
    private handleSubagentBoundary;
    /**
     * Emit telemetry when agent writes to a workspace file (plan.md or files/).
     */
    private emitWorkspaceFileTelemetry;
    /**
     * Emit telemetry when agent reads a workspace file (plan.md, checkpoints, or files/).
     */
    private emitWorkspaceFileReadTelemetry;
    /**
     * Ensure workspace exists for this session.
     * Creates workspace.yaml and directory structure if needed.
     */
    ensureWorkspace(context?: WorkspaceContext): Promise<Workspace>;
    /**
     * Persist a compaction summary as a checkpoint.
     * Called automatically when compaction completes.
     * Returns the checkpoint number and path after the file is created.
     */
    private persistCompactionCheckpoint;
    /**
     * Truncate workspace checkpoints to align with the current session history.
     * Used after rollback to remove compaction checkpoints created after the rollback point.
     */
    truncateWorkspaceCheckpoints(keepCount: number): Promise<void>;
    /**
     * Sends a message to the session and executes the agentic loop.
     * Messages can be queued or sent immediately during an ongoing turn.
     *
     * @param options - Send options including prompt, attachments, and mode
     * @param options.prompt - The prompt text to send
     * @param options.attachments - Optional file/directory attachments
     * @param options.mode - "enqueue" (default) adds to queue and processes when ready, "immediate" injects during current turn
     * @param options.abortController - Optional AbortController to abort the send operation
     * @returns A Promise that resolves when the message has been queued or processed
     *
     * @example
     * ```typescript
     * // Send a message (default enqueue mode)
     * session.send({
     *   prompt: "What files are in this directory?",
     *   attachments: [{ type: "directory", path: "/path/to/dir" }]
     * });
     *
     * // Send immediate message during processing
     * session.send({
     *   prompt: "Continue with that approach",
     *   mode: "immediate"
     * });
     * ```
     */
    send(options: SendOptions): Promise<void>;
    /**
     * Send a system notification to the agent.
     *
     * Mid-turn: the event is emitted directly and the resulting chat message
     * is handed to the ImmediatePromptProcessor so the current model call
     * includes it — no branching needed inside the processor.
     *
     * Idle: routes through `send()` → agenticLoop, which emits the event and
     * starts a new turn.
     *
     * System notifications are hidden from the timeline, non-billable, and
     * excluded from session snapshots.
     */
    sendSystemNotification(message: string, kind: SystemNotificationKind): void;
    /**
     * Core logic for adding an item to the queue.
     *
     * @param item - The queued item (either a command or message)
     * @param prepend - If true, adds to the front of the queue (for priority messages)
     */
    private addItemToQueue;
    /**
     * Enqueue any item (command or message) to be processed after the current agentic work completes.
     * Items are processed in FIFO order.
     *
     * If the session is not currently processing, this will also kick off queue processing.
     * This ensures that items transferred from another session (e.g., after /clear)
     * actually get executed even if there are no messages to trigger processing.
     *
     * @param item - The queued item (either a command or message)
     */
    enqueueItem(item: QueuedItem): void;
    /**
     * Enqueue a slash command to be executed after the current agentic work completes.
     * Commands are processed in FIFO order alongside user messages.
     *
     * If the session is not currently processing, this will also kick off queue processing.
     * This ensures that commands transferred from another session (e.g., after /clear)
     * actually get executed even if there are no messages to trigger processing.
     *
     * @param command - The full command string including the slash, e.g., "/compact" or "/model gpt-4"
     */
    enqueueCommand(command: string): void;
    /**
     * Enqueue a user message item to be processed later.
     * This is a utility for creating properly typed message queue items.
     * Uses addItemToQueue internally for consistent mode normalization.
     *
     * @param options - The send options for the message
     * @param prepend - If true, adds to the front of the queue (for priority messages)
     */
    private enqueueUserMessage;
    /**
     * Process the item queue, handling both messages and commands in FIFO order.
     */
    private processQueue;
    abort(): Promise<void>;
    /**
     * Check if the session is currently in a state where it can be aborted.
     * Returns true if there's an active abort controller that hasn't been aborted yet.
     * This is important for queued operations where the CLI may not have direct access
     * to the abort controller (e.g., when messages are processed from the queue).
     */
    isAbortable(): boolean;
    /**
     * TODO(queueing-improvements)
     * If we support steering or queuing for remote sessions, these will need
     * to become async, but since we don't right now, it is MUCH easier for the UI
     * to have them be synchronous.
     */
    getPendingSteeringMessagesDisplayPrompt(): ReadonlyArray<string>;
    getPendingQueuedMessagesDisplayPrompt(): ReadonlyArray<string>;
    /**
     * Get pending queued items for UI display.
     * Returns both messages and commands with their display text.
     */
    getPendingQueuedItems(): ReadonlyArray<PendingQueuedItem>;
    /**
     * @deprecated Use getPendingQueuedItems() instead for proper display of mixed queue items.
     */
    getPendingQueuedMessages(): ReadonlyArray<string>;
    /**
     * Clear all pending steering and queued items (messages and commands).
     * Used internally when the agentic loop is aborted (e.g., user rejected a tool permission).
     */
    clearPendingItems(): void;
    /**
     * @deprecated Use clearPendingItems() instead.
     */
    clearPendingMessages(): void;
    /**
     * Compacts the conversation history into a single summary message.
     * This method is used by the /compact slash command for manual compaction.
     * Uses the same system message and tools as the core agent loop for consistency.
     *
     * @returns Promise that resolves with compaction results
     * @throws Error if compaction fails or prerequisites aren't met
     */
    compactHistory(): Promise<CompactionResult>;
    /**
     * Process queued items (messages and commands) through the agentic loop.
     * Used by send() and after manual compaction completes.
     * No-op if already processing or queue is empty.
     */
    private processQueuedItems;
    /**
     * Handle background compaction completion callback.
     * This is called immediately when background compaction finishes, allowing the session
     * to emit events and update state without waiting for the next preRequest call.
     */
    private handleCompactionComplete;
    /**
     * Cancels any in-progress background compaction.
     *
     * This should be called when the session state is being rolled back (e.g., Esc Esc),
     * to prevent the compaction result from being applied after the rollback.
     */
    cancelBackgroundCompaction(): void;
    abortManualCompaction(): boolean;
    /**
     * Sends a notification to the agent when a background agent completes.
     */
    private sendBackgroundAgentCompletionNotification;
    /**
     * Sends a notification to the model when a multi-turn background agent
     * finishes a turn and enters idle state (waiting for write_agent messages).
     */
    private sendBackgroundAgentIdleNotification;
    /**
     * Sends a notification to the agent when a background shell command completes.
     */
    private sendBackgroundShellCompletionNotification;
    /**
     * Sends a notification to the agent when a detached shell completes.
     */
    private sendDetachedShellCompletionNotification;
    /**
     * Core MCP host initialization used by both ensureMcpLoaded() and initializeMcpHost().
     * Creates the McpHost, wires callbacks, and starts servers. Extracted so that
     * ensureMcpLoaded() (defined early in the class) can delegate here without
     * referencing private fields that tsgo cannot resolve across large class spans.
     */
    private _doInitializeMcp;
    /**
     * Initialize MCP host if configured
     */
    private initializeMcpHost;
    /**
     * Get connected IDE info if available.
     * Returns undefined if no IDE is connected.
     */
    private getConnectedIdeInfo;
    /**
     * Initializes the session and validates tool filter configuration.
     * This method should be called after the session is fully configured (auth, model, MCP servers)
     * but before the first message is sent. It eagerly builds and caches the tool definitions and system message
     * so they are available for features like /context that need them before the first message.
     * It will also emit warnings for any unknown tool names specified in availableTools or excludedTools.
     *
     * @returns Promise that resolves when initialization and validation is complete
     */
    initializeAndValidateTools(): Promise<void>;
    protected getOrCreateShellConfig(): ShellConfig;
    /**
     * Shared method to build settings and initialize tools.
     * Used by both initializeAndValidateTools() and runAgenticLoop().
     *
     * @param problemStatement - Optional problem statement for settings (used by runAgenticLoop)
     * @returns Settings and tools, or undefined if initialization failed
     */
    private buildSettingsAndTools;
    /**
     * Resolve an ExP-backed feature flag with a timeout guard.
     *
     * Delegates to {@link FeatureFlagService.getFlagWithExpOverrideTimeout} when
     * the service is available. When it is absent (common in CLI/prompt-mode
     * paths where it isn't threaded into SessionOptions), falls back to the
     * static feature flag.
     */
    private resolveExpFlag;
    private resolveIsDynamicRetrievalEnabled;
    private resolveIsToolSearchEnabled;
    /**
     * Determine whether embedding retrieval should be enabled for this turn,
     * and pre-load the data that each enabled index type will embed.
     *
     * Returns an object with:
     * - enabled: true if any index type is active
     * - indexTypes: Set of InstructionSource types to index (consumed by createSkillTool for terse descriptions)
     * - entries: Map from each enabled index type to its pre-loaded data,
     *   so initEmbeddingRetrieval can index without re-fetching
     *
     * Thresholds:
     *   - "skill": enabled when skills > 10
     *   - "mcp-server": enabled when deferred MCP instructions exist
     *
     * If neither condition is met, returns { enabled: false } with empty collections.
     * Logs and emits telemetry for each decision so operators can diagnose.
     */
    private shouldEnableEmbeddingRetrieval;
    /**
     * Build or rebuild the embedding-based instruction retrieval index.
     *
     * Uses the pre-loaded data from `shouldEnableEmbeddingRetrieval` to avoid
     * redundant skill loading and MCP instruction fetching. Skips the rebuild
     * when the index is already up-to-date or another rebuild is in progress.
     */
    private initEmbeddingRetrieval;
    private isToolEnabled;
    /**
     * Validates external tool name clashes with built-in tools and returns the set of
     * built-in tool names that should be removed because they are explicitly overridden.
     * Throws if an external tool clashes with a built-in tool without setting overridesBuiltInTool.
     */
    protected validateExternalToolOverrides(builtInNames: Set<string>): Set<string>;
    /** Build Tool[] from the current externalToolDefinitions. */
    private buildExternalTools;
    /**
     * Validates tool filter configuration and emits info about disabled tools and warnings for unknown tool names.
     */
    private validateToolFilters;
    /**
     * Filters tools based on the selected custom agent, if any.
     *
     * @param allTools - All available tools
     * @returns Filtered tools based on selected custom agent restrictions
     */
    private filterToolsForSelectedAgent;
    private invokeCallbacks;
    /** Emit model_resolution_info telemetry once per session. */
    private emitModelResolutionInfo;
    private getModelList;
    /**
     * Creates a client instance with current session configuration.
     * Extracted from runAgenticLoop to allow reuse for standalone LLM calls.
     *
     * @returns Promise that resolves to a configured client and settings
     * @throws Error if session was not created with authentication info or custom provider
     */
    private getClient;
    /**
     * Generates a summarized version of the conversation context suitable for delegation.
     * Uses an LLM to create a concise summary of the existing conversation that fits
     * within size constraints (20k characters).
     *
     * @returns Promise that resolves to a markdown summary of the session context
     * @throws Error if session was not created with authentication info or if summarization fails
     */
    getContextSummary(): Promise<string>;
    /**
     * Executes the full agentic loop for a given prompt.
     * This method orchestrates the complete AI agent workflow including:
     * - Running hooks (userPromptSubmitted, sessionStart, preToolUse, postToolUse, sessionEnd)
     * - Building and sending the prompt to the language model
     * - Processing model responses and tool calls
     * - Executing tools and feeding results back to the model
     * - Emitting events throughout the process
     *
     * This is the core method that powers the `send()` functionality.
     * Most users should call `send()` instead, which handles queuing and mode selection.
     *
     * @param prompt - The user's prompt/instruction text
     * @param attachments - Optional array of file or directory attachments to include with the prompt
     * @returns A Promise that resolves when the agent loop completes
     * @throws Error if the session was not created with authentication info/custom provider or model
     */
    private runAgenticLoop;
    /**
     * Waits for all pending background tasks (agents and shell commands) to complete.
     * Applies an overall timeout to prevent the CLI from hanging indefinitely.
     *
     * Default timeout is 10 minutes. Override with COPILOT_TASK_WAIT_TIMEOUT_SECONDS.
     */
    waitForPendingBackgroundTasks(): Promise<void>;
}

/**
 * SessionManager subclass that persists sessions to JSONL files.
 * Uses SessionEventState for all file system operations.
 */
declare class LocalSessionManager implements SessionManager<LocalSessionMetadata, LocalSession>, Disposable_2 {
    private sessionWriters;
    private activeSessions;
    private inUseLocks;
    private copilotVersion;
    private flushDebounceMs;
    private settings?;
    /** Additional plugins from --plugin-dir, merged with config plugins for hook loading */
    additionalPlugins: InstalledPlugin[];
    private readonly telemetryService;
    private readonly altScreen;
    private readonly enableRestrictedTelemetry?;
    private sessionStoreUnsubscribe?;
    private _startupPrompts;
    private pendingRepoHooks;
    /**
     * Prompt messages from hook configs to auto-submit at session start.
     * Only populated for new sessions, not resumed ones — resuming continues
     * an existing conversation where startup prompts have already run.
     */
    get startupPrompts(): readonly string[];
    private featureFlagService?;
    private readonly telemetrySafeCliOptions;
    private terminalColors?;
    readonly otel?: OtelLifecycle;
    constructor({ version, flushDebounceMs, settings, telemetryService, featureFlagService, altScreen, enableRestrictedTelemetry, telemetrySafeCliOptions, terminalColors, }: LocalSessionManagerOptions);
    /** Set detected terminal colors for telemetry (called after OSC color detection) */
    setTerminalColors(colors: TerminalColors | undefined): void;
    dispose(): Promise<void>;
    /**
     * Get effective settings, preferring options.configDir over this.settings
     */
    private getEffectiveSettings;
    /**
     * Create a new file-backed session
     */
    createSession(options?: SessionOptions, emitStart?: boolean): Promise<LocalSession>;
    private getHooksDir;
    /**
     * Load all hooks (user, repo, plugin), respecting disableAllHooks repo config.
     * When deferRepoHooks is true, repo config and repo hook configs are skipped —
     * only user hooks and global config are loaded. Used pre-trust to avoid reading
     * untrusted repo content.
     */
    private loadAllHooks;
    private loadHooks;
    /** Wire session store live tracking if the SESSION_STORE feature flag is enabled. */
    private wireSessionStoreTracking;
    /**
     * Loads deferred repo-level hooks after folder trust has been confirmed.
     * Must be called once after trust is granted. Idempotent — subsequent calls return [].
     *
     * @param session - The session to apply hooks to
     * @returns Array of repo-level startup prompts (empty on resume or if disableAllHooks)
     */
    loadDeferredRepoHooks(session: LocalSession): Promise<string[]>;
    /**
     * Get existing session by ID
     * ALWAYS loads from disk to ensure freshness
     * Supports both JSONL and legacy JSON formats
     *
     * @throws Error if the session exists but cannot be parsed (e.g., unknown event types, corrupt data)
     * @returns The session, or undefined if the session does not exist
     */
    getSession(options: SessionOptions & {
        sessionId: string;
    }, resume?: boolean): Promise<LocalSession | undefined>;
    /**
     * Get the most recently updated session
     */
    getLastSession(options?: Omit<SessionOptions, "sessionId">): Promise<LocalSession | undefined>;
    /**
     * Get the ID of the most recently updated session
     */
    getLastSessionId(): Promise<string | undefined>;
    /**
     * Find a local session by its Mission Control task ID.
     * Scans workspace.yaml files across all local sessions for a matching mc_task_id.
     * Returns the session ID if found, or undefined if no match.
     */
    findSessionByTaskId(taskId: string): Promise<string | undefined>;
    saveSession(session: Session): Promise<void>;
    private loadSession;
    /**
     * Load a legacy JSON session and convert it to LocalSession
     * This creates a session.import_legacy event to preserve the legacy data
     */
    private loadLegacySession;
    /**
     * List all sessions by reading from disk
     */
    listSessions(): Promise<LocalSessionMetadata[]>;
    /**
     * List sessions sorted by relevance to the current working directory context.
     * Sessions matching the current repo+branch appear first, followed by same repo,
     * then same gitRoot or cwd, then all others sorted by time.
     *
     * @param currentContext The current working directory context to compare against
     */
    listSessionsSortedByRelevance(currentContext?: WorkingDirectoryContext): Promise<LocalSessionMetadata[]>;
    /**
     * List sessions with their relevance scores for grouping in the UI.
     * Sessions are sorted by score (descending), then by modifiedTime (descending).
     *
     * @param currentContext The current working directory context to compare against
     */
    listSessionsWithScores(currentContext?: WorkingDirectoryContext): Promise<ScoredSessionMetadata<LocalSessionMetadata>[]>;
    /**
     * Delete a session from disk
     */
    deleteSession(sessionId: string): Promise<void>;
    /**
     * Register an in-use lock for a session directory and check whether
     * other processes already hold locks on it.
     */
    private registerSessionLock;
    /**
     * Close a session: emit shutdown, flush/persist pending data, and release resources.
     * After this call the session is disposed and removed from active management.
     */
    closeSession(sessionId: string): Promise<void>;
    /**
     * Get the sessions directory path (for debugging/logging)
     */
    getSessionsDirectory(): string;
    /**
     * Get the disk size of each session's workspace directory.
     *
     * @returns Map of sessionId to size in bytes
     */
    getSessionSizes(): Promise<Map<string, number>>;
    /**
     * Delete multiple sessions, cleaning up workspace directories and legacy event files.
     *
     * @param sessionIds - Array of session IDs to delete
     * @returns Map of sessionId to bytes freed
     */
    bulkDeleteSessions(sessionIds: string[]): Promise<Map<string, number>>;
    /**
     * Find and optionally delete sessions older than a specified number of days.
     *
     * @param olderThanDays - Minimum age in days for a session to be eligible for pruning
     * @param options.dryRun - If true, only report what would be deleted (default: false)
     * @param options.includeNamed - If true, include sessions with a custom name (default: false)
     * @returns PruneResult with details about deleted/skipped sessions
     */
    pruneOldSessions(olderThanDays: number, options?: {
        dryRun?: boolean;
        includeNamed?: boolean;
        excludeSessionIds?: string[];
    }): Promise<PruneResult>;
    /**
     * Handoff a remote session to local by validating repository, checking git state,
     * and creating a local session with the remote session's events.
     * This is an async generator that yields progress updates.
     *
     * @param remoteSession - The remote session to handoff
     * @param sessionOptions - Optional session options to pass to createSession
     * @yields HandoffProgress updates for each step
     * @returns A new local session with the same events
     * @throws Error if validation fails or git operations fail
     */
    handoffSession(remoteSession: Session, sessionOptions?: SessionOptions): AsyncGenerator<HandoffProgress, LocalSession, undefined>;
    /**
     * Helper method to fetch from git remote
     */
    private gitFetch;
}

declare type LocalSessionManagerOptions = {
    version?: string;
    flushDebounceMs?: number;
    settings?: RuntimeSettings;
    telemetryService: TelemetryService;
    featureFlagService?: FeatureFlagService;
    /** Whether the CLI is running in alt-screen mode */
    altScreen?: boolean;
    enableRestrictedTelemetry?: boolean;
    /** Pre-extracted telemetry-safe CLI option features */
    telemetrySafeCliOptions?: Record<string, string>;
    /** Detected terminal ANSI colors for telemetry */
    terminalColors?: TerminalColors;
};

export declare interface LocalSessionMetadata extends SessionMetadata {
    readonly isRemote: false;
}

/** Basic logging interface */
declare interface Logger {
    info(message: string): void;
    debug(message: string): void;
    warning(message: string): void;
    error(message: string): void;
}

export declare enum LogLevel {
    None = 0,
    Error = 1,
    Warning = 2,
    Info = 3,
    Debug = 4,
    All = 4,// Logs everything
    Default = 3
}

declare type LogLevel_2 = keyof Logger;

/** Interface for an implementer of writing log messages asynchronously. */
declare interface LogWriter {
    /** Write a log message at the given level.
     * @returns A promise that resolves when all pending writes are complete
     */
    writeLog(level: LogLevel_2, message: string): Promise<void>;
    /** @returns the current file path or other identifier if not writing to a file. */
    outputPath(): string;
}

declare type MarketplaceSource = z_2.infer<typeof MarketplaceSourceSchema>;

/**
 * Source for a registered marketplace (how to fetch it).
 */
declare const MarketplaceSourceSchema: z_2.ZodUnion<[z_2.ZodString, z_2.ZodObject<{
    source: z_2.ZodLiteral<"github">;
    repo: z_2.ZodString;
    ref: z_2.ZodOptional<z_2.ZodString>;
    path: z_2.ZodOptional<z_2.ZodString>;
}, "strip", z_2.ZodTypeAny, {
    repo: string;
    source: "github";
    path?: string | undefined;
    ref?: string | undefined;
}, {
    repo: string;
    source: "github";
    path?: string | undefined;
    ref?: string | undefined;
}>, z_2.ZodObject<{
    source: z_2.ZodLiteral<"url">;
    url: z_2.ZodString;
    ref: z_2.ZodOptional<z_2.ZodString>;
    path: z_2.ZodOptional<z_2.ZodString>;
}, "strip", z_2.ZodTypeAny, {
    url: string;
    source: "url";
    path?: string | undefined;
    ref?: string | undefined;
}, {
    url: string;
    source: "url";
    path?: string | undefined;
    ref?: string | undefined;
}>, z_2.ZodObject<{
    source: z_2.ZodLiteral<"local">;
    path: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    source: "local";
    path: string;
}, {
    source: "local";
    path: string;
}>]>;

/**
 * A filter that transforms MCP server configurations before servers are started.
 * Receives the full parsed config and returns the filtered config together with
 * information about any servers that were removed and why.
 * Runs during server startup, after default server injection and 3P policy filtering,
 * but before disabled-server filtering.
 */
declare interface McpConfigFilter {
    filter(config: MCPServersConfig): Promise<McpConfigFilterResult>;
}

/**
 * The result of applying an {@link McpConfigFilter}.
 */
declare interface McpConfigFilterResult {
    /** The (potentially reduced) server configuration to continue with. */
    config: MCPServersConfig;
    /** Servers that were removed by the filter, each with a display reason. */
    filteredServers: McpFilteredServer[];
}

/**
 * A server that was filtered out by an {@link McpConfigFilter}, along with
 * a human-readable reason suitable for display to the user.
 */
declare interface McpFilteredServer {
    /** The config key / name of the server that was filtered out. */
    name: string;
    /** Human-readable explanation of why the server was filtered out. */
    reason: string;
}

/**
 * Manages the lifecycle of MCP (Model Context Protocol) servers and provides access to their tools.
 */
declare class McpHost {
    protected logger: RunnerLogger;
    protected onOAuthRequired?: ((serverName: string, serverUrl: string, staticClientConfig?: {
        clientId: string;
        publicClient?: boolean;
    }) => Promise<OAuthClientProvider | undefined>) | undefined;
    protected settings?: RuntimeSettings | undefined;
    protected registry: MCPRegistry;
    private processor;
    protected config: MCPServersConfig;
    private startServersPromise?;
    protected transport: InProcMCPTransport | null;
    private disabledServers;
    private progressCallback?;
    private mcp3pEnabled;
    private configFilter;
    private elicitationHandler?;
    protected statusCallback?: ServerStatusCallback;
    private serverStateChangedCallback?;
    private serverStatusChangedCallback?;
    constructor(logger: RunnerLogger, mcpConfig: string | MCPServersConfig, disabledServers?: string[], envValueMode?: EnvValueMode, onOAuthRequired?: ((serverName: string, serverUrl: string, staticClientConfig?: {
        clientId: string;
        publicClient?: boolean;
    }) => Promise<OAuthClientProvider | undefined>) | undefined, settings?: RuntimeSettings | undefined, elicitationHandler?: (serverName: string, request: ElicitRequestParams) => Promise<ElicitResult>, mcp3pEnabled?: boolean, configFilter?: McpConfigFilter);
    /**
     * Called when a server sends a tools/list_changed notification
     */
    private handleToolsChanged;
    /** Register a callback invoked when server state changes (enable, disable, tools changed). */
    setOnServerStateChanged(callback: () => void): void;
    /** Register a callback invoked when an individual server's connection status changes. */
    setOnServerStatusChanged(callback: (serverName: string, status: ServerConnectionStatus) => void): void;
    private notifyServerStatusChanged;
    startServers(statusCallback?: ServerStatusCallback): Promise<void>;
    /**
     * Extension point for subclasses to inject default servers into the config.
     * This method is called during startServers() before processing the servers.
     * Subclasses should override this method and mutate the config parameter in place
     * to add custom server configurations.
     */
    protected injectDefaultServers(_config: MCPServersConfig): Promise<void>;
    private processServersWithExtensions;
    stopServers(): Promise<void>;
    /**
     * Gets all available tools from the MCP servers. Starts the servers with @see startServers if they have not already been started.
     * the tools returned should not be used after @see stopServers has been called.
     *
     * @param settings - The runtime settings.
     * @param logger - The logger instance.
     * @param permissions - Permissions configuration for tool access.
     * @returns A promise that resolves to an array of tools.
     */
    getTools(settings: RuntimeSettings, logger: RunnerLogger, permissions: PermissionsConfig): Promise<Tool_2[]>;
    /**
     * Gets the current MCP configuration.
     */
    getConfig(): MCPServersConfig;
    /**
     * Returns the set of MCP server names that are built-in/default servers.
     * Tools from these servers should not be deferred — the model should
     * always see them without requiring a tool_search discovery step.
     */
    getDefaultServerNames(): Set<string>;
    /**
     * Gets all connected MCP clients.
     * @returns A record of server names to their client instances
     */
    getClients(): Record<string, Client>;
    /**
     * Gets all servers that failed to connect.
     * @returns A record of server names to their failure information
     */
    getFailedServers(): Record<string, ServerFailureInfo>;
    /**
     * Gets the connection status of a server.
     * @param serverName - Name of the server
     * @returns The server's connection status
     */
    getServerStatus(serverName: string): ServerConnectionStatus;
    /**
     * Gets servers with pending connections.
     * @returns A record of server names to their pending connection promises
     */
    getPendingConnections(): Record<string, Promise<void>>;
    /**
     * Start a single MCP server with the given configuration
     * @param serverName - Unique name for the server
     * @param config - Server configuration
     * @returns Promise that resolves when server is started
     */
    startServer(serverName: string, config: MCPServerConfig): Promise<void>;
    /**
     * Stop a single MCP server
     * @param serverName - Name of the server to stop
     * @returns Promise that resolves when server is stopped
     */
    stopServer(serverName: string): Promise<void>;
    /**
     * Restart a server with new configuration
     * @param serverName - Name of the server to restart
     * @param config - New server configuration
     * @returns Promise that resolves when server is restarted
     */
    restartServer(serverName: string, config: MCPServerConfig): Promise<void>;
    /**
     * Check if a server is currently running
     * @param serverName - Name of the server to check
     * @returns True if server is running
     */
    isServerRunning(serverName: string): boolean;
    /**
     * Register a pre-connected MCP client (e.g., an IDE connection managed by another host).
     * The caller retains ownership of the client/transport lifecycle.
     */
    registerExternalClient(serverName: string, client: Client, transport: Transport, config: MCPServerConfig): void;
    /**
     * Unregister a previously registered external client.
     * Does NOT close the client/transport — the caller manages that.
     */
    unregisterExternalClient(serverName: string): void;
    /**
     * Check if a server is disabled
     * @param serverName - Name of the server to check
     * @returns True if server is disabled
     */
    isServerDisabled(serverName: string): boolean;
    /**
     * Disable a server at runtime (does not persist across sessions)
     * @param serverName - Name of the server to disable
     * @returns Promise that resolves when server is disabled
     */
    disableServer(serverName: string): Promise<void>;
    /**
     * Enable a previously disabled server at runtime
     * @param serverName - Name of the server to enable
     * @returns Promise that resolves when server is enabled
     */
    enableServer(serverName: string): Promise<void>;
    /**
     * Extension point for subclasses to start a built in server that is not listed in
     * the MCP Config.
     * @param serverName - Name of the server to enable
     * @returns Promise that resolves when server handling is complete
     */
    protected startBuiltInServer(_serverName: string): Promise<void>;
    /**
     * Check if third-party MCP servers are enabled.
     * When false, only servers with isDefaultServer=true are allowed.
     */
    isMcp3pEnabled(): boolean;
    /**
     * Get the configuration for a running server
     * @param serverName - Name of the server
     * @returns Server configuration or undefined if not found
     */
    getServerConfig(serverName: string): MCPServerConfig | undefined;
    /**
     * Get the effective (processed) configuration for a running server.
     * This returns the config after processing (env resolution, python->pipx conversion, etc.)
     * Use this for operations that need the actual runtime config (e.g., proxy transport creation).
     * @param serverName - Name of the server
     * @returns Processed server configuration or undefined if server is not running
     */
    getEffectiveServerConfig(serverName: string): MCPServerConfig | undefined;
    /**
     * Set the callback to be invoked when an MCP tool reports progress.
     * @param callback - The callback to invoke with (toolCallId, progressMessage)
     */
    setProgressCallback(callback: ToolProgressCallback | undefined): void;
    /**
     * Gets all server instructions from connected MCP servers.
     * Server instructions are provided by MCP servers during initialization
     * and describe how to use the server and its features.
     * @returns A record mapping server names to their instructions
     */
    getServerInstructions(): Record<string, string>;
    /**
     * Register a callback to be invoked when a server sends a notifications/elicitation/complete notification.
     * @param callback - The callback to invoke with the elicitationId
     */
    setElicitationCompleteCallback(callback: (elicitationId: string) => void): void;
    /**
     * Gets server instructions captured for embedding-based retrieval.
     * These are deferred from the system prompt and indexed for JIT injection.
     */
    getDeferredServerInstructions(): Record<string, string>;
    /**
     * Gets tool summaries for servers with deferred instructions.
     * Used to enrich embedding text for better retrieval relevance.
     */
    getDeferredServerToolSummaries(): Promise<Record<string, Array<{
        name: string;
        description: string;
    }>>>;
    /**
     * Get information about a connected IDE, if any.
     * Subclasses that support IDE connections should override this method.
     */
    getConnectedIdeInfo(): {
        ideName: string;
        workspaceFolder: string;
    } | undefined;
}

/**
 * Cache that maintains a mapping of agent ID to MCP host.
 * The root agent uses an empty string as its ID.
 */
declare class McpHostCache {
    private hosts;
    private logger;
    constructor(logger: RunnerLogger);
    /**
     * Get or create an MCP host for the given agent ID.
     * Returns undefined if mcpServers is empty or undefined.
     */
    getOrCreateHost(agentId: string, mcpServers: Record<string, MCPServerConfig> | undefined): Promise<McpHost | undefined>;
    /**
     * Get an existing host for the given agent ID.
     */
    getHost(agentId: string): McpHost | undefined;
    /**
     * Stop and remove all MCP hosts.
     */
    cleanup(): Promise<void>;
    /**
     * Get the number of hosts in the cache.
     */
    size(): number;
}

declare interface MCPInMemoryServerConfig extends MCPServerConfigBase {
    type: "memory";
    serverInstance: McpServer;
}

declare interface MCPLocalServerConfig extends MCPServerConfigBase {
    type?: "local" | "stdio";
    command: string;
    args: string[];
    /**
     * An object of the environment variables to pass to the server.
     *
     * The interpretation of this object depends on the environment variable mode:
     * - In 'indirect' mode (default): Hybrid approach for backward compatibility
     *   - If value contains $ or ${...}, tries variable substitution first
     *   - If substitution succeeds (changes the value), uses the resolved value
     *   - If not, it tries to treat value as the name of an env var to read from current process.
     *   - If such env var exists, uses it as a string literal.
     *   Example: { "FOO": "BAR" } sets FOO=process.env.BAR (legacy)
     *   Example: { "FOO": "$BAR" } sets FOO=process.env.BAR (variable expansion)
     *   Example: { "FOO": "${BAR:-default}" } sets FOO=process.env.BAR or "default"
     * - In 'direct' mode: Key is the env var name to set in the MCP server,
     *   Value is the literal value to set. Supports variable expansion:
     *   - $VAR or ${VAR}: expands to process.env.VAR
     *   - ${VAR:-default}: expands to process.env.VAR, or "default" if VAR is undefined
     *   Example: { "FOO": "bar" } sets FOO=bar
     *   Example: { "FOO": "${BAR}" } or { "FOO": "$BAR" } sets FOO=process.env.BAR
     *   Example: { "FOO": "${BAR:-fallback}" } sets FOO=process.env.BAR or "fallback"
     *   Example: { "URL": "https://${HOST}:${PORT}" } expands both variables
     *
     * Empty means no env vars passed.
     */
    env?: Record<string, string>;
    cwd?: string;
}

export declare type McpOAuthCompletedEvent = z.infer<typeof McpOAuthCompletedEventSchema>;

/**
 * Emitted when a pending MCP OAuth request has been resolved by a client.
 */
declare const McpOAuthCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"mcp.oauth_completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_completed";
    timestamp: string;
    parentId: string | null;
}>;

export declare type McpOAuthRequestedEvent = z.infer<typeof McpOAuthRequestedEventSchema>;

/**
 * Emitted when an MCP server requires OAuth authentication.
 * The client should run the OAuth flow and respond via session.respondToMcpOAuth(requestId, provider).
 */
declare const McpOAuthRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"mcp.oauth_required">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        serverUrl: z.ZodString;
        staticClientConfig: z.ZodOptional<z.ZodObject<{
            clientId: z.ZodString;
            publicClient: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            clientId: string;
            publicClient?: boolean | undefined;
        }, {
            clientId: string;
            publicClient?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    }, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_required";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_required";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * A permission request for invoking an MCP tool.
 */
declare type MCPPermissionRequest = {
    readonly kind: "mcp";
    /** The name of the MCP Server being targeted e.g. "github-mcp-server" */
    readonly serverName: string;
    /** The name of the tool being targeted e.g. "list_issues" */
    readonly toolName: string;
    /** The title of the tool being targeted e.g. "List Issues" */
    readonly toolTitle: string;
    /**
     * The _hopefully_ JSON arguments that will be passed to the MCP tool.
     *
     * This should be an object, but it's not parsed before this point so we can't guarantee that.
     * */
    readonly args?: unknown;
    /**
     * Whether the tool is read-only (e.g. a `view` operation) or not (e.g. an `edit` operation).
     */
    readonly readOnly: boolean;
};

declare class MCPRegistry {
    private logger;
    private clientFactory;
    private transportFactory;
    envValueMode: EnvValueMode;
    protected settings?: RuntimeSettings | undefined;
    clients: Record<string, Client>;
    transports: Record<string, Transport>;
    configs: Record<string, MCPServerConfig>;
    /**
     * Server instructions provided by MCP servers during initialization.
     * These instructions describe how to use the server and its features.
     */
    serverInstructions: Record<string, string>;
    /**
     * Server instructions captured for embedding-based retrieval.
     * These are NOT included in the system prompt but indexed for JIT injection.
     */
    deferredServerInstructions: Record<string, string>;
    /**
     * Pending connection promises for servers that are connecting in the background.
     * Used for deferred connections where we don't want to block on server startup.
     */
    pendingConnections: Record<string, Promise<void>>;
    /**
     * Servers that failed to connect, with their error information.
     * Used to track and display connection failures to users.
     */
    failedServers: Record<string, ServerFailureInfo>;
    private toolsChangedCallback?;
    private elicitationHandler?;
    /** Callback invoked when a server sends a notifications/elicitation/complete notification. */
    private elicitationCompleteCallback?;
    private statusChangedCallback?;
    constructor(logger: RunnerLogger, clientFactory?: ClientFactory, transportFactory?: TransportFactory, envValueMode?: EnvValueMode, settings?: RuntimeSettings | undefined, elicitationHandler?: (serverName: string, request: ElicitRequestParams) => Promise<ElicitResult>);
    /**
     * Register a callback to be invoked when a server sends a tools/list_changed notification.
     * The callback can be sync or async.
     */
    setToolsChangedCallback(callback: (clientName: string) => void | Promise<void>): void;
    /**
     * Register a callback to be invoked when a server sends a notifications/elicitation/complete notification.
     */
    setElicitationCompleteCallback(callback: (elicitationId: string) => void): void;
    /** Register a callback invoked when an individual server's connection status changes. */
    setOnStatusChanged(callback: (serverName: string, status: ServerConnectionStatus) => void): void;
    /**
     * Get the client capabilities, including elicitation if a handler is registered.
     */
    private getClientCapabilities;
    /**
     * Register the elicitation request handler on a client if a handler is available.
     */
    private registerElicitationHandler;
    /**
     * Record a server connection failure.
     * @param serverName - Name of the server that failed
     * @param error - The error that caused the failure
     */
    recordFailure(serverName: string, error: Error): void;
    /**
     * Clear a server's failure record (e.g., when it successfully reconnects).
     * @param serverName - Name of the server
     */
    clearFailure(serverName: string): void;
    /**
     * Get the connection status of a server.
     * @param serverName - Name of the server
     * @returns The server's connection status
     */
    getServerStatus(serverName: string): ServerConnectionStatus;
    /**
     * Ensures a server is connected before invoking tools.
     * If the server has a pending connection, waits for it to complete.
     * @param serverName - Name of the server to ensure is connected
     * @throws Error if the pending connection fails
     */
    ensureConnected(serverName: string): Promise<void>;
    startLocalMcpClient(serverName: string, serverConfig: MCPLocalServerConfig): Promise<void>;
    /**
     * Start a local MCP client with deferred connection.
     * The server process is started immediately but the connection is established in the background.
     * Use this for servers where we have a static tool manifest and don't need to wait for
     * the connection to complete before using the tools list.
     *
     * The client is added to registry.clients immediately (before connection completes),
     * so it will be included when iterating over clients. Call ensureConnected() before
     * invoking any tool on this server.
     *
     * @param serverName - Name of the server
     * @param serverConfig - Server configuration
     */
    startLocalMcpClientDeferred(serverName: string, serverConfig: MCPLocalServerConfig): void;
    startHttpMcpClient(serverName: string, serverConfig: MCPRemoteServerConfig, authProvider?: OAuthClientProvider): Promise<void>;
    startSseMcpClient(serverName: string, serverConfig: MCPRemoteServerConfig, authProvider?: OAuthClientProvider): Promise<void>;
    startInMemoryMcpClient(serverName: string, serverConfig: MCPServerConfig, serverInstance: McpServer): Promise<void>;
    /**
     * Test a connection to a remote MCP server without registering it.
     * This is useful for validating server configuration before saving.
     * Throws UnauthorizedError if the server requires authentication.
     * Throws other errors if the connection fails for other reasons.
     *
     * @param serverUrl - The URL of the remote server
     * @param serverType - The type of transport ("http" or "sse")
     * @param headers - Optional headers to include in requests
     * @param authProvider - Optional OAuth provider for authenticated connections
     */
    testRemoteConnection(serverUrl: string, serverType: "http" | "sse", headers?: Record<string, string>, authProvider?: OAuthClientProvider): Promise<void>;
    private setupAndConnectClient;
    getTools(mcpServersConfig: MCPServersConfig | undefined, sessionClient?: CopilotSessionsClient): Promise<Record<string, Tool>>;
    private getServerTools;
    private logServerSuccessWithTools;
    /**
     * Gets all server instructions from connected MCP servers.
     * @returns A record mapping server names to their instructions
     */
    getServerInstructions(): Record<string, string>;
    /**
     * Gets server instructions captured for embedding-based retrieval.
     * These are deferred from the system prompt and indexed for JIT injection.
     */
    getDeferredServerInstructions(): Record<string, string>;
    /**
     * Gets tool summaries (name and description) for each server that has
     * deferred instructions. Uses the already-connected clients to list tools.
     */
    getDeferredServerToolSummaries(): Promise<Record<string, Array<{
        name: string;
        description: string;
    }>>>;
}

declare interface MCPRemoteServerConfig extends MCPServerConfigBase {
    type: "http" | "sse";
    /**
     * URL of the remote server
     * NOTE: this has to be converted to a URL object before giving to transport.
     * TransportFactory will handle this conversion.
     */
    url: string;
    /**
     * Optional. HTTP headers to include in requests to the remote server.
     * This can be used for authentication or other purposes.
     * For example, you might include an Authorization header.
     */
    headers?: Record<string, string>;
    /**
     * Optional. OAuth client ID for pre-registered (static) OAuth clients.
     * When set, dynamic client registration is skipped and this client ID is used.
     * If not set, dynamic client registration (RFC 7591) is used when OAuth is detected.
     *
     * OAuth is automatically detected by probing the server at connection time
     * (via /.well-known/oauth-protected-resource or 401 Unauthorized responses).
     */
    oauthClientId?: string;
    /**
     * Optional. Indicates whether this is a public OAuth client (no secret).
     * Defaults to true (public client).
     * When false, the client secret is retrieved from the system keychain.
     */
    oauthPublicClient?: boolean;
}

declare type MCPServerConfig = MCPLocalServerConfig | MCPRemoteServerConfig | MCPInMemoryServerConfig;

declare interface MCPServerConfigBase {
    /**
     * Optional human-readable name for this server.
     */
    displayName?: string;
    /**
     * List of tools to include from this server. [] means none. "*" means all.
     */
    tools: string[];
    /**
     * Indicates "remote" or "local" server type.
     * If not specified, defaults to "local".
     */
    type?: string;
    /**
     * Optional. Denotes if this is a MCP server we have defined to be used when
     * the user has not provided their own MCP server config.
     *
     * Marked optional as configs coming from users will/should not have this set. Defaults to `false`.
     */
    isDefaultServer?: boolean;
    /**
     * Optional. Either a content filter mode for all tools from this server, or a map of tool name to content filter mode for the tool with that name.
     * If not specified, defaults to "hidden_characters"
     */
    filterMapping?: Record<string, ContentFilterMode> | ContentFilterMode;
    /**
     * Optional. Timeout in milliseconds for tool calls to this server.
     * If not specified, a default is used.
     */
    timeout?: number;
    /**
     * Optional. Name of the plugin that provided this MCP server.
     * Only set for servers loaded from installed plugins.
     */
    sourcePlugin?: string;
    /**
     * Optional. Version of the plugin that provided this MCP server.
     * Only set for servers loaded from installed plugins.
     */
    sourcePluginVersion?: string;
    /**
     * Optional. Tracks the origin of this server configuration.
     * - "user": from user's ~/.copilot/mcp-config.json
     * - "workspace": from .vscode/mcp.json or .mcp.json in the workspace root
     * - "plugin": from an installed plugin
     * - "builtin": default server injected by the runtime
     */
    source?: "user" | "workspace" | "plugin" | "builtin";
    /**
     * Optional. The file path this server was loaded from.
     * Set at load time; not persisted.
     */
    sourcePath?: string;
    /**
     * Optional. When true, secret masking is disabled for tool calls to this server.
     * This is checked in addition to the `copilot_swe_agent_runtime_filter_secrets_from_mcp_tool_calls`
     * feature flag — even when the feature flag enables secret filtering, setting this to true
     * will skip filtering for this server's tools.
     *
     * Only respected in the proxy transport and out of process transport.
     */
    disableSecretMasking?: boolean;
}

declare interface MCPServersConfig {
    mcpServers: Record<string, MCPServerConfig>;
}

declare abstract class MCPTransport<ToolsProviderT = unknown> {
    protected readonly settings: RuntimeSettings;
    protected readonly logger: RunnerLogger;
    protected readonly cacheProviderTools: boolean;
    private cachedTools;
    private _progressCallback?;
    protected secretMaskingDisabledTools: Set<string>;
    constructor(settings: RuntimeSettings, logger: RunnerLogger, cacheProviderTools: boolean);
    /**
     * Set the callback to be invoked when an MCP tool reports progress.
     */
    setProgressCallback(callback: ToolProgressCallback | undefined): void;
    protected get progressCallback(): ToolProgressCallback | undefined;
    /**
     * Refresh tools for a specific provider.
     * This completely reloads the provider's tools, clearing all cached state.
     * Called when a tools/list_changed notification is received or when tools need to be refreshed.
     */
    refreshProvider(provider: ToolsProviderT): Promise<void>;
    /**
     * Hook for subclasses to perform additional cleanup when a provider is refreshed.
     * Default implementation does nothing.
     */
    protected onProviderRefresh(_provider: ToolsProviderT): Promise<void>;
    invokeTool(toolId: string, toolParams: any, filterMode?: ContentFilterMode, toolCallId?: string, customAgentName?: string): Promise<ToolResultExpanded>;
    /**
     * Allows us to directly invoke a tool, which could be one that is suppressed from the tool list.
     * - Response can be either a text or a Base64 encoded image based on mcp-client/src/MCPServer.ts implementation of the invoke-tool endpoint.
     * - If `isToolError` is true, it means the tool call failed.
     */
    protected abstract doInvokeTool(toolId: string, toolParams: any, toolCallId?: string, customAgentName?: string): Promise<InvokeToolResponseData>;
    protected invokeToolResponseToToolResult(responseData: InvokeToolResponseData, filterMode: ContentFilterMode): ToolResultExpanded;
    private addMcpServerContext;
    private invokeToolWithMcpContext;
    loadTools(provider: ToolsProviderT, permissions?: PermissionsConfig): Promise<Tool_2[]>;
    protected abstract getProviderCacheKey(provider: ToolsProviderT): string;
    protected abstract loadToolsFromProvider(provider: ToolsProviderT): Promise<Record<string, BasicToolConfig>>;
}

/**
 * A permission request for storing memory.
 */
declare type MemoryPermissionRequest = {
    readonly kind: "memory";
    /** The subject of the memory being stored */
    readonly subject: string;
    /** The fact being stored */
    readonly fact: string;
    /** The source citations for the fact */
    readonly citations: string;
};

/**
 * Merges two QueryHooks objects by concatenating arrays for each hook type.
 * Does not mutate the input objects.
 */
export declare function mergeQueryHooks(existing: QueryHooks | undefined, additional: QueryHooks | undefined): QueryHooks;

/**
 * All types of message events that can be emitted by the `Client`.
 */
declare type MessageEvent_2 = {
    kind: "message";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    message: ChatCompletionMessageParam & ReasoningMessageParam;
} | AssistantMessageEvent_2 | UserMessageEvent_2 | ToolMessageEvent;

/**
 * Emitted at the end of a getCompletionWithTools call with the final internal
 * messages array (including the system message). Consumers can use this to
 * obtain the exact messages the LLM saw — after truncation, compaction, and
 * other preRequest processor mutations — so that follow-up calls (e.g. PR
 * description generation) can reuse the same prefix and preserve prompt
 * caching.
 */
declare type MessagesSnapshotEvent = {
    kind: "messages_snapshot";
    messages: ChatCompletionMessageParam[];
};

declare type Model = {
    id: string;
    name: string;
    preview?: boolean;
    capabilities: {
        supports: {
            vision?: boolean;
        };
        limits: {
            max_prompt_tokens?: number;
            max_output_tokens?: number;
            max_context_window_tokens: number;
            vision?: {
                supported_media_types: string[];
                max_prompt_images: number;
                max_prompt_image_size: number;
            };
        };
    };
    policy?: {
        state: "enabled" | "disabled" | "unconfigured";
        terms: string;
    };
    billing?: {
        multiplier: number;
    };
};

declare type ModelCallFailureEvent = {
    kind: "model_call_failure";
    turn: number;
    callId?: string;
    modelCallDurationMs: number;
    /**
     * The model call that failed, if available.
     */
    modelCall: ModelCallParam;
    /**
     * A string representation of the messages sent as input to the model call, if available.
     */
    requestMessages?: string;
};

/**
 * -----------------------------------------------------------------------
 * Events
 * -----------------------------------------------------------------------
 *
 * Event (Union Type)
 * ├── TurnStartedEvent
 * ├── TurnEndedEvent
 * ├── TurnFailedEvent
 * ├── TurnRetryEvent
 * ├── ModelCallSuccessEvent
 * ├── ModelCallFailureEvent
 * ├── ToolExecutionEvent
 * ├── ImageProcessingEvent
 * ├── ImageRemovalEvent
 * ├── TruncationEvent
 * ├── MessageEvent
 * │   ├── AssistantMessageEvent
 * │   ├── UserMessageEvent
 * │   └── ToolMessageEvent
 * ├── ResponseEvent
 * ├── MessagesSnapshotEvent
 * └── SessionLogEvent
 */
/**
 * All types of events that can be emitted by the `Client`.
 */
declare interface ModelCallParam {
    api_id?: string;
    model?: string;
    error?: string;
    status?: number;
    request_id?: string;
    initiator?: string;
}

declare type ModelCallSuccessEvent = {
    kind: "model_call_success";
    turn: number;
    callId?: string;
    modelCallDurationMs: number;
    /**
     * Time to first token in milliseconds. Only available for streaming requests.
     */
    ttftMs?: number;
    /**
     * Average inter-token latency in milliseconds. Only available for streaming requests.
     * Calculated as the average time between successive tokens.
     */
    interTokenLatencyMs?: number;
    modelCall: ModelCallParam;
    responseChunk: CopilotChatCompletionChunk;
    responseUsage: OpenAI.ChatCompletion["usage"];
    /**
     * A string representation of the messages sent as input to the model call, if available.
     */
    requestMessages?: string;
    quotaSnapshots?: Record<string, QuotaSnapshot>;
    /**
     * GitHub's request tracing ID (x-github-request-id header) for this model call.
     */
    requestId?: string;
    /** Per-request cost/usage data from CAPI (`copilot_usage` response field). */
    copilotUsage?: CopilotUsage;
    /** The reasoning effort level used for this model call, if applicable. */
    reasoningEffort?: ReasoningEffort_2;
    /** Number of tools sent to the model for this call. */
    toolCount?: number;
};

/**
 * Per-model metrics tracked during a session
 */
export declare interface ModelMetrics {
    requests: {
        count: number;
        cost: number;
    };
    usage: {
        inputTokens: number;
        outputTokens: number;
        cacheReadTokens: number;
        cacheWriteTokens: number;
    };
}

export declare class NoopLogger extends BaseLogger implements RunnerLogger {
    constructor();
    debug(_message: string): void;
    log(_message: string): void;
    info(_message: string): void;
    notice(_message: string | Error): void;
    warning(_message: string | Error): void;
    error(_message: string | Error): void;
    startGroup(_name: string, _level?: LogLevel): void;
    endGroup(_level?: LogLevel): void;
}

/** No-op implementation of telemetry service */
declare class NoopTelemetryService extends TelemetryService {
    sendTelemetryEvent(): void;
    sendHydroEvent(_event: HydroEvent, _options?: {
        clientName?: string;
    }): void;
    shouldSendRestrictedTelemetry(): boolean;
    dispose(): void;
}

declare type OnRequestErrorContext = {
    /**
     * The current turn.
     */
    readonly turn: number;
    /**
     * The current retry attempt.
     */
    readonly retry: number;
    /**
     * The maximum number of retry attempts.
     */
    readonly maxRetries: number;
    /**
     * The error received in response to a request.
     */
    readonly error: unknown;
    /**
     * The HTTP status code from the error response, if available.
     */
    readonly status: number | undefined;
    /**
     * Information about the model being called.
     */
    readonly modelInfo: CompletionWithToolsModel;
    /**
     * The current {@link GetCompletionWithToolsOptions}
     */
    readonly getCompletionWithToolsOptions: GetCompletionWithToolsOptions | undefined;
};

declare type OnRequestErrorResult = {
    /**
     * If the processor does something to handle the error and wishes for there to be a retry
     * it should set this to how many milliseconds to wait before retrying.
     */
    retryAfter: number;
    /** Why this retry is happening (e.g., "snippy_annotations"). Defaults to "streaming_error" if not set. */
    retryReason?: string;
};

/**
 * Owns the full OTel lifecycle: config resolution, lazy SDK initialisation,
 * per-session tracker creation / disposal, and trace-context helpers used by
 * the JSON-RPC server layer.
 *
 * Designed to be a single integration point so that the rest of the codebase
 * never imports individual OTel internals.
 */
declare class OtelLifecycle {
    private config;
    private sdkInitPromise;
    private sdkShutdown;
    private trackers;
    constructor();
    /** Whether OTel is enabled (config resolved to a non-null value). */
    get enabled(): boolean;
    /** Lazily initialise the SDK and start tracking a session's event stream. */
    trackSession(session: OtelSession, options?: OtelTrackingOptions): Promise<void>;
    /** Stop tracking a single session (e.g. on close). */
    stopTracking(sessionId: string): void;
    /** Returns W3C trace context headers for an in-flight tool call, or `{}`. */
    getToolCallTraceContext(sessionId: string, toolCallId: string): {
        traceparent?: string;
        tracestate?: string;
    };
    /** Forward an updated parent trace context from an SDK caller. */
    updateParentTraceContext(sessionId: string, traceparent?: string, tracestate?: string): void;
    /** Dispose all trackers and shut down the OTel SDK. */
    dispose(): Promise<void>;
}

/** Minimal session surface the OTel lifecycle needs. */
declare type OtelSession = {
    sessionId: string;
    on(eventType: "*", handler: (event: SessionEvent) => void): () => void;
};

/** Options forwarded from the session creation call. */
declare interface OtelTrackingOptions {
    model?: string;
    providerType?: string;
    providerBaseUrl?: string;
    streaming?: boolean;
    traceparent?: string;
    tracestate?: string;
}

export declare type PendingMessagesModifiedEvent = z.infer<typeof PendingMessagesModifiedEventSchema>;

/**
 * User message queued (ephemeral event for UI updates)
 */
declare const PendingMessagesModifiedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"pending_messages.modified">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    data: {};
    id: string;
    ephemeral: true;
    type: "pending_messages.modified";
    timestamp: string;
    parentId: string | null;
}, {
    data: {};
    id: string;
    ephemeral: true;
    type: "pending_messages.modified";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * Represents a pending queued item for UI display purposes.
 */
export declare interface PendingQueuedItem {
    kind: "message" | "command";
    displayText: string;
}

/**
 * Manages the request/response lifecycle for permission and user-input interactions.
 *
 * Emits ephemeral events and awaits responses via pending promise maps.
 * Clients (TUI, SDK, ACP) subscribe to events and call the respond methods.
 */
declare class PendingRequestStore {
    private readonly emitEphemeral;
    private readonly permissionRequests;
    private readonly userInputRequests;
    private readonly elicitationRequests;
    private readonly mcpOAuthRequests;
    private readonly externalToolRequests;
    private readonly queuedCommandRequests;
    private readonly exitPlanModeRequests;
    constructor(emitEphemeral: (type: string, data: Record<string, unknown>) => void);
    /** Emit a permission request event and return a promise that resolves when responded to. */
    requestPermission(permissionRequest: PermissionRequest): Promise<PermissionRequestResult>;
    /** Emit a user input request event and return a promise that resolves when responded to. */
    requestUserInput(request: UserInputRequest): Promise<UserInputResponse>;
    /** Respond to a pending permission request by its ID. */
    respondToPermission(requestId: string, result: PermissionRequestResult): void;
    /** Respond to a pending user input request by its ID. */
    respondToUserInput(requestId: string, response: UserInputResponse): void;
    /** Emit an elicitation request event and return a promise that resolves when responded to. */
    requestElicitation(request: ElicitRequestWithToolCallId): Promise<ElicitResult>;
    requestElicitation(request: ElicitRequestParams, elicitationSource: string): Promise<ElicitResult>;
    /** Respond to a pending elicitation request by its ID. */
    respondToElicitation(requestId: string, response: ElicitResult): void;
    /** Emit an MCP OAuth request event and return a promise that resolves when a client responds with a provider. */
    requestMcpOAuth(serverName: string, serverUrl: string, staticClientConfig?: {
        clientId: string;
        publicClient?: boolean;
    }): Promise<OAuthClientProvider | undefined>;
    /** Respond to a pending MCP OAuth request by its ID. */
    respondToMcpOAuth(requestId: string, provider: OAuthClientProvider | undefined): void;
    /** Emit an external tool request event and return a promise that resolves when responded to. */
    requestExternalTool(request: ExternalToolRequest): Promise<ToolResult>;
    /** Respond to a pending external tool request by its ID. */
    respondToExternalTool(requestId: string, result: ToolResult): void;
    /** Reject a pending external tool request (e.g., on abort). */
    rejectExternalTool(requestId: string, error: Error): void;
    /** Reject all pending external tool requests (e.g., when the session is aborted). */
    rejectAllExternalTools(error: Error): void;
    /** Emit a queued command event and return a promise that resolves when responded to. */
    requestQueuedCommand(command: string): Promise<QueuedCommandResult>;
    /** Respond to a pending queued command request by its ID. */
    respondToQueuedCommand(requestId: string, result: QueuedCommandResult): void;
    /** Reject all pending queued command requests (e.g., when the session is aborted). */
    rejectAllQueuedCommands(error: Error): void;
    /** Emit an exit plan mode request event and return a promise that resolves when responded to. */
    requestExitPlanMode(request: ExitPlanModeRequest, planContent?: string): Promise<ExitPlanModeResponse>;
    /** Respond to a pending exit plan mode request by its ID. */
    respondToExitPlanMode(requestId: string, response: ExitPlanModeResponse): void;
}

export declare type PermissionCompletedEvent = z.infer<typeof PermissionCompletedEventSchema>;

/**
 * Emitted when a pending permission request has been resolved by a client.
 * Other clients should dismiss any permission UI for this requestId.
 */
declare const PermissionCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        result: z.ZodObject<{
            kind: z.ZodEnum<["approved", "denied-by-rules", "denied-no-approval-rule-and-could-not-request-from-user", "denied-interactively-by-user", "denied-by-content-exclusion-policy"]>;
        }, "strip", z.ZodTypeAny, {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        }, {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        }>;
    }, "strip", z.ZodTypeAny, {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    }, {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "permission.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "permission.completed";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * A permission request which will be used to check tool or path usage against config and/or request user approval.
 */
declare type PermissionRequest = {
    toolCallId?: string;
} & (ShellPermissionRequest | WritePermissionRequest | MCPPermissionRequest | ReadPermissionRequest | UrlPermissionRequest | MemoryPermissionRequest | CustomToolPermissionRequest | HookPermissionRequest);

export declare type PermissionRequestedEvent = z.infer<typeof PermissionRequestedEventSchema>;

/**
 * Emitted when the session needs permission approval from a client.
 * The client should respond via session.respondToPermission(requestId, result).
 */
declare const PermissionRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        permissionRequest: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"shell">;
            toolCallId: z.ZodOptional<z.ZodString>;
            fullCommandText: z.ZodString;
            intention: z.ZodString;
            commands: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                identifier: z.ZodString;
                readOnly: z.ZodBoolean;
            }, "strip", z.ZodTypeAny, {
                identifier: string;
                readOnly: boolean;
            }, {
                identifier: string;
                readOnly: boolean;
            }>, "many">>;
            possiblePaths: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
            possibleUrls: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                url: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                url: string;
            }, {
                url: string;
            }>, "many">>;
            hasWriteFileRedirection: z.ZodBoolean;
            canOfferSessionApproval: z.ZodBoolean;
            warning: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        }, {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"write">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            fileName: z.ZodString;
            diff: z.ZodString;
            newFileContents: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"read">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        }, {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"mcp">;
            toolCallId: z.ZodOptional<z.ZodString>;
            serverName: z.ZodString;
            toolName: z.ZodString;
            toolTitle: z.ZodString;
            args: z.ZodAny;
            readOnly: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        }, {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"url">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        }, {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"memory">;
            toolCallId: z.ZodOptional<z.ZodString>;
            subject: z.ZodString;
            fact: z.ZodString;
            citations: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        }, {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"custom-tool">;
            toolCallId: z.ZodOptional<z.ZodString>;
            toolName: z.ZodString;
            toolDescription: z.ZodString;
            args: z.ZodAny;
        }, "strip", z.ZodTypeAny, {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        }, {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"hook">;
            toolCallId: z.ZodOptional<z.ZodString>;
            toolName: z.ZodString;
            toolArgs: z.ZodOptional<z.ZodUnknown>;
            hookMessage: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }, {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    }, {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    };
    id: string;
    ephemeral: true;
    type: "permission.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    };
    id: string;
    ephemeral: true;
    type: "permission.requested";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * The result of requesting permissions.
 */
declare type PermissionRequestResult = {
    readonly kind: "approved";
} | {
    readonly kind: "denied-by-rules";
    rules: ReadonlyArray<Rule>;
} | {
    readonly kind: "denied-no-approval-rule-and-could-not-request-from-user";
} | {
    readonly kind: "denied-interactively-by-user";
    readonly feedback?: string;
} | {
    readonly kind: "denied-by-content-exclusion-policy";
    readonly path: string;
    readonly message: string;
};

declare const PermissionRequestSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"shell">;
    toolCallId: z.ZodOptional<z.ZodString>;
    fullCommandText: z.ZodString;
    intention: z.ZodString;
    commands: z.ZodReadonly<z.ZodArray<z.ZodObject<{
        identifier: z.ZodString;
        readOnly: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        identifier: string;
        readOnly: boolean;
    }, {
        identifier: string;
        readOnly: boolean;
    }>, "many">>;
    possiblePaths: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
    possibleUrls: z.ZodReadonly<z.ZodArray<z.ZodObject<{
        url: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        url: string;
    }, {
        url: string;
    }>, "many">>;
    hasWriteFileRedirection: z.ZodBoolean;
    canOfferSessionApproval: z.ZodBoolean;
    warning: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "shell";
    fullCommandText: string;
    intention: string;
    commands: readonly {
        identifier: string;
        readOnly: boolean;
    }[];
    possiblePaths: readonly string[];
    possibleUrls: readonly {
        url: string;
    }[];
    hasWriteFileRedirection: boolean;
    canOfferSessionApproval: boolean;
    toolCallId?: string | undefined;
    warning?: string | undefined;
}, {
    kind: "shell";
    fullCommandText: string;
    intention: string;
    commands: readonly {
        identifier: string;
        readOnly: boolean;
    }[];
    possiblePaths: readonly string[];
    possibleUrls: readonly {
        url: string;
    }[];
    hasWriteFileRedirection: boolean;
    canOfferSessionApproval: boolean;
    toolCallId?: string | undefined;
    warning?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"write">;
    toolCallId: z.ZodOptional<z.ZodString>;
    intention: z.ZodString;
    fileName: z.ZodString;
    diff: z.ZodString;
    newFileContents: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "write";
    intention: string;
    fileName: string;
    diff: string;
    toolCallId?: string | undefined;
    newFileContents?: string | undefined;
}, {
    kind: "write";
    intention: string;
    fileName: string;
    diff: string;
    toolCallId?: string | undefined;
    newFileContents?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"read">;
    toolCallId: z.ZodOptional<z.ZodString>;
    intention: z.ZodString;
    path: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "read";
    path: string;
    intention: string;
    toolCallId?: string | undefined;
}, {
    kind: "read";
    path: string;
    intention: string;
    toolCallId?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"mcp">;
    toolCallId: z.ZodOptional<z.ZodString>;
    serverName: z.ZodString;
    toolName: z.ZodString;
    toolTitle: z.ZodString;
    args: z.ZodAny;
    readOnly: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
    kind: "mcp";
    serverName: string;
    toolTitle: string;
    toolName: string;
    readOnly: boolean;
    toolCallId?: string | undefined;
    args?: any;
}, {
    kind: "mcp";
    serverName: string;
    toolTitle: string;
    toolName: string;
    readOnly: boolean;
    toolCallId?: string | undefined;
    args?: any;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"url">;
    toolCallId: z.ZodOptional<z.ZodString>;
    intention: z.ZodString;
    url: z.ZodString;
}, "strip", z.ZodTypeAny, {
    url: string;
    kind: "url";
    intention: string;
    toolCallId?: string | undefined;
}, {
    url: string;
    kind: "url";
    intention: string;
    toolCallId?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"memory">;
    toolCallId: z.ZodOptional<z.ZodString>;
    subject: z.ZodString;
    fact: z.ZodString;
    citations: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "memory";
    subject: string;
    fact: string;
    citations: string;
    toolCallId?: string | undefined;
}, {
    kind: "memory";
    subject: string;
    fact: string;
    citations: string;
    toolCallId?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"custom-tool">;
    toolCallId: z.ZodOptional<z.ZodString>;
    toolName: z.ZodString;
    toolDescription: z.ZodString;
    args: z.ZodAny;
}, "strip", z.ZodTypeAny, {
    kind: "custom-tool";
    toolName: string;
    toolDescription: string;
    toolCallId?: string | undefined;
    args?: any;
}, {
    kind: "custom-tool";
    toolName: string;
    toolDescription: string;
    toolCallId?: string | undefined;
    args?: any;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"hook">;
    toolCallId: z.ZodOptional<z.ZodString>;
    toolName: z.ZodString;
    toolArgs: z.ZodOptional<z.ZodUnknown>;
    hookMessage: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "hook";
    toolName: string;
    toolCallId?: string | undefined;
    toolArgs?: unknown;
    hookMessage?: string | undefined;
}, {
    kind: "hook";
    toolName: string;
    toolCallId?: string | undefined;
    toolArgs?: unknown;
    hookMessage?: string | undefined;
}>]>;

/**
 * Configuration for permissions handling.
 *
 * For CCA, permissions requests are not required.
 */
declare type PermissionsConfig = {
    requestRequired: false;
} | {
    requestRequired: true;
    request: RequestPermissionFn;
};

/**
 * This is just a type to warn that there's a good chance it's not a real path, because
 * it was _very_ heuristically parsed out of a command.
 */
declare type PossiblePath = string;

/**
 * A possible URL that was heuristically parsed from a command.
 */
declare type PossibleUrl = {
    readonly url: string;
};

declare type PostRequestContext = {
    /**
     * An identifier for the completion with tools call. This can be used for logging
     * and tracing purposes.
     */
    readonly callId: string | undefined;
    /**
     * The current turn.
     */
    readonly turn: number;
    /**
     * Information about the model being called.
     */
    readonly modelInfo: CompletionWithToolsModel;
    /**
     * The parsed response messages from the model.
     */
    readonly responseMessages: ChatCompletionMessageParam[];
    /**
     * The current {@link GetCompletionWithToolsOptions}
     */
    readonly getCompletionWithToolsOptions: GetCompletionWithToolsOptions | undefined;
};

/**
 * Result type for postRequest processors.
 * Currently empty as processors signal retries by throwing errors that are caught
 * by onRequestError processors. Reserved for future use.
 */
declare type PostRequestResult = Record<string, never>;

declare type PostToolExecutionContext = {
    /**
     * The current turn.
     */
    readonly turn: number;
    /**
     * What tool call was executed.
     */
    readonly toolCall: CopilotChatCompletionMessageToolCall;
    /**
     * The result of the tool call. Can be modified in place by the processor.
     */
    readonly toolResult: ToolResultExpanded;
    /**
     * Information about the model being called.
     */
    readonly modelInfo: CompletionWithToolsModel;
};

export declare type PostToolUseHook = (input: PostToolUseHookInput) => Promise<PostToolUseHookOutput | void>;

/**
 * Post-tool use hook types
 */
export declare interface PostToolUseHookInput extends BaseHookInput {
    toolName: string;
    toolArgs: unknown;
    toolResult: ToolResultExpanded;
}

export declare interface PostToolUseHookOutput {
    modifiedResult?: ToolResultExpanded;
    additionalContext?: string;
    suppressOutput?: boolean;
}

export declare type PreCompactHook = (input: PreCompactHookInput) => Promise<PreCompactHookOutput | void>;

/**
 * Pre-compact hook types - fires before context compaction begins
 */
export declare interface PreCompactHookInput extends BaseHookInput {
    transcriptPath: string;
    trigger: "manual" | "auto";
    customInstructions: string;
}

export declare type PreCompactHookOutput = Record<string, never>;

declare type PreRequestContext = {
    /**
     * An identifier for the completion with tools call. This can be used for logging
     * and tracing purposes.
     */
    readonly callId: string | undefined;
    /**
     * The current turn.
     */
    readonly turn: number;
    /**
     * The current retry attempt.
     */
    readonly retry: number;
    /**
     * The messages that will be sent to the model for the request.
     * If modifying them, do so in place.
     */
    readonly messages: ChatCompletionMessageParam[];
    /**
     * The tool definitions that will be sent to the model for the request.
     * These should not be modified.
     */
    readonly toolDefinitions: ChatCompletionTool[];
    /**
     * Information about the model being called.
     */
    readonly modelInfo: CompletionWithToolsModel;
    /**
     * Additional headers to send with the request. If adding additional headers
     * then simply add to this object.
     */
    readonly additionalRequestHeaders: Record<string, string>;
    /**
     * The current {@link GetCompletionWithToolsOptions}
     */
    readonly getCompletionWithToolsOptions: GetCompletionWithToolsOptions | undefined;
    /**
     * A client that can be used to make additional LLM calls (e.g., for compaction)
     * without interfering with the active request transport.
     */
    readonly client: Client_2;
    /**
     * The rich tool objects with callbacks, needed for nested LLM calls.
     */
    readonly tools: Tool_2[];
};

declare type PreToolsExecutionContext = {
    /**
     * The current turn.
     */
    readonly turn: number;
    /**
     * What tool calls are being executed.
     */
    readonly toolCalls: CopilotChatCompletionMessageToolCall[];
    /**
     * Information about the model being called.
     */
    readonly modelInfo: CompletionWithToolsModel;
};

/**
 * Pre-tools execution procesors can either return nothing, or results for one or more
 * of the tools to be executed. These results will be given to the model in lieu of
 * performing the tool call and obtaining a result from the tool itself.
 */
declare type PreToolsExecutionResult = void | Map<string, ToolResultExpanded>;

export declare type PreToolUseHook = (input: PreToolUseHookInput) => Promise<PreToolUseHookOutput | void>;

/**
 * Pre-tool use hook types
 */
export declare interface PreToolUseHookInput extends BaseHookInput {
    toolName: string;
    toolArgs: unknown;
}

export declare interface PreToolUseHookOutput {
    permissionDecision?: "allow" | "deny" | "ask";
    permissionDecisionReason?: string;
    modifiedArgs?: unknown;
    additionalContext?: string;
    suppressOutput?: boolean;
}

/**
 * Processor that executes preToolUse hooks and can deny tool execution or modify arguments.
 * Returns denied results for tools that hooks block.
 * Mutates tool call arguments in place when hooks return modifiedArgs.
 */
export declare class PreToolUseHooksProcessor implements IPreToolsExecutionProcessor {
    private readonly hooks;
    private readonly workingDir;
    private readonly sessionId;
    private readonly requestHookPermission?;
    private readonly emitter?;
    constructor(hooks: QueryHooks | undefined, workingDir: string, sessionId: string, requestHookPermission?: RequestHookPermissionFn | undefined, emitter?: HookEventEmitter | undefined);
    toJSON(): string;
    preToolsExecution(context: PreToolsExecutionContext): Promise<Map<string, ToolResultExpanded> | void>;
}

/**
 * A single progress line for a background agent task.
 */
export declare type ProgressLine = {
    /** Display message, e.g., "▸ bash", "✓ edit src/foo.ts" */
    message: string;
    /** When this event occurred */
    timestamp: number;
};

/** Valid provider type values for BYOK configuration. */
declare const PROVIDER_TYPES: readonly ["openai", "azure", "anthropic"];

/**
 * Configuration for a custom API provider (BYOK - Bring Your Own Key).
 * When set, bypasses Copilot API authentication and uses this provider instead.
 */
export declare interface ProviderConfig {
    /** Provider type. Defaults to "openai" for generic OpenAI-compatible APIs. */
    type?: ProviderType;
    /** Wire API format (openai/azure only). Defaults to "completions". */
    wireApi?: WireApi;
    /** API endpoint URL */
    baseUrl: string;
    /** API key. Optional for local providers like Ollama. */
    apiKey?: string;
    /**
     * Bearer token for authentication. Sets the Authorization header directly.
     * Use this for services requiring bearer token auth instead of API key.
     * Takes precedence over apiKey when both are set.
     */
    bearerToken?: string;
    /** Azure-specific options */
    azure?: {
        /** API version. Defaults to "2024-10-21". */
        apiVersion?: string;
    };
}

declare type ProviderType = (typeof PROVIDER_TYPES)[number];

/** Result of a session prune operation. */
declare interface PruneResult {
    /** Session IDs that were deleted (empty in dry-run mode). */
    deleted: string[];
    /** Session IDs that would be deleted in dry-run mode (empty when not dry-run). */
    candidates: string[];
    /** Session IDs that were skipped (e.g., named sessions). */
    skipped: string[];
    /** Total bytes freed (actual) or that would be freed (dry-run). */
    freedBytes: number;
    /** Whether this was a dry run (no actual deletions). */
    dryRun: boolean;
}

/**
 * Functional query API that provides a Claude Code-inspired interface.
 * This is a thin wrapper around the Session class for simple use cases.
 *
 * @param options - Query configuration options
 * @returns AsyncGenerator of SessionEvent objects
 */
export declare function query(options: QueryOptions): AsyncIterable<SessionEvent>;

/**
 * Hook system with arrays of specific hook callbacks
 */
export declare interface QueryHooks {
    preToolUse?: PreToolUseHook[];
    postToolUse?: PostToolUseHook[];
    userPromptSubmitted?: UserPromptSubmittedHook[];
    sessionStart?: SessionStartHook[];
    sessionEnd?: SessionEndHook[];
    errorOccurred?: ErrorOccurredHook[];
    agentStop?: AgentStopHook[];
    subagentStop?: SubagentStopHook[];
    subagentStart?: SubagentStartHook[];
    preCompact?: PreCompactHook[];
}

export declare type QueryOptions = SessionOptions & {
    prompt: string;
    abortController?: AbortController;
};

/**
 * Represents a queued slash command to be executed.
 */
export declare interface QueuedCommandItem {
    kind: "command";
    /** The full command string including the slash, e.g., "/compact" or "/model gpt-4" */
    command: string;
}

/** Result type for queued slash commands. */
declare type QueuedCommandResult = {
    handled: true;
    stopProcessingQueue?: boolean;
} | {
    handled: false;
};

/**
 * A unified queue item that can represent either a user message or a slash command.
 * Used to support queueing slash commands alongside messages in FIFO order.
 */
export declare type QueuedItem = QueuedMessageItem | QueuedCommandItem;

/**
 * Represents a queued user message to be processed by the agentic loop.
 */
export declare interface QueuedMessageItem {
    kind: "message";
    options: SendOptions;
}

declare type QuotaSnapshot = {
    /**
     * Whether or not it's an unlimited entitlement.
     */
    isUnlimitedEntitlement: boolean;
    /**
     * The number of requests included in the entitlement, or "-1" for unlimited
     * entitlement, so that the user/client can understand how much they get each
     * month/period; the value is an integer
     */
    entitlementRequests: number;
    /**
     * The count of requests used so far in this month/period, so that the
     * user/client can understand how much of their entitlement they have used;
     * the value is an integer
     */
    usedRequests: number;
    /**
     * Indicates whether usage is allowed once quota is exhausted, so that the
     * user/client can understand if they can continue usage at a pay-per-request
     * rate when entitlement is exhausted; the value is boolean
     */
    usageAllowedWithExhaustedQuota: boolean;
    /**
     * The count of overage requests made so far in this month/period, so that
     * the user/client can understand how much they have spent in pay-per-request
     * charges so far this month/period; the value is a decimal
     */
    overage: number;
    /**
     * Indicates whether overage is allowed once quota is exhausted, so that the
     * user/client can understand if they can continue usage at a pay-per-request
     * rate when entitlement is exhausted; the value is boolean
     */
    overageAllowedWithExhaustedQuota: boolean;
    /**
     * The percentage of the entitlement remaining at the snapshot timestamp, so
     * that the user/client can understand how much they have remaining and their
     * rate of usage; the value is a decimal
     */
    remainingPercentage: number;
    /**
     * The date when the quota resets, so that the user/client can know when they
     * next receive their entitlement; the value is an RFC3339 formatted UTC date;
     * if the entitlement is unlimited, this value is not included in the snapshot
     */
    resetDate?: Date;
};

/**
 * A permission request for reading file or directory contents.
 */
declare type ReadPermissionRequest = {
    readonly kind: "read";
    /** The intention of the edit operation, e.g. "Read file" or "List directory" */
    readonly intention: string;
    /** The path of the file or directory being read */
    readonly path: string;
};

/**
 * Reasoning effort level for models that support it.
 * Well-known values include "low", "medium", "high", and "xhigh",
 * but custom providers may accept additional values.
 */
declare type ReasoningEffort_2 = string;

declare type ReasoningEffortOption = string;

declare type ReasoningMessageParam = {
    /**
     * An ID or encrypted value that allows the model to restore
     */
    reasoning_opaque?: string;
    /**
     * Human-readable text describing the model's thinking process.
     */
    reasoning_text?: string;
    /**
     * An encrypted representation of the model's internal state
     */
    encrypted_content?: string | undefined | null;
};

/**
 * Human-readable labels for each relevance score level.
 */
declare const RELEVANCE_LABELS: Record<RelevanceScore, string>;

/**
 * Relevance score for a session relative to the current working directory.
 * Higher scores indicate more relevant sessions.
 */
declare type RelevanceScore = 0 | 1 | 2 | 3 | 4;

export declare class RemoteSession extends Session<RemoteSessionMetadata> {
    readonly repository: {
        name: string;
        owner: string;
        branch: string;
    };
    readonly remoteSessionIds: string[];
    readonly pullRequestNumber?: number;
    readonly resourceId?: string;
    constructor(options: SessionOptions & {
        repository: {
            name: string;
            owner: string;
            branch: string;
        };
        remoteSessionIds: string[];
        pullRequestNumber?: number;
        resourceId?: string;
    });
    send(options: SendOptions): Promise<void>;
    abort(): Promise<void>;
    compactHistory(): Promise<CompactionResult>;
    getMetadata(): RemoteSessionMetadata;
}

export declare interface RemoteSessionMetadata extends SessionMetadata {
    readonly repository: {
        owner: string;
        name: string;
        branch: string;
    };
    readonly remoteSessionIds: string[];
    readonly pullRequestNumber?: number;
    /** The original resource identifier (task ID or PR node ID), preserved across fromEvents(). */
    readonly resourceId?: string;
    readonly isRemote: true;
}

/**
 * Immutable snapshot of the repository's diff state at a point in time.
 *
 * Eagerly computes git diff data and per-file range hashes during `create()`.
 * All public methods are synchronous.
 *
 */
declare class RepoChangeSet {
    private readonly files;
    private constructor();
    /**
     * Creates a fully-initialized RepoChangeSet.
     * Stages all changes, retrieves changed paths (including deletions) and diff ranges,
     * then hashes each changed file's contents.
     *
     * Uses `getChangedPaths()` as the authoritative file list so that deleted files
     * and pure-deletion edits are included. `getDiffRanges()` provides hunk-level
     * line ranges where available (it intentionally omits deleted files and
     * deletion-only hunks).
     */
    static create(git: GitHandler, repoLocation: string, baseCommit: string): Promise<RepoChangeSet>;
    /** Full diff with hunk line ranges (needed for CodeQL diff-informed analysis and alert filtering). */
    getFileRanges(): FileRange[];
    /** Set of changed file paths. */
    getChangedFiles(): Set<string>;
    /**
     * Returns the set of files that changed between a previous change set and this one.
     * Includes files that are new, modified (different hash), or deleted (in previous but not in current).
     */
    getChangedFilesSince(previous: RepoChangeSet): Set<string>;
}

declare type RepoHostType = "github" | "ado";

/**
 * Optional callback for requesting user permission when a preToolUse hook returns `"ask"`.
 * Returns a {@link PermissionRequestResult} indicating whether the tool call was approved or denied
 * (for example, via an `"approved"` vs `"denied"` kind).
 */
export declare type RequestHookPermissionFn = (request: PermissionRequest) => Promise<PermissionRequestResult>;

declare type RequestPermissionFn = (permission: PermissionRequest) => Promise<PermissionRequestResult>;

/**
 * Resolve a relative file path within a base directory, rejecting path traversal attempts.
 * @internal Exported for testing only.
 */
export declare function resolveWorkspacePath(baseDir: string, filePath: string): string;

export declare type ResourceLink = z.infer<typeof ResourceLinkSchema>;

/**
 * Resource link content block
 */
declare const ResourceLinkSchema: z.ZodObject<{
    icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
        src: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        sizes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
    }, "strip", z.ZodTypeAny, {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }, {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }>, "many">>;
    name: z.ZodString;
    title: z.ZodOptional<z.ZodString>;
    uri: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    mimeType: z.ZodOptional<z.ZodString>;
    size: z.ZodOptional<z.ZodNumber>;
} & {
    type: z.ZodLiteral<"resource_link">;
}, "strip", z.ZodTypeAny, {
    name: string;
    type: "resource_link";
    uri: string;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }[] | undefined;
    size?: number | undefined;
}, {
    name: string;
    type: "resource_link";
    uri: string;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        theme?: "light" | "dark" | undefined;
    }[] | undefined;
    size?: number | undefined;
}>;

/**
 * An event that is emitted by the `Client` which contains the final response from the LLM.
 */
declare type ResponseEvent = {
    kind: "response";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    response: ChatCompletionMessage;
};

/**
 * Retrieves the list of available models based on availability, policies, and integration including
 * capabilities and billing information, which may be cached from previous calls.
 *
 * This list is in order of preference to be the default model for new sessions where the first model is
 * the most preferred.  It can be empty if no models are available.
 */
export declare function retrieveAvailableModels(authInfo: AuthInfo, copilotUrl: string | undefined, integrationId: string, sessionId: string, logger: RunnerLogger, featureFlagService?: FeatureFlagService): Promise<{
    models: Model[];
    copilotUrl: string | undefined;
}>;

/**
 * A Rule defines a pattern for matching permission requests.
 *
 * It is unfortunately generically named because it is intended to match across
 * different types of tool uses, e.g. `Shell(touch)` or `GitHubMCP(list_issues)`,
 * `view(.env-secrets)`
 */
declare type Rule = {
    /**
     * The kind of rule that should be matched e.g. `Shell` or `GitHubMCP`.
     */
    readonly kind: string;
    /**
     * If null, matches all arguments to the kind.
     */
    readonly argument: string | null;
};

/**
 * The user defined listeners for an exec call
 */
declare interface RunnerExecListeners {
    /** A call back for each buffer of stdout */
    stdout?: (data: Buffer) => void;
    /** A call back for each buffer of stderr */
    stderr?: (data: Buffer) => void;
    /** A call back for each line of stdout */
    stdline?: (data: string) => void;
    /** A call back for each line of stderr */
    errline?: (data: string) => void;
    /** A call back for each debug log */
    debug?: (data: string) => void;
}

declare interface RunnerExecOptions {
    /** optional working directory.  defaults to current */
    cwd?: string;
    /** optional envvar dictionary.  defaults to current process's env */
    env?: NodeJS.ProcessEnv;
    /** optional.  defaults to false */
    silent?: boolean;
    /** optional out stream to use. Defaults to process.stdout */
    outStream?: stream.Writable;
    /** optional err stream to use. Defaults to process.stderr */
    errStream?: stream.Writable;
    /** optional. whether to skip quoting/escaping arguments if needed.  defaults to false. */
    windowsVerbatimArguments?: boolean;
    /** optional.  whether to fail if output to stderr.  defaults to false */
    failOnStdErr?: boolean;
    /** optional.  defaults to failing on non zero.  ignore will not fail leaving it up to the caller */
    ignoreReturnCode?: boolean;
    /** optional.  defaults to true.  If true, debug logging is enabled in silent mode */
    silentDebugLogging?: boolean;
    /** optional. defaults to false.  If true, stderr output will be silenced (logged at debug level instead of error level) */
    silentErr?: boolean;
    /** optional. How long in ms to wait for STDIO streams to close after the exit event of the process before terminating. defaults to 10000 */
    delay?: number;
    /** optional. input to write to the process on STDIN. */
    input?: Buffer;
    /** optional. Listeners for output. Callback functions that will be called on these events */
    listeners?: RunnerExecListeners;
    /** optional. In milliseconds the maximum amount of time the process is allowed to run. */
    timeout?: number | undefined;
    shell?: string | undefined;
    /** optional. Affects how the command is logged.  defaults to false.  if true, be prefixed by "Copilot:"" in Actions logs */
    isDirectAgentCommand?: boolean;
    /** optional. An AbortSignal that can be used to cancel the process. */
    abortSignal?: AbortSignal;
}

/**
 * Interface for the output of execReturn()
 */
declare interface RunnerExecOutput {
    /**The exit code of the process */
    exitCode: number;
    /**The entire stdout of the process as a string */
    stdout: string;
    /**The entire stderr of the process as a string */
    stderr: string;
}

export declare interface RunnerLogger {
    /**
     * Log a message ignoring the configured log level.
     * This is useful for logging messages that should always be logged, regardless of the log level.
     * @param message The message to log.
     */
    log(message: string): void;
    /**
     * Returns true if the environment is set to debug.
     * Note: This is not the same as the log level being set to debug.
     */
    isDebug(): boolean;
    /**
     * Log a debug message. This is only logged if the log level is set to debug.
     * @param message The message to log.
     */
    debug(message: string): void;
    /**
     * Log an info message. This is only logged if the log level is set to info or debug.
     * @param message The message to log.
     */
    info(message: string): void;
    /**
     * Log a notice message. This is only logged if the log level is set to warning, info, or debug,
     * but logs using the logger's info method.
     * This is useful for logging messages that are not errors, but are important enough to log on
     * less verbose log levels.
     * @param message The message to log.
     */
    notice(message: string | Error): void;
    /**
     * Log a warning message. This is only logged if the log level is set to warning, info, or debug
     * @param message The message to log.
     */
    warning(message: string | Error): void;
    /**
     * Log an error message. This is only logged if the log level is set to error, warning, info, or debug
     * @param message The message to log.
     */
    error(message: string | Error): void;
    /**
     * Log a message that starts a new group.
     * @param name The name of the group.
     * @param level The log level of the group. Defaults to info.
     */
    startGroup(name: string, level?: LogLevel): void;
    /**
     * Log a message that ends the current group.
     * @param level The log level of the group. Defaults to info.
     */
    endGroup(level?: LogLevel): void;
}

declare type RuntimeSettings = DeepPartial<IRuntimeSettings>;

/**
 * Indicates the safety level of the assessed script.
 *
 * There may some cases where a script cannot be assessed (e.g. unparseable),
 * in which case we bail with a failure.
 */
declare type SafetyAssessment = {
    readonly result: "failed";
    /**
     * A human-readable reason why the safety assessment could not be completed.
     */
    readonly reason: string;
} | {
    readonly result: "completed";
    readonly commands: ReadonlyArray<AssessedCommand>;
    /**
     * Possible absolute file paths that the script might operate on, based on heuristic parsing.
     */
    readonly possiblePaths: ReadonlyArray<PossiblePath>;
    /**
     * Possible URLs that the script might access, based on heuristic parsing.
     */
    readonly possibleUrls: ReadonlyArray<PossibleUrl>;
    /**
     * Indicates whether any command in the script has redirection to write to a file.
     */
    readonly hasWriteFileRedirection: boolean;
    /**
     * Indicates whether a command can be approved for the rest of the running session.
     *
     * Simple commands like `git status` or `npm test` can be session approved
     * because their impact is predictable. Complex commands with substitutions,
     * variables, or side effects require per-invocation approval.
     *
     * Examples of session-approvable: `ls`, `git log`, `command1 && command2`
     * Examples requiring per-invocation: `rm -rf $DIR`, `find -exec`
     */
    readonly canOfferSessionApproval: boolean;
    /**
     * Whether the script contains shell expansion patterns that could enable
     * remote code execution (e.g., ${var@P}, ${!var}, nested command substitution
     * inside parameter expansion). When true, the command should be unconditionally
     * blocked regardless of permission mode.
     */
    readonly hasDangerousExpansion: boolean;
    /**
     * Optional warning message to display to the user (e.g., when parser is unavailable).
     * This should be shown in the permission dialog and/or timeline.
     */
    readonly warning?: string;
};

/**
 * Scores sessions by relevance to the current working directory context.
 *
 * When a current context is provided, returns sessions scored by relevance and
 * sorted by score (descending), then by modification time (descending).
 *
 * When no current context is provided, all sessions receive a score of 0 and
 * the original input order is preserved.
 */
declare function scoreAndSortSessions<T extends SessionMetadata>(sessions: T[], currentContext?: WorkingDirectoryContext): ScoredSessionMetadata<T>[];

/**
 * Session metadata with its relevance score for display grouping.
 */
declare interface ScoredSessionMetadata<T extends SessionMetadata = SessionMetadata> {
    session: T;
    score: RelevanceScore;
}

/**
 * Scores the relevance of a session's context to the current working directory context.
 * Higher scores indicate more relevant sessions.
 *
 * Scoring:
 * - 4: Same repository + same branch (exact match)
 * - 3: Same repository, different branch
 * - 2: Same git root (for non-GitHub repos)
 * - 1: Same working directory (for non-git directories)
 * - 0: No match
 */
declare function scoreSessionRelevance(sessionContext: SessionContext | undefined, currentContext: WorkingDirectoryContext): RelevanceScore;

/**
 * Override operation for a single system prompt section.
 */
declare interface SectionOverride {
    /** The operation to perform on this section. */
    action: "replace" | "remove" | "append" | "prepend";
    /**
     * Content for the override. Optional for all actions.
     * For append/prepend, the current section content is preserved when omitted.
     * For replace, omitting content is equivalent to replacing with an empty string.
     * Ignored for the remove action.
     */
    content?: string;
}

export declare type SelectionAttachment = z.infer<typeof SelectionAttachmentSchema>;

declare const SelectionAttachmentSchema: z.ZodObject<{
    type: z.ZodLiteral<"selection">;
    filePath: z.ZodString;
    displayName: z.ZodString;
    text: z.ZodString;
    selection: z.ZodObject<{
        start: z.ZodObject<{
            line: z.ZodNumber;
            character: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            line: number;
            character: number;
        }, {
            line: number;
            character: number;
        }>;
        end: z.ZodObject<{
            line: z.ZodNumber;
            character: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            line: number;
            character: number;
        }, {
            line: number;
            character: number;
        }>;
    }, "strip", z.ZodTypeAny, {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    }, {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    text: string;
    type: "selection";
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
    filePath: string;
}, {
    text: string;
    type: "selection";
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
    filePath: string;
}>;

export declare interface SendOptions {
    prompt: string;
    /** If provided, this is shown in the timeline instead of prompt */
    displayPrompt?: string;
    attachments?: Attachment[];
    mode?: "enqueue" | "immediate";
    abortController?: AbortController;
    /**
     * If true, adds the message to the front of the queue instead of the end.
     * This is useful when a queued command (e.g., /plan, /review) returns an agentMessage
     * that should be processed immediately after the command, before other queued items.
     * Without this, the agentMessage would be appended to the end and processed after
     * any other items already in the queue.
     */
    prepend?: boolean;
    /**
     * If set to false, this message won't trigger a PRU (Premium Request Unit) charge.
     * User messages default to billable. Set to false to override.
     */
    billable?: boolean;
    /**
     * If set, the request will fail if the named tool is not available when this message
     * is among the user messages at the start of the current exchange (after the last
     * assistant message). Use this to guard messages that reference a specific tool.
     */
    requiredTool?: string;
    /** The agent mode active when this message was sent (interactive, plan, autopilot) */
    agentMode?: AgentMode;
    /** Source identifier for this message. "system" indicates runtime-generated notifications that should be hidden from timeline. */
    source?: "system";
    /** Structured metadata for system notifications. Only used when source is "system". */
    notificationKind?: SystemNotificationKind;
}

declare type ServerConnectionStatus = "connected" | "failed" | "pending" | "disabled" | "not_configured";

declare interface ServerFailureInfo {
    error: Error;
    timestamp: number;
}

/**
 * Interface for reporting server connection status changes.
 * Implement this interface to receive notifications when servers start connecting,
 * connect successfully, or fail to connect.
 */
declare interface ServerStatusCallback {
    onServerStatus(serverName: string, event: ServerStatusEvent): void;
}

/**
 * Server status event types for the status callback.
 */
declare type ServerStatusEvent = {
    status: "starting";
} | {
    status: "connected";
} | {
    status: "failed";
    error: Error;
};

export declare abstract class Session<SM extends SessionMetadata = SessionMetadata> implements ApiSchemaToInterface<typeof sessionApiSchema> {
    readonly model: ApiSchemaToInterface<{
        getCurrent: {
            result: ZodObject<    {
            modelId: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId?: string | undefined;
            }, {
            modelId?: string | undefined;
            }>;
        };
        switchTo: {
            params: ZodObject<    {
            modelId: ZodString;
            reasoningEffort: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId: string;
            reasoningEffort?: string | undefined;
            }, {
            modelId: string;
            reasoningEffort?: string | undefined;
            }>;
            result: ZodObject<    {
            modelId: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId?: string | undefined;
            }, {
            modelId?: string | undefined;
            }>;
        };
    }>;
    readonly mode: ApiSchemaToInterface<{
        get: {
            result: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "plan" | "autopilot";
            }, {
            mode: "interactive" | "plan" | "autopilot";
            }>;
        };
        set: {
            params: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "plan" | "autopilot";
            }, {
            mode: "interactive" | "plan" | "autopilot";
            }>;
            result: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "plan" | "autopilot";
            }, {
            mode: "interactive" | "plan" | "autopilot";
            }>;
        };
    }>;
    readonly plan: ApiSchemaToInterface<{
        read: {
            result: ZodObject<    {
            exists: ZodBoolean;
            content: ZodNullable<ZodString>;
            path: ZodNullable<ZodString>;
            }, "strip", ZodTypeAny, {
            content: string | null;
            path: string | null;
            exists: boolean;
            }, {
            content: string | null;
            path: string | null;
            exists: boolean;
            }>;
        };
        update: {
            params: ZodObject<    {
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            }, {
            content: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        delete: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    }>;
    readonly workspace: ApiSchemaToInterface<{
        listFiles: {
            result: ZodObject<    {
            files: ZodArray<ZodString, "many">;
            }, "strip", ZodTypeAny, {
            files: string[];
            }, {
            files: string[];
            }>;
        };
        readFile: {
            params: ZodObject<    {
            path: ZodString;
            }, "strip", ZodTypeAny, {
            path: string;
            }, {
            path: string;
            }>;
            result: ZodObject<    {
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            }, {
            content: string;
            }>;
        };
        createFile: {
            params: ZodObject<    {
            path: ZodString;
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            path: string;
            }, {
            content: string;
            path: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    }>;
    readonly fleet: ApiSchemaToInterface<{
        start: {
            params: ZodObject<    {
            prompt: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            prompt?: string | undefined;
            }, {
            prompt?: string | undefined;
            }>;
            result: ZodObject<    {
            started: ZodBoolean;
            }, "strip", ZodTypeAny, {
            started: boolean;
            }, {
            started: boolean;
            }>;
        };
    }>;
    readonly agent: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            agents: ZodArray<ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }>;
        };
        getCurrent: {
            result: ZodObject<    {
            agent: ZodNullable<ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>>;
            }, "strip", ZodTypeAny, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            } | null;
            }, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            } | null;
            }>;
        };
        select: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
            result: ZodObject<    {
            agent: ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>;
            }, "strip", ZodTypeAny, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            };
            }, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            };
            }>;
        };
        deselect: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {
            agents: ZodArray<ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }>;
        };
    }>;
    readonly skills: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            skills: ZodArray<ZodObject<    {
            name: ZodString;
            description: ZodString;
            source: ZodString;
            userInvocable: ZodBoolean;
            enabled: ZodBoolean;
            path: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }, {
            skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        disable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    }>;
    readonly mcp: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            servers: ZodArray<ZodObject<    {
            name: ZodString;
            status: ZodEnum<["connected", "failed", "pending", "disabled", "not_configured"]>;
            source: ZodOptional<ZodString>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }[];
            }, {
            servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        disable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    }>;
    readonly plugins: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            plugins: ZodArray<ZodObject<    {
            name: ZodString;
            marketplace: ZodString;
            version: ZodOptional<ZodString>;
            enabled: ZodBoolean;
            }, "strip", ZodTypeAny, {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }, {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            plugins: {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }[];
            }, {
            plugins: {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }[];
            }>;
        };
    }>;
    readonly extensions: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            extensions: ZodArray<ZodObject<    {
            id: ZodString;
            name: ZodString;
            source: ZodEnum<["project", "user"]>;
            status: ZodEnum<["running", "disabled", "failed", "starting"]>;
            pid: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }[];
            }, {
            extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        disable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    }>;
    readonly compaction: ApiSchemaToInterface<{
        compact: {
            result: ZodObject<    {
            success: ZodBoolean;
            tokensRemoved: ZodNumber;
            messagesRemoved: ZodNumber;
            }, "strip", ZodTypeAny, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            }, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            }>;
        };
    }>;
    readonly tools: ApiSchemaToInterface<{
        handlePendingToolCall: {
            params: ZodObject<    {
            requestId: ZodString;
            result: ZodOptional<ZodUnion<[ZodString, ZodObject<    {
            textResultForLlm: ZodString;
            resultType: ZodOptional<ZodString>;
            error: ZodOptional<ZodString>;
            toolTelemetry: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
            }, "strip", ZodTypeAny, {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            }, {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            }>]>>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            } | undefined;
            }, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            } | undefined;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    }>;
    readonly permissions: ApiSchemaToInterface<{
        handlePendingPermissionRequest: {
            params: ZodObject<    {
            requestId: ZodString;
            result: ZodDiscriminatedUnion<"kind", [ZodObject<    {
            kind: ZodLiteral<"approved">;
            }, "strip", ZodTypeAny, {
            kind: "approved";
            }, {
            kind: "approved";
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-by-rules">;
            rules: ZodArray<ZodUnknown, "many">;
            }, "strip", ZodTypeAny, {
            kind: "denied-by-rules";
            rules: unknown[];
            }, {
            kind: "denied-by-rules";
            rules: unknown[];
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-no-approval-rule-and-could-not-request-from-user">;
            }, "strip", ZodTypeAny, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            }, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-interactively-by-user">;
            feedback: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            }, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-by-content-exclusion-policy">;
            path: ZodString;
            message: ZodString;
            }, "strip", ZodTypeAny, {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            }, {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            }>]>;
            }, "strip", ZodTypeAny, {
            result: {
            kind: "approved";
            } | {
            kind: "denied-by-rules";
            rules: unknown[];
            } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            } | {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            };
            requestId: string;
            }, {
            result: {
            kind: "approved";
            } | {
            kind: "denied-by-rules";
            rules: unknown[];
            } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            } | {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            };
            requestId: string;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    }>;
    readonly log: (params: {
        message: string;
        url?: string | undefined;
        ephemeral?: boolean | undefined;
        level?: "error" | "info" | "warning" | undefined;
    }) => {
        eventId: string;
    } | Promise<{
        eventId: string;
    }>;
    private shellNotifier;
    readonly shell: ApiSchemaToInterface<{
        exec: {
            params: ZodObject<    {
            command: ZodString;
            cwd: ZodOptional<ZodString>;
            timeout: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            command: string;
            timeout?: number | undefined;
            cwd?: string | undefined;
            }, {
            command: string;
            timeout?: number | undefined;
            cwd?: string | undefined;
            }>;
            result: ZodObject<    {
            processId: ZodString;
            }, "strip", ZodTypeAny, {
            processId: string;
            }, {
            processId: string;
            }>;
        };
        kill: {
            params: ZodObject<    {
            processId: ZodString;
            signal: ZodOptional<ZodEnum<["SIGTERM", "SIGKILL", "SIGINT"]>>;
            }, "strip", ZodTypeAny, {
            processId: string;
            signal?: "SIGINT" | "SIGKILL" | "SIGTERM" | undefined;
            }, {
            processId: string;
            signal?: "SIGINT" | "SIGKILL" | "SIGTERM" | undefined;
            }>;
            result: ZodObject<    {
            killed: ZodBoolean;
            }, "strip", ZodTypeAny, {
            killed: boolean;
            }, {
            killed: boolean;
            }>;
        };
    }>;
    /** Set the notification sender for shell output/exit events. Called by
     *  the server when it starts forwarding events for this session. */
    setShellNotifier(notifier: {
        sendOutput: (n: ShellOutputNotification) => void;
        sendExit: (n: ShellExitNotification) => void;
    }): void;
    /** Backing field for currentMode getter/setter */
    private _currentMode;
    /** The current agent mode for this session. Emits session.mode_changed on change. */
    get currentMode(): SessionMode;
    set currentMode(mode: SessionMode);
    readonly sessionId: string;
    readonly startTime: Date;
    readonly modifiedTime: Date;
    readonly summary?: string;
    /** Get the resolved feature flags for this session */
    get resolvedFeatureFlags(): FeatureFlags | undefined;
    get resolvedFeatureFlagService(): FeatureFlagService | undefined;
    /** Whether experimental mode is enabled for this session */
    isExperimentalMode: boolean;
    /** Get the installed plugins for this session */
    getInstalledPlugins(): readonly InstalledPlugin[] | undefined;
    /** Get the skills that were loaded during session initialization. */
    getLoadedSkills(): readonly Skill[];
    /**
     * Ensure skills have been loaded. If skills haven't been loaded yet (no session.send has
     * been called), triggers a lightweight skill load so that session.skills.list returns
     * accurate results without waiting for the first message.
     */
    ensureSkillsLoaded(): Promise<void>;
    /**
     * Ensure custom agents have been loaded. Awaits the pending load started in the constructor
     * if it hasn't completed yet. If the constructor's load was skipped (e.g., authInfo wasn't
     * available yet for resumed sessions), retries loading now that authInfo may be set.
     */
    ensureAgentsLoaded(): Promise<void>;
    /**
     * Ensure MCP servers have been initialized. If the MCP host hasn't been created yet
     * (i.e., no message has been sent), this creates and starts it so that
     * session.mcp.list returns accurate results without waiting for the first message.
     */
    ensureMcpLoaded(): Promise<void>;
    /** Clear the loaded skills cache and reset loading state so the next list triggers a full reload. */
    clearLoadedSkills(): void;
    /** Clear cached agents so the next ensureAgentsLoaded() call re-scans from disk. */
    clearCachedAgents(): void;
    /** Check whether a skill is currently disabled. */
    isSkillDisabled(skillName: string): boolean;
    /** Get a summary of MCP server states for the current session. */
    getMcpServerSummaries(): Array<{
        name: string;
        status: ServerConnectionStatus;
        source?: string;
        error?: string;
    }>;
    /** Enable a previously disabled MCP server (runtime-only, not persisted). */
    enableMcpServer(serverName: string): Promise<void>;
    /** Disable an MCP server (runtime-only, not persisted). */
    disableMcpServer(serverName: string): Promise<void>;
    /**
     * Reload MCP servers with new configuration.
     * Creates a new McpHost internally, stops the previous one, and starts the new servers.
     * Pre-processes config to detect user-configured GitHub MCP servers and stash them
     * for later auth (via configureGitHubMcp).
     * If config is provided, uses it directly. Otherwise falls back to the legacy
     * reloadMcpConfig callback (for backwards compatibility during migration).
     */
    reloadMcpServers(config?: {
        mcpServers: Record<string, MCPServerConfig>;
        disabledServers?: string[];
        mcp3pEnabled?: boolean;
        configFilter?: McpConfigFilter;
        statusCallback?: ServerStatusCallback;
        githubMcpToolOptions?: Required<GitHubMcpConfigOptions>;
    }): Promise<void>;
    /**
     * Configure the GitHub MCP server for the given auth info.
     * Starts pending user-configured GitHub servers and the built-in server.
     * @returns true if GitHub auth was applied, false if ignored
     */
    configureGitHubMcp(authInfo: AuthInfo): Promise<boolean>;
    /**
     * Remove GitHub MCP server configuration (e.g., on logout).
     * @returns true if GitHub server was removed, false if no action taken
     */
    removeGitHubMcp(): Promise<boolean>;
    /** Get the extension controller if extensions are available. */
    getExtensionController(): ExtensionController | undefined;
    /** Get the MCP host (if initialized) for status queries. */
    getMcpHost(): McpHost | undefined;
    /** Enable a skill by removing it from the disabled set. */
    enableSkill(skillName: string): void;
    /** Disable a skill by adding it to the disabled set. */
    disableSkill(skillName: string): void;
    /** Emit a skills_loaded event with the current skill state. */
    private emitSkillsChanged;
    private events;
    protected _chatMessages: ChatCompletionMessageParam[];
    protected _selectedModel: string | undefined;
    protected originalUserMessages: string[];
    /** Skills invoked during this session, for preservation across compaction */
    protected invokedSkills: InvokedSkillInfo[];
    private compactionCheckpointLength;
    private compactionCheckpointEventIndex;
    private eventProcessingQueue;
    private eventHandlers;
    private wildcardEventHandlers;
    private usageMetricsTracker;
    protected integrationId: string;
    protected availableTools?: string[];
    protected excludedTools?: string[];
    protected enableScriptSafety?: boolean;
    protected shellInitProfile?: ShellInitProfile;
    protected shellProcessFlags?: string[];
    /** Cached ShellConfig, invalidated when options change. */
    protected resolvedShellConfig?: ShellConfig;
    protected logInteractiveShells?: boolean;
    protected mcpServers?: Record<string, MCPServerConfig>;
    protected mcpHost?: McpHost;
    protected envValueMode?: EnvValueMode;
    protected pendingGitHubMcpServers: Map<string, MCPRemoteServerConfig>;
    protected hasUserNamedGitHubServer: boolean;
    protected hasUserConfiguredGitHubServer: boolean;
    protected lastGitHubAuthInfo: AuthInfo | null;
    protected githubMcpToken: string | undefined;
    protected githubMcpToolOptions?: Required<GitHubMcpConfigOptions>;
    protected selectedAgentMcpServerNames: Set<string>;
    protected lastInitializedAgentMcpServers?: Record<string, MCPServerConfig>;
    protected hooks?: QueryHooks;
    protected customAgents?: SweCustomAgent[];
    protected selectedCustomAgent?: SweCustomAgent;
    protected organizationCustomInstructions?: string;
    protected skipCustomInstructions: boolean;
    protected disabledInstructionSources?: ReadonlySet<string>;
    protected coauthorEnabled?: boolean;
    protected systemMessageConfig?: SystemMessageConfig;
    protected workingDir: string;
    protected featureFlags?: FeatureFlags;
    protected featureFlagService?: FeatureFlagService;
    protected skillDirectories?: string[];
    protected disabledSkills?: Set<string>;
    protected _loadedSkills: Skill[];
    protected _skillsLoaded: boolean;
    protected _skillsLoadingPromise?: Promise<void>;
    protected _agentsLoadingPromise?: Promise<void>;
    protected _mcpLoadingPromise?: Promise<void>;
    protected installedPlugins?: InstalledPlugin[];
    protected askUserDisabled?: boolean;
    protected onExitPlanMode?: (request: ExitPlanModeRequest) => Promise<ExitPlanModeResponse>;
    protected reloadMcpConfig?: () => Promise<void>;
    protected extensionController?: ExtensionController;
    protected agentContext?: AgentContext;
    protected sessionTelemetry?: TelemetrySender;
    protected runningInInteractiveMode?: boolean;
    protected sessionCapabilities?: Set<SessionCapability>;
    protected additionalContentExclusionPolicies?: ContentExclusionApiResponse[];
    /** Content exclusion service auto-created by Session when auth and feature flags are available. */
    protected contentExclusionService?: ContentExclusionService;
    /** Returns the content exclusion service, or undefined if not yet initialized. */
    getContentExclusionService(): ContentExclusionService | undefined;
    protected trajectoryFile?: string;
    protected eventsLogDirectory?: string;
    protected transcriptPath?: string;
    protected authInfo?: AuthInfo;
    protected copilotUrl?: string;
    protected provider?: ProviderConfig;
    protected reasoningEffort?: ReasoningEffortOption;
    protected enableStreaming: boolean;
    protected handoffContext?: string;
    protected externalToolDefinitions?: ExternalToolDefinition[];
    /** Bumped when externalToolDefinitions changes, used by refreshTools to detect mid-turn changes */
    protected externalToolsVersion: number;
    protected clientName?: string;
    protected largeOutputConfig?: LargeToolOutputConfig;
    protected runtimeSettings?: RuntimeSettings;
    protected configDir?: string;
    protected repositoryName?: string;
    protected machineId?: string;
    protected workspaceContext?: WorkspaceContextInfo;
    readonly taskRegistry: TaskRegistry;
    protected currentSystemMessage?: string;
    protected currentToolMetadata?: ToolMetadata[];
    protected currentTools?: Tool_2[];
    protected previousModelUsed?: string;
    protected readonly pendingRequests: PendingRequestStore;
    /** Check whether any typed handlers are registered for a specific event type. */
    protected hasEventListeners(eventType: string): boolean;
    /** Respond to a pending permission request by its ID. */
    respondToPermission(requestId: string, result: PermissionRequestResult): void;
    /** Respond to a pending user input request by its ID. */
    respondToUserInput(requestId: string, response: {
        answer: string;
        wasFreeform: boolean;
    }): void;
    /**
     * Emit an elicitation request event and return a promise that resolves when a client responds.
     * Used by MCP servers (via their elicitation handler) to request structured input from the user.
     */
    requestElicitation(request: ElicitRequestParams, elicitationSource?: string): Promise<ElicitResult>;
    /** Respond to a pending elicitation request by its ID. */
    respondToElicitation(requestId: string, response: ElicitResult): void;
    /**
     * Emit an MCP OAuth request event and return a promise that resolves when a client responds.
     * Used when an MCP server requires OAuth authentication.
     */
    requestMcpOAuth(serverName: string, serverUrl: string, staticClientConfig?: {
        clientId: string;
        publicClient?: boolean;
    }): Promise<OAuthClientProvider | undefined>;
    /** Respond to a pending MCP OAuth request by its ID. */
    respondToMcpOAuth(requestId: string, provider: OAuthClientProvider | undefined): void;
    /** Respond to a pending external tool request by its ID. */
    respondToExternalTool(requestId: string, result: ToolResult): void;
    /** Reject a pending external tool request (e.g., on dispatch failure). */
    rejectExternalTool(requestId: string, error: Error): void;
    /** Respond to a pending queued command request by its ID. */
    respondToQueuedCommand(requestId: string, result: QueuedCommandResult): void;
    /** Respond to a pending exit plan mode request by its ID. */
    respondToExitPlanMode(requestId: string, response: ExitPlanModeResponse): void;
    abstract send(options: SendOptions): Promise<void>;
    abstract abort(): Promise<void>;
    /**
     * Check if the session is currently in a state where it can be aborted.
     * Returns true if there's an active operation that can be cancelled.
     * Default implementation returns false. Override in subclasses that support abortion.
     */
    isAbortable(): boolean;
    /**
     * Initializes tools and validates tool filter configuration.
     * This method should be called after the session is fully configured (auth, model, MCP servers)
     * but before the first message is sent. It will emit warnings for any unknown tool names
     * specified in availableTools or excludedTools.
     *
     * Default implementation is a no-op. Override in subclasses that support tool validation.
     *
     * @returns Promise that resolves when initialization and validation is complete
     */
    initializeAndValidateTools(): Promise<void>;
    constructor(options?: SessionOptions);
    abstract getMetadata(): SM;
    /**
     * Get the current usage metrics for this session.
     * Returns aggregated metrics including premium requests, tokens, and code changes.
     */
    get usageMetrics(): UsageMetrics;
    /**
     * Computes token breakdown for the current context window state.
     * Partitions tokens into system, conversation, and tool definitions.
     *
     * Note: Uses currentToolMetadata which approximates the real request payload
     * (e.g., does not account for deferred tool loading or custom tool formats).
     * For precise per-turn breakdowns, use the session_usage_info event instead.
     *
     * @param messages - Chat messages to analyze (defaults to this._chatMessages)
     */
    protected computeContextBreakdown(messages?: readonly ChatCompletionMessageParam[]): {
        totalTokens: number;
        systemTokens: number;
        conversationTokens: number;
        toolDefinitionsTokens: number;
    };
    /**
     * Emit a session.shutdown event with the current usage metrics.
     * This event is persisted to events.jsonl.
     *
     * @param shutdownType - Whether this is a routine shutdown or error shutdown
     */
    private hasShutdown;
    shutdown(shutdownType?: "routine" | "error", errorReason?: string): void;
    static fromEvents<S extends Session, O extends SessionOptions = SessionOptions>(this: new (_options: O) => S, events: SessionEvent[], options?: O): Promise<S>;
    /**
     * Updates the authentication information for this session.
     * This is a convenience method equivalent to updateOptions({ authInfo }).
     *
     * @param authInfo - The new authentication information to use for this session
     */
    setAuthInfo(authInfo: AuthInfo | undefined): void;
    /**
     * Updates session options after creation.
     * This method allows selectively updating configuration options without recreating the session.
     * Only the provided options will be updated; omitted options remain unchanged.
     *
     * @param options - Partial session options to update
     *
     * @example
     * ```typescript
     * // Update multiple options at once
     * session.updateOptions({
     *   logger: fileLogger,
     *   mcpServers: mcpConfig,
     *   customAgents: loadedAgents
     * });
     *
     * // Or use convenience methods for single updates
     * session.setAuthInfo(newAuthInfo); // Preferred for auth
     * session.setSelectedModel(newModel); // Preferred for model
     * ```
     */
    updateOptions(options: Partial<UpdatableSessionOptions>): void;
    /**
     * Set the telemetry sender for this session.
     * @param sender - The telemetry sender, or undefined to clear
     */
    setTelemetrySender(sender: TelemetrySender | undefined): void;
    /**
     * Send a telemetry event if telemetry is configured.
     * This is a no-op if no telemetry sender was set.
     *
     * @param event - The telemetry event to send
     */
    sendTelemetry(event: TelemetryEvent): void;
    /**
     * Get list of available custom agents.
     * Returns the custom agents that were provided when the session was created.
     *
     * @returns Array of available custom agents
     */
    getAvailableCustomAgents(): SweCustomAgent[];
    /**
     * Get the currently selected custom agent.
     *
     * @returns The selected custom agent, or undefined if using the default agent
     */
    getSelectedCustomAgent(): SweCustomAgent | undefined;
    /**
     * Get the SDK client name for this session.
     * This identifies the SDK consumer (e.g., "autopilot", "sdk").
     */
    getClientName(): string | undefined;
    /**
     * Get the custom configuration directory for this session.
     * When set, this overrides the default Copilot config directory (~/.copilot or $COPILOT_HOME).
     *
     * @returns The custom configuration directory, or undefined if using the default
     */
    getConfigDir(): string | undefined;
    /**
     * Get all background tasks (agents and shells) started by this session.
     * Returns a unified array with type discriminator for each task.
     */
    getBackgroundTasks(): BackgroundTask[];
    /**
     * Returns the current set of available tools as {@link ToolMetadata} objects.
     * This strips non-serializable properties (callback, shutdown, summariseIntention)
     * from the full Tool objects.
     */
    getToolDefinitions(): ToolMetadata[];
    private getToolCallSummary;
    /**
     * Gets progress information for a background task.
     * For agent tasks, derives progress from session events filtered by parentToolCallId.
     * For shell tasks, reads recent output from the log file.
     *
     * @param task - The background task to get progress for
     * @returns Progress information discriminated by task type
     */
    getBackgroundTaskProgress(task: BackgroundTask): Promise<BackgroundTaskProgress>;
    /**
     * Cancel or kill a background task by ID.
     * For agents, this cancels the execution (soft cancel).
     * For shells, this kills the process (hard kill).
     *
     * @param taskId - The task ID (agent ID or shell ID)
     * @returns true if the task was found and cancelled/killed, false otherwise
     */
    cancelBackgroundTask(taskId: string): Promise<boolean>;
    /**
     * Refresh the status of all background tasks.
     * This updates shell statuses by checking if their processes are still running.
     * Agent statuses are updated automatically via their completion callbacks.
     */
    refreshBackgroundTasks(): Promise<void>;
    /**
     * Remove a finalized background task from tracking.
     * Only removes tasks that are not running (completed, failed, cancelled, killed).
     *
     * @param taskId - The task ID (agent ID or shell ID)
     * @returns true if the task was found and removed, false otherwise
     */
    removeBackgroundTask(taskId: string): boolean;
    /**
     * Notify listeners that background tasks have changed.
     * Called internally when tasks start or complete.
     */
    protected notifyBackgroundTaskChange(): void;
    /** Hook called after compaction replaces chat messages. Override to reset per-turn dedup state. */
    protected onCompactionApplied(): void;
    protected getRuntimeSettings(): RuntimeSettings;
    /**
     * Resolves the repository name to use for settings.
     * Returns the explicitly configured repositoryName if set,
     * otherwise attempts to detect it from the git remote in the working directory.
     *
     * @returns The repository name in "owner/repo" format, or undefined if not available
     */
    protected resolveRepositoryName(): Promise<string | undefined>;
    /**
     * Select a custom agent for subsequent queries.
     * When a custom agent is selected, only that agent's tools (and required tools) will be available.
     * The selected custom agent will still be available via the task tool.
     *
     * @param agentId - The name/id of the custom agent to select
     * @throws Error if the agent is not found
     */
    selectCustomAgent(agentId: string): Promise<void>;
    /**
     * Clear custom agent selection.
     * After calling this, all tools will be available again.
     */
    clearCustomAgent(): void;
    /**
     * Registers an event handler for specific event types or all events.
     * Supports both synchronous and asynchronous handlers.
     *
     * @param eventType - The event type to listen for (e.g., "assistant.message", "tool.execution_complete") or "*" for all events
     * @param handler - The handler function to call when the event is emitted. Can be sync or async.
     * @returns A function that unsubscribes the handler when called
     */
    on<K extends EventType>(eventType: K, handler: EventHandler<K>): () => void;
    on(eventType: "*", handler: WildcardEventHandler): () => void;
    /**
     * Emits an event to all registered handlers.
     * Automatically generates event fields (id, timestamp, parentId) and adds the event to the session history.
     * Triggers both legacy callbacks and new-style event handlers.
     *
     * @param eventType - The type of event to emit
     * @param data - The event data payload
     * @param ephemeral - Whether this event should be persisted (default: false)
     */
    private emitInternal;
    /**
     * Emits an event to all registered handlers.
     * Automatically generates event fields (id, timestamp, parentId) and adds the event to the session history.
     * Triggers both legacy callbacks and new-style event handlers. Does not allow emitting ephemeral events.
     *
     * @param eventType - The type of event to emit
     * @param data - The event data payload
     */
    emit<K extends EventType>(eventType: EventPayload<K>["ephemeral"] extends true ? never : K, data: EventData<K>): void;
    /**
     * Emits an ephemeral event (not persisted to disk).
     * Convenience method that calls emit() with ephemeral = true.
     *
     * @param eventType - The type of event to emit
     * @param data - The event data payload
     */
    emitEphemeral<K extends EventType>(eventType: EventPayload<K>["ephemeral"] extends false ? never : K, data: EventData<K>): void;
    /** Adapter that bridges session emit to the HookEventEmitter interface for executeHooks. */
    protected readonly hookEventEmitter: HookEventEmitter;
    /**
     * Returns all events that have occurred in the session.
     * Events are returned in chronological order and include all session lifecycle, user messages,
     * assistant responses, tool executions, and other session events.
     *
     * @returns A readonly array of all session events
     */
    getEvents(): readonly SessionEvent[];
    /**
     * Truncates the session to a specific event, removing all events after it.
     * This clears and rebuilds the internal state (chat messages, etc.) from the remaining events.
     *
     * Note: This only affects in-memory state. The caller is responsible for
     * persisting the truncation to disk (e.g., via SessionEventState.truncate).
     *
     * @param upToEventId - The event ID to truncate to (this event is excluded)
     * @returns The number of events removed
     */
    truncateToEvent(upToEventId: string): Promise<{
        eventsRemoved: number;
    }>;
    /**
     * Returns all chat messages reconstructed from session events.
     * Messages are processed asynchronously in order to handle attachments and ensure consistency.
     * Includes user messages, assistant messages, tool messages, and system messages.
     *
     * @returns A Promise that resolves to a readonly array of chat completion messages
     * ```
     */
    getChatMessages(): Promise<readonly ChatCompletionMessageParam[]>;
    /**
     * Returns chat messages that are part of the conversation context (excludes system messages).
     * Useful for displaying the user/assistant conversation without system prompts.
     *
     * @returns A Promise that resolves to an array of user, assistant, and tool messages
     */
    getChatContextMessages(): Promise<ChatCompletionMessageParam[]>;
    /**
     * Returns only system and developer messages from the chat history.
     * Useful for inspecting the system prompts and instructions given to the model.
     *
     * @returns A Promise that resolves to an array of system/developer messages
     */
    getSystemContextMessages(): Promise<ChatCompletionMessageParam[]>;
    /**
     * Returns the list of skills that have been invoked in this session.
     * Used for restoring skill permissions on session resume and for compaction.
     *
     * @returns A readonly array of invoked skill information
     */
    getInvokedSkills(): readonly InvokedSkillInfo[];
    /**
     * Returns the current system message used in the most recent agent turn.
     * This is the full system prompt that was sent to the model.
     *
     * @returns The system message string, or undefined if not yet initialized
     */
    getCurrentSystemMessage(): string | undefined;
    /**
     * Returns lightweight tool metadata for token counting.
     * Used by /context command to calculate token usage.
     *
     * @returns The array of tool metadata, or undefined if not yet initialized
     */
    getCurrentToolMetadata(): ToolMetadata[] | undefined;
    /**
     * Returns the currently selected model for this session.
     * The model may change during a session if `setSelectedModel` is called.
     *
     * @returns A Promise that resolves to the model identifier string, or undefined if no model is set
     */
    getSelectedModel(): Promise<string | undefined>;
    /**
     * Returns the current reasoning effort level for this session.
     *
     * @returns The reasoning effort level, or undefined if not set
     */
    getReasoningEffort(): ReasoningEffortOption | undefined;
    /**
     * Returns the organization custom instructions configured for this session.
     * These are additional instructions provided by the organization.
     *
     * @returns The organization custom instructions string, or undefined if not set
     */
    getOrganizationCustomInstructions(): string | undefined;
    /**
     * Returns whether custom instructions should be skipped for this session.
     *
     * @returns True if custom instructions should be skipped, false otherwise
     */
    getSkipCustomInstructions(): boolean;
    /**
     * Returns the individual custom instruction sources discovered for this session.
     * Uses the git root and working directory to match the system prompt loading path.
     *
     * @returns Array of individual instruction sources
     */
    getInstructionSources(): Promise<InstructionSource[]>;
    /**
     * Returns the system message configuration for this session.
     * This can be used to replace or append to the default system message.
     *
     * @returns The system message config, or undefined if not set
     */
    getSystemMessageConfig(): SystemMessageConfig | undefined;
    /**
     * Sets the workspace context for infinite sessions.
     * This context is injected into the system prompt to give the agent
     * awareness of the workspace and its history.
     *
     * @param context - The workspace context info, or undefined to clear
     */
    setWorkspaceContext(context: WorkspaceContextInfo | undefined): void;
    /**
     * Gets the current workspace context, if any.
     */
    getWorkspaceContext(): WorkspaceContextInfo | undefined;
    /**
     * Returns the effective capabilities for this session.
     * Applies runtime overrides (e.g., askUserDisabled, runningInInteractiveMode) to the base capabilities.
     */
    protected getEffectiveCapabilities(): Set<SessionCapability>;
    /**
     * Get the current workspace, if any.
     * Only available for LocalSession when infinite sessions are enabled.
     */
    getWorkspace(): Workspace | null;
    /**
     * Check if workspace features are enabled for this session.
     */
    isWorkspaceEnabled(): boolean;
    /**
     * Get the workspace path for this session.
     * Returns null for base Session (non-local sessions don't have workspaces).
     */
    getWorkspacePath(): string | null;
    /**
     * Get the number of checkpoints in the workspace.
     */
    getCheckpointCount(): number;
    /**
     * Rename the session (set custom name).
     * Updates both in-memory workspace and persists to disk.
     */
    renameSession(_name: string): Promise<void>;
    /**
     * List checkpoints with their titles for context injection.
     */
    listCheckpointTitles(): Promise<{
        number: number;
        title: string;
        filename: string;
    }[]>;
    /**
     * Check if a plan.md file exists in the workspace.
     */
    hasPlan(): boolean;
    /**
     * Get the absolute file path of plan.md in the workspace.
     * Returns null if workspace is not enabled.
     */
    getPlanPath(): string | null;
    /**
     * Read the plan.md content from the workspace.
     * Returns null if no plan exists.
     */
    readPlan(): Promise<string | null>;
    /**
     * Write plan content to the workspace plan.md file.
     */
    writePlan(_content: string): Promise<void>;
    /**
     * Delete the workspace plan.md file.
     */
    deletePlan(): Promise<void>;
    /**
     * List files in the workspace files directory.
     */
    listWorkspaceFiles(): Promise<string[]>;
    /**
     * Read a file from the workspace files directory.
     */
    readWorkspaceFile(_path: string): Promise<string>;
    /**
     * Write a file to the workspace files directory.
     */
    writeWorkspaceFile(_path: string, _content: string): Promise<void>;
    /**
     * Ensure workspace exists for this session.
     * Only available for LocalSession when infinite sessions are enabled.
     */
    ensureWorkspace(_context?: WorkspaceContext): Promise<Workspace>;
    /**
     * Sets the selected model for this session and emits a model change event.
     * This allows switching models mid-session, with the change tracked in the event history.
     *
     * @param model - The model identifier to switch to
     * @param reasoningEffort - Optional reasoning effort level for the new model
     * @returns A Promise that resolves when the model change event has been emitted
     */
    setSelectedModel(model: string, reasoningEffort?: ReasoningEffortOption): Promise<void>;
    /**
     * Compacts the conversation history into a single summary message.
     * Used by the /compact slash command for manual compaction.
     *
     * @returns Promise that resolves with compaction results
     * @throws Error if compaction fails or is not supported
     */
    abstract compactHistory(): Promise<CompactionResult>;
    /**
     * Get the ID of the last event (for parentId chaining)
     */
    private getLastEventId;
    /**
     * Add a function to the event processing queue to ensure sequential processing
     * Returns a promise that resolves when the function has been processed
     * Ensures that state updates from events are processed in order
     */
    protected enqueueEventProcessing<T>(fn: () => T | PromiseLike<T>): Promise<T>;
    /**
     * Process event to update internal state (_chatMessages, _selectedModel, etc.)
     */
    private processEventForState;
    private loadCustomAgents;
    /**
     * Applies compaction to chat messages by splitting at the checkpoint and creating
     * post-compaction messages. Updates _chatMessages and returns the compacted and new messages.
     *
     * @param checkpointLength - The number of messages at the compaction checkpoint
     * @param summaryContent - The summary content from compaction
     * @returns The compacted messages and any new messages added after the checkpoint
     */
    protected applyCompactionToMessages(checkpointLength: number, summaryContent: string): {
        compacted: ChatCompletionMessageParam[];
        newMessages: ChatCompletionMessageParam[];
    };
    /**
     * Event types that are transient/ephemeral and can be safely evicted after
     * compaction. These events are not needed for state reconstruction (they
     * don't contribute to chat messages) and are the primary source of memory
     * growth in long-running sessions.
     */
    private static readonly TRANSIENT_EVENT_TYPES;
    /**
     * Evicts transient events from the events array for events that occurred
     * before the given index. This reduces memory without affecting state
     * reconstruction or timeline display for structural events.
     */
    private evictTransientEventsBeforeIndex;
}

/** Modes settable on session.currentMode (excludes shell, which is TUI-only) */
export declare const SESSION_MODES: readonly ["interactive", "plan", "autopilot"];

/** Overall schema for session API. This is the entrypoint for generating the session API JSON schema that is used in the SDK. */
declare const sessionApiSchema: {
    model: {
        getCurrent: {
            result: ZodObject<    {
            modelId: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId?: string | undefined;
            }, {
            modelId?: string | undefined;
            }>;
        };
        switchTo: {
            params: ZodObject<    {
            modelId: ZodString;
            reasoningEffort: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId: string;
            reasoningEffort?: string | undefined;
            }, {
            modelId: string;
            reasoningEffort?: string | undefined;
            }>;
            result: ZodObject<    {
            modelId: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId?: string | undefined;
            }, {
            modelId?: string | undefined;
            }>;
        };
    };
    mode: {
        get: {
            result: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "plan" | "autopilot";
            }, {
            mode: "interactive" | "plan" | "autopilot";
            }>;
        };
        set: {
            params: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "plan" | "autopilot";
            }, {
            mode: "interactive" | "plan" | "autopilot";
            }>;
            result: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "plan" | "autopilot";
            }, {
            mode: "interactive" | "plan" | "autopilot";
            }>;
        };
    };
    plan: {
        read: {
            result: ZodObject<    {
            exists: ZodBoolean;
            content: ZodNullable<ZodString>;
            path: ZodNullable<ZodString>;
            }, "strip", ZodTypeAny, {
            content: string | null;
            path: string | null;
            exists: boolean;
            }, {
            content: string | null;
            path: string | null;
            exists: boolean;
            }>;
        };
        update: {
            params: ZodObject<    {
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            }, {
            content: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        delete: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    };
    workspace: {
        listFiles: {
            result: ZodObject<    {
            files: ZodArray<ZodString, "many">;
            }, "strip", ZodTypeAny, {
            files: string[];
            }, {
            files: string[];
            }>;
        };
        readFile: {
            params: ZodObject<    {
            path: ZodString;
            }, "strip", ZodTypeAny, {
            path: string;
            }, {
            path: string;
            }>;
            result: ZodObject<    {
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            }, {
            content: string;
            }>;
        };
        createFile: {
            params: ZodObject<    {
            path: ZodString;
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            path: string;
            }, {
            content: string;
            path: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    };
    fleet: {
        start: {
            params: ZodObject<    {
            prompt: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            prompt?: string | undefined;
            }, {
            prompt?: string | undefined;
            }>;
            result: ZodObject<    {
            started: ZodBoolean;
            }, "strip", ZodTypeAny, {
            started: boolean;
            }, {
            started: boolean;
            }>;
        };
    };
    agent: {
        list: {
            result: ZodObject<    {
            agents: ZodArray<ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }>;
        };
        getCurrent: {
            result: ZodObject<    {
            agent: ZodNullable<ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>>;
            }, "strip", ZodTypeAny, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            } | null;
            }, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            } | null;
            }>;
        };
        select: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
            result: ZodObject<    {
            agent: ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>;
            }, "strip", ZodTypeAny, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            };
            }, {
            agent: {
            name: string;
            description: string;
            displayName: string;
            };
            }>;
        };
        deselect: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {
            agents: ZodArray<ZodObject<    {
            name: ZodString;
            displayName: ZodString;
            description: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            description: string;
            displayName: string;
            }, {
            name: string;
            description: string;
            displayName: string;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }, {
            agents: {
            name: string;
            description: string;
            displayName: string;
            }[];
            }>;
        };
    };
    skills: {
        list: {
            result: ZodObject<    {
            skills: ZodArray<ZodObject<    {
            name: ZodString;
            description: ZodString;
            source: ZodString;
            userInvocable: ZodBoolean;
            enabled: ZodBoolean;
            path: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }, {
            skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        disable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    };
    mcp: {
        list: {
            result: ZodObject<    {
            servers: ZodArray<ZodObject<    {
            name: ZodString;
            status: ZodEnum<["connected", "failed", "pending", "disabled", "not_configured"]>;
            source: ZodOptional<ZodString>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }[];
            }, {
            servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        disable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    };
    plugins: {
        list: {
            result: ZodObject<    {
            plugins: ZodArray<ZodObject<    {
            name: ZodString;
            marketplace: ZodString;
            version: ZodOptional<ZodString>;
            enabled: ZodBoolean;
            }, "strip", ZodTypeAny, {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }, {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            plugins: {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }[];
            }, {
            plugins: {
            name: string;
            enabled: boolean;
            marketplace: string;
            version?: string | undefined;
            }[];
            }>;
        };
    };
    extensions: {
        list: {
            result: ZodObject<    {
            extensions: ZodArray<ZodObject<    {
            id: ZodString;
            name: ZodString;
            source: ZodEnum<["project", "user"]>;
            status: ZodEnum<["running", "disabled", "failed", "starting"]>;
            pid: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }[];
            }, {
            extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            pid?: number | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        disable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
        reload: {
            result: ZodObject<    {}, "strip", ZodTypeAny, {}, {}>;
        };
    };
    compaction: {
        compact: {
            result: ZodObject<    {
            success: ZodBoolean;
            tokensRemoved: ZodNumber;
            messagesRemoved: ZodNumber;
            }, "strip", ZodTypeAny, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            }, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            }>;
        };
    };
    tools: {
        handlePendingToolCall: {
            params: ZodObject<    {
            requestId: ZodString;
            result: ZodOptional<ZodUnion<[ZodString, ZodObject<    {
            textResultForLlm: ZodString;
            resultType: ZodOptional<ZodString>;
            error: ZodOptional<ZodString>;
            toolTelemetry: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
            }, "strip", ZodTypeAny, {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            }, {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            }>]>>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            } | undefined;
            }, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            resultType?: string | undefined;
            } | undefined;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    };
    permissions: {
        handlePendingPermissionRequest: {
            params: ZodObject<    {
            requestId: ZodString;
            result: ZodDiscriminatedUnion<"kind", [ZodObject<    {
            kind: ZodLiteral<"approved">;
            }, "strip", ZodTypeAny, {
            kind: "approved";
            }, {
            kind: "approved";
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-by-rules">;
            rules: ZodArray<ZodUnknown, "many">;
            }, "strip", ZodTypeAny, {
            kind: "denied-by-rules";
            rules: unknown[];
            }, {
            kind: "denied-by-rules";
            rules: unknown[];
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-no-approval-rule-and-could-not-request-from-user">;
            }, "strip", ZodTypeAny, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            }, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-interactively-by-user">;
            feedback: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            }, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-by-content-exclusion-policy">;
            path: ZodString;
            message: ZodString;
            }, "strip", ZodTypeAny, {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            }, {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            }>]>;
            }, "strip", ZodTypeAny, {
            result: {
            kind: "approved";
            } | {
            kind: "denied-by-rules";
            rules: unknown[];
            } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            } | {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            };
            requestId: string;
            }, {
            result: {
            kind: "approved";
            } | {
            kind: "denied-by-rules";
            rules: unknown[];
            } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
            } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            } | {
            message: string;
            kind: "denied-by-content-exclusion-policy";
            path: string;
            };
            requestId: string;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    };
    log: {
        params: ZodObject<    {
        message: ZodString;
        level: ZodOptional<ZodEnum<["info", "warning", "error"]>>;
        ephemeral: ZodOptional<ZodBoolean>;
        url: ZodOptional<ZodString>;
        }, "strip", ZodTypeAny, {
        message: string;
        url?: string | undefined;
        ephemeral?: boolean | undefined;
        level?: "error" | "info" | "warning" | undefined;
        }, {
        message: string;
        url?: string | undefined;
        ephemeral?: boolean | undefined;
        level?: "error" | "info" | "warning" | undefined;
        }>;
        result: ZodObject<    {
        eventId: ZodString;
        }, "strip", ZodTypeAny, {
        eventId: string;
        }, {
        eventId: string;
        }>;
    };
    shell: {
        exec: {
            params: ZodObject<    {
            command: ZodString;
            cwd: ZodOptional<ZodString>;
            timeout: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            command: string;
            timeout?: number | undefined;
            cwd?: string | undefined;
            }, {
            command: string;
            timeout?: number | undefined;
            cwd?: string | undefined;
            }>;
            result: ZodObject<    {
            processId: ZodString;
            }, "strip", ZodTypeAny, {
            processId: string;
            }, {
            processId: string;
            }>;
        };
        kill: {
            params: ZodObject<    {
            processId: ZodString;
            signal: ZodOptional<ZodEnum<["SIGTERM", "SIGKILL", "SIGINT"]>>;
            }, "strip", ZodTypeAny, {
            processId: string;
            signal?: "SIGINT" | "SIGKILL" | "SIGTERM" | undefined;
            }, {
            processId: string;
            signal?: "SIGINT" | "SIGKILL" | "SIGTERM" | undefined;
            }>;
            result: ZodObject<    {
            killed: ZodBoolean;
            }, "strip", ZodTypeAny, {
            killed: boolean;
            }, {
            killed: boolean;
            }>;
        };
    };
};

export declare type SessionBackgroundTasksChangedEvent = z.infer<typeof SessionBackgroundTasksChangedEventSchema>;

/**
 * Emitted when background tasks change (agents started/completed, detached shells
 * started/killed). Subscribers should call `session.getBackgroundTasks()` to retrieve
 * the updated task list.
 */
declare const SessionBackgroundTasksChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.background_tasks_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    data: {};
    id: string;
    ephemeral: true;
    type: "session.background_tasks_changed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {};
    id: string;
    ephemeral: true;
    type: "session.background_tasks_changed";
    timestamp: string;
    parentId: string | null;
}>;

/**
 * # Session Capabilities
 *
 * Session capabilities control what prompt content, tools, and behaviors are available in a
 * given session. They prevent features intended for one client type from leaking into others —
 * for example, TUI keyboard shortcuts appearing in SDK prompts, or memory tools being offered
 * to headless clients that don't support them.
 *
 * ## Capability matrix
 *
 * | Capability                    | CLI TUI | SDK | ACP | General Agent |
 * |-------------------------------|---------|-----|-----|---------------|
 * | tui-hints                     |    ✓    |     |     |               |
 * | plan-mode                     |    ✓    |     |  ✓  |               |
 * | memory                        |    ✓    |     |     |       ✓       |
 * | cli-documentation             |    ✓    |     |     |       ✓       |
 * | ask-user                      |    ✓    |  ✓  |     |       ✓       |
 * | interactive-mode              |    ✓    |  ✓  |  ✓  |               |
 * | system-notifications          |    ✓    |  ✓  |  ✓  |               |
 *
 * ## Where capabilities are checked
 *
 * 1. **Prompt generation** (`src/cli/prompts/system.ts`) — Conditional sections are included
 *    or excluded based on `hasCapability()`.
 * 2. **Tool creation** (`src/agents/config.ts`) — Tools are only added when their capability
 *    is active.
 *
 * ## Runtime overrides
 *
 * `Session.getEffectiveCapabilities()` can further narrow capabilities at runtime:
 * - `askUserDisabled` → removes `ask-user`
 * - `runningInInteractiveMode === false` → removes `interactive-mode`
 *
 * ## When to add a new capability vs reuse an existing one
 *
 * **Add a new capability when:**
 * - You're introducing a tool or prompt section only relevant to a subset of client types
 * - No existing capability's client set matches who needs this feature
 *
 * **Reuse an existing capability when:**
 * - Your feature naturally belongs to the same audience (e.g., a new keyboard shortcut → `tui-hints`)
 * - The feature would always be enabled/disabled together with an existing one
 *
 * **Guiding principle:** A capability represents a _category of functionality for a type of
 * client_, not an individual feature. Keep the list small.
 *
 * ## What capabilities are NOT for
 *
 * - **Feature flags**: Use `FeatureFlagManager` for gradual rollouts. Capabilities are static per client type.
 * - **Model capabilities**: `SweBenchAgentCapabilities` (e.g., `parallel_tool_calls`) describes model support.
 * - **Runtime modes**: Concepts like autopilot that are purely behavioral toggles don't need capabilities.
 *
 * ## Adding a new capability
 *
 * 1. Add the literal to `SessionCapability` below
 * 2. Add it to `ALL_SESSION_CAPABILITIES`
 * 3. Add it to the appropriate client sets (`SDK_CAPABILITIES`, `ACP_CAPABILITIES`, etc.)
 * 4. Use `hasCapability(caps, "your-capability")` in prompt generation and/or tool creation
 * 5. Add behavioral tests in `test/core/sessionCapabilities.test.ts`
 * 6. Update snapshots: `npm run test:update-snapshots`
 */
declare type SessionCapability = "tui-hints" | "plan-mode" | "memory" | "cli-documentation" | "ask-user" | "interactive-mode" | "system-notifications";

export declare type SessionCompactionCompleteData = SessionCompactionCompleteEvent["data"];

export declare type SessionCompactionCompleteEvent = z.infer<typeof SessionCompactionCompleteEventSchema>;

/**
 * Session compaction complete event - conversation history compaction finished (success or failure)
 */
declare const SessionCompactionCompleteEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.compaction_complete">;
    data: z.ZodObject<{
        success: z.ZodBoolean;
        error: z.ZodOptional<z.ZodString>;
        preCompactionTokens: z.ZodOptional<z.ZodNumber>;
        postCompactionTokens: z.ZodOptional<z.ZodNumber>;
        preCompactionMessagesLength: z.ZodOptional<z.ZodNumber>;
        messagesRemoved: z.ZodOptional<z.ZodNumber>;
        tokensRemoved: z.ZodOptional<z.ZodNumber>;
        summaryContent: z.ZodOptional<z.ZodString>;
        checkpointNumber: z.ZodOptional<z.ZodNumber>;
        checkpointPath: z.ZodOptional<z.ZodString>;
        compactionTokensUsed: z.ZodOptional<z.ZodObject<{
            input: z.ZodNumber;
            output: z.ZodNumber;
            cachedInput: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            input: number;
            output: number;
            cachedInput: number;
        }, {
            input: number;
            output: number;
            cachedInput: number;
        }>>;
        requestId: z.ZodOptional<z.ZodString>;
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    }, {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    id: string;
    type: "session.compaction_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    id: string;
    type: "session.compaction_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionCompactionStartEvent = z.infer<typeof SessionCompactionStartEventSchema>;

/**
 * Session compaction started event - conversation history compaction has begun
 */
declare const SessionCompactionStartEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.compaction_start">;
    data: z.ZodObject<{
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }, {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.compaction_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.compaction_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/**
 * Working directory context for session tracking
 */
export declare interface SessionContext {
    readonly cwd: string;
    readonly gitRoot?: string;
    readonly repository?: string;
    readonly hostType?: RepoHostType;
    readonly branch?: string;
}

export declare type SessionContextChangedEvent = z.infer<typeof SessionContextChangedEventSchema>;

/**
 * Emitted when the session's working directory context changes (e.g., branch switch, cwd change).
 */
declare const SessionContextChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.context_changed">;
    data: z.ZodObject<{
        cwd: z.ZodString;
        gitRoot: z.ZodOptional<z.ZodString>;
        repository: z.ZodOptional<z.ZodString>;
        hostType: z.ZodOptional<z.ZodEnum<["github", "ado"]>>;
        branch: z.ZodOptional<z.ZodString>;
        headCommit: z.ZodOptional<z.ZodString>;
        baseCommit: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }, {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    id: string;
    type: "session.context_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    id: string;
    type: "session.context_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionEndHook = (input: SessionEndHookInput) => Promise<SessionEndHookOutput | void>;

/**
 * Session end hook types
 */
export declare interface SessionEndHookInput extends BaseHookInput {
    reason: "complete" | "error" | "abort" | "timeout" | "user_exit";
    finalMessage?: string;
    error?: Error;
}

export declare interface SessionEndHookOutput {
    suppressOutput?: boolean;
    cleanupActions?: string[];
    sessionSummary?: string;
}

export declare type SessionErrorEvent = z.infer<typeof SessionErrorEventSchema>;

/**
 * Error notification (for timeline/UI display)
 */
declare const SessionErrorEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.error">;
    data: z.ZodObject<{
        errorType: z.ZodString;
        message: z.ZodString;
        stack: z.ZodOptional<z.ZodString>;
        statusCode: z.ZodOptional<z.ZodNumber>;
        providerCallId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    }, {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    };
    id: string;
    type: "session.error";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    };
    id: string;
    type: "session.error";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/**
 * Union of all session event types
 */
export declare type SessionEvent = z.infer<typeof SessionEventSchema>;

/**
 * Discriminated union of all event schemas
 */
export declare const SessionEventSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.start">;
    data: z.ZodObject<{
        sessionId: z.ZodString;
        version: z.ZodNumber;
        producer: z.ZodString;
        copilotVersion: z.ZodString;
        startTime: z.ZodString;
        selectedModel: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
        context: z.ZodOptional<z.ZodObject<{
            cwd: z.ZodString;
            gitRoot: z.ZodOptional<z.ZodString>;
            repository: z.ZodOptional<z.ZodString>;
            hostType: z.ZodOptional<z.ZodEnum<["github", "ado"]>>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.resume">;
    data: z.ZodObject<{
        resumeTime: z.ZodString;
        eventCount: z.ZodNumber;
        selectedModel: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
        context: z.ZodOptional<z.ZodObject<{
            cwd: z.ZodString;
            gitRoot: z.ZodOptional<z.ZodString>;
            repository: z.ZodOptional<z.ZodString>;
            hostType: z.ZodOptional<z.ZodEnum<["github", "ado"]>>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }, {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.resume";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.resume";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.error">;
    data: z.ZodObject<{
        errorType: z.ZodString;
        message: z.ZodString;
        stack: z.ZodOptional<z.ZodString>;
        statusCode: z.ZodOptional<z.ZodNumber>;
        providerCallId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    }, {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    };
    id: string;
    type: "session.error";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    };
    id: string;
    type: "session.error";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.idle">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        backgroundTasks: z.ZodOptional<z.ZodObject<{
            agents: z.ZodArray<z.ZodObject<{
                agentId: z.ZodString;
                agentType: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }, {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }>, "many">;
            shells: z.ZodArray<z.ZodObject<{
                shellId: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                shellId: string;
                description?: string | undefined;
            }, {
                shellId: string;
                description?: string | undefined;
            }>, "many">;
        }, "strip", z.ZodTypeAny, {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        }, {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        }>>;
    }, "strip", z.ZodTypeAny, {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    }, {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.idle";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.idle";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.title_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        title: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        title: string;
    }, {
        title: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        title: string;
    };
    id: string;
    ephemeral: true;
    type: "session.title_changed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        title: string;
    };
    id: string;
    ephemeral: true;
    type: "session.title_changed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.info">;
    data: z.ZodObject<{
        infoType: z.ZodString;
        message: z.ZodString;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        infoType: string;
        url?: string | undefined;
    }, {
        message: string;
        infoType: string;
        url?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.info";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.info";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.warning">;
    data: z.ZodObject<{
        warningType: z.ZodString;
        message: z.ZodString;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        warningType: string;
        url?: string | undefined;
    }, {
        message: string;
        warningType: string;
        url?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.warning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.warning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.model_change">;
    data: z.ZodObject<{
        previousModel: z.ZodOptional<z.ZodString>;
        newModel: z.ZodString;
        previousReasoningEffort: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }, {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    id: string;
    type: "session.model_change";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    id: string;
    type: "session.model_change";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.mode_changed">;
    data: z.ZodObject<{
        previousMode: z.ZodString;
        newMode: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        previousMode: string;
        newMode: string;
    }, {
        previousMode: string;
        newMode: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        previousMode: string;
        newMode: string;
    };
    id: string;
    type: "session.mode_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        previousMode: string;
        newMode: string;
    };
    id: string;
    type: "session.mode_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.plan_changed">;
    data: z.ZodObject<{
        operation: z.ZodEnum<["create", "update", "delete"]>;
    }, "strip", z.ZodTypeAny, {
        operation: "create" | "update" | "delete";
    }, {
        operation: "create" | "update" | "delete";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        operation: "create" | "update" | "delete";
    };
    id: string;
    type: "session.plan_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        operation: "create" | "update" | "delete";
    };
    id: string;
    type: "session.plan_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.workspace_file_changed">;
    data: z.ZodObject<{
        path: z.ZodString;
        operation: z.ZodEnum<["create", "update"]>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        operation: "create" | "update";
    }, {
        path: string;
        operation: "create" | "update";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        path: string;
        operation: "create" | "update";
    };
    id: string;
    type: "session.workspace_file_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        path: string;
        operation: "create" | "update";
    };
    id: string;
    type: "session.workspace_file_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.import_legacy">;
    data: z.ZodObject<{
        legacySession: z.ZodObject<{
            sessionId: z.ZodString;
            startTime: z.ZodDate;
            chatMessages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, "many">]>;
                role: z.ZodLiteral<"developer">;
                name: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }, {
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }>, z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, "many">]>;
                role: z.ZodLiteral<"system">;
                name: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }, {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }>, z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"image_url">;
                    image_url: z.ZodObject<{
                        url: z.ZodString;
                        detail: z.ZodOptional<z.ZodEnum<["auto", "low", "high"]>>;
                    }, "strip", z.ZodTypeAny, {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    }, {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                }, {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"input_audio">;
                    input_audio: z.ZodObject<{
                        data: z.ZodString;
                        format: z.ZodUnion<[z.ZodLiteral<"wav">, z.ZodLiteral<"mp3">]>;
                    }, "strip", z.ZodTypeAny, {
                        data: string;
                        format: "wav" | "mp3";
                    }, {
                        data: string;
                        format: "wav" | "mp3";
                    }>;
                }, "strip", z.ZodTypeAny, {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                }, {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"file">;
                    file: z.ZodObject<{
                        file_date: z.ZodOptional<z.ZodString>;
                        file_id: z.ZodOptional<z.ZodString>;
                        filename: z.ZodOptional<z.ZodString>;
                    }, "strip", z.ZodTypeAny, {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    }, {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                }, {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                }>]>, "many">]>;
                role: z.ZodLiteral<"user">;
                name: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            }, {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            }>, z.ZodObject<{
                content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"refusal">;
                    refusal: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    refusal: string;
                    type: "refusal";
                }, {
                    refusal: string;
                    type: "refusal";
                }>]>, "many">]>>>;
                role: z.ZodLiteral<"assistant">;
                name: z.ZodOptional<z.ZodString>;
                refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
                audio: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                    id: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    id: string;
                }, {
                    id: string;
                }>>>;
                function_call: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                    name: z.ZodString;
                    arguments: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    name: string;
                    arguments: string;
                }, {
                    name: string;
                    arguments: string;
                }>>>;
                tool_calls: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
                    id: z.ZodString;
                    type: z.ZodLiteral<"function">;
                    function: z.ZodObject<{
                        name: z.ZodString;
                        arguments: z.ZodString;
                    }, "strip", z.ZodTypeAny, {
                        name: string;
                        arguments: string;
                    }, {
                        name: string;
                        arguments: string;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                }, {
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                }>, z.ZodObject<{
                    id: z.ZodString;
                    type: z.ZodLiteral<"custom">;
                    custom: z.ZodObject<{
                        name: z.ZodString;
                        input: z.ZodString;
                    }, "strip", z.ZodTypeAny, {
                        input: string;
                        name: string;
                    }, {
                        input: string;
                        name: string;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                }, {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                }>]>, "many">>;
            }, "strip", z.ZodTypeAny, {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            }, {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            }>, z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, "many">]>;
                role: z.ZodLiteral<"tool">;
                tool_call_id: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            }, {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            }>, z.ZodObject<{
                content: z.ZodNullable<z.ZodString>;
                role: z.ZodLiteral<"function">;
                name: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                name: string;
                role: "function";
                content: string | null;
            }, {
                name: string;
                role: "function";
                content: string | null;
            }>]>, "many">;
            timeline: z.ZodArray<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
                type: z.ZodLiteral<"copilot">;
                text: z.ZodString;
                isStreaming: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            }, {
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"error">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "error";
            }, {
                text: string;
                type: "error";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"info">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "info";
            }, {
                text: string;
                type: "info";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"warning">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "warning";
            }, {
                text: string;
                type: "warning";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"user">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "user";
            }, {
                text: string;
                type: "user";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"tool_call_requested">;
                callId: z.ZodString;
                name: z.ZodString;
                toolTitle: z.ZodOptional<z.ZodString>;
                intentionSummary: z.ZodNullable<z.ZodString>;
                arguments: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
                    command: z.ZodString;
                    description: z.ZodString;
                    timeout: z.ZodOptional<z.ZodNumber>;
                    shellId: z.ZodOptional<z.ZodString>;
                    async: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    input: z.ZodString;
                    delay: z.ZodOptional<z.ZodNumber>;
                }, "strip", z.ZodTypeAny, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    delay: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                    delay: number;
                }, {
                    shellId: string;
                    delay: number;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                }, {
                    shellId: string;
                }>]>, z.ZodDiscriminatedUnion<"command", [z.ZodObject<{
                    command: z.ZodLiteral<"view">;
                    path: z.ZodString;
                    view_range: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
                }, "strip", z.ZodTypeAny, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"create">;
                    path: z.ZodString;
                    file_text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "create";
                    path: string;
                    file_text: string;
                }, {
                    command: "create";
                    path: string;
                    file_text: string;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"str_replace">;
                    path: z.ZodString;
                    new_str: z.ZodOptional<z.ZodString>;
                    old_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"insert">;
                    path: z.ZodString;
                    insert_line: z.ZodNumber;
                    new_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }>]>, z.ZodUnknown]>;
                partialOutput: z.ZodOptional<z.ZodString>;
                isHidden: z.ZodOptional<z.ZodBoolean>;
                isAlwaysExpanded: z.ZodOptional<z.ZodBoolean>;
                showNoContent: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"tool_call_completed">;
                callId: z.ZodString;
                name: z.ZodString;
                toolTitle: z.ZodOptional<z.ZodString>;
                intentionSummary: z.ZodNullable<z.ZodString>;
                result: z.ZodUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"success">;
                    log: z.ZodString;
                    detailedLog: z.ZodOptional<z.ZodString>;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }, {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"failure">;
                    log: z.ZodString;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                }, {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"rejected">;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    type: "rejected";
                    markdown?: boolean | undefined;
                }, {
                    type: "rejected";
                    markdown?: boolean | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"denied">;
                    log: z.ZodString;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                }, {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                }>]>;
                arguments: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
                    command: z.ZodString;
                    description: z.ZodString;
                    timeout: z.ZodOptional<z.ZodNumber>;
                    shellId: z.ZodOptional<z.ZodString>;
                    async: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    input: z.ZodString;
                    delay: z.ZodOptional<z.ZodNumber>;
                }, "strip", z.ZodTypeAny, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    delay: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                    delay: number;
                }, {
                    shellId: string;
                    delay: number;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                }, {
                    shellId: string;
                }>]>, z.ZodDiscriminatedUnion<"command", [z.ZodObject<{
                    command: z.ZodLiteral<"view">;
                    path: z.ZodString;
                    view_range: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
                }, "strip", z.ZodTypeAny, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"create">;
                    path: z.ZodString;
                    file_text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "create";
                    path: string;
                    file_text: string;
                }, {
                    command: "create";
                    path: string;
                    file_text: string;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"str_replace">;
                    path: z.ZodString;
                    new_str: z.ZodOptional<z.ZodString>;
                    old_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"insert">;
                    path: z.ZodString;
                    insert_line: z.ZodNumber;
                    new_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }>]>, z.ZodUnknown]>;
                isHidden: z.ZodOptional<z.ZodBoolean>;
                isAlwaysExpanded: z.ZodOptional<z.ZodBoolean>;
                showNoContent: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }>]>, z.ZodObject<{
                id: z.ZodString;
                timestamp: z.ZodDate;
            }, "strip", z.ZodTypeAny, {
                id: string;
                timestamp: Date;
            }, {
                id: string;
                timestamp: Date;
            }>>, "many">;
            selectedModel: z.ZodOptional<z.ZodEnum<["claude-sonnet-4.6", "claude-sonnet-4.5", "claude-haiku-4.5", "claude-opus-4.6", "claude-opus-4.6-fast", "claude-opus-4.6-1m", "claude-opus-4.5", "claude-sonnet-4", "gemini-3-pro-preview", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5.2", "gpt-5.1-codex-max", "gpt-5.1-codex", "gpt-5.1", "gpt-5.4-mini", "gpt-5.1-codex-mini", "gpt-5-mini", "gpt-4.1"]>>;
        }, "strip", z.ZodTypeAny, {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        }, {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        }>;
        importTime: z.ZodString;
        sourceFile: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    }, {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    id: string;
    type: "session.import_legacy";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    id: string;
    type: "session.import_legacy";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.handoff">;
    data: z.ZodObject<{
        handoffTime: z.ZodString;
        sourceType: z.ZodEnum<["remote", "local"]>;
        repository: z.ZodOptional<z.ZodObject<{
            owner: z.ZodString;
            name: z.ZodString;
            branch: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            owner: string;
            branch?: string | undefined;
        }, {
            name: string;
            owner: string;
            branch?: string | undefined;
        }>>;
        context: z.ZodOptional<z.ZodString>;
        summary: z.ZodOptional<z.ZodString>;
        remoteSessionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }, {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    id: string;
    type: "session.handoff";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    id: string;
    type: "session.handoff";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.truncation">;
    data: z.ZodObject<{
        tokenLimit: z.ZodNumber;
        preTruncationTokensInMessages: z.ZodNumber;
        preTruncationMessagesLength: z.ZodNumber;
        postTruncationTokensInMessages: z.ZodNumber;
        postTruncationMessagesLength: z.ZodNumber;
        tokensRemovedDuringTruncation: z.ZodNumber;
        messagesRemovedDuringTruncation: z.ZodNumber;
        performedBy: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    id: string;
    type: "session.truncation";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    id: string;
    type: "session.truncation";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.snapshot_rewind">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        /** The event ID that was rewound to (events after this were removed) */
        upToEventId: z.ZodString;
        /** Number of events that were removed */
        eventsRemoved: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        upToEventId: string;
        eventsRemoved: number;
    }, {
        upToEventId: string;
        eventsRemoved: number;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        upToEventId: string;
        eventsRemoved: number;
    };
    id: string;
    ephemeral: true;
    type: "session.snapshot_rewind";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        upToEventId: string;
        eventsRemoved: number;
    };
    id: string;
    ephemeral: true;
    type: "session.snapshot_rewind";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.shutdown">;
    data: z.ZodObject<{
        /** The type of shutdown: routine (normal exit) or error (crash/fatal error) */
        shutdownType: z.ZodEnum<["routine", "error"]>;
        /** Error reason if shutdownType is "error" */
        errorReason: z.ZodOptional<z.ZodString>;
        /** Total premium requests used in the session */
        totalPremiumRequests: z.ZodNumber;
        /** Total time spent in API calls (milliseconds) */
        totalApiDurationMs: z.ZodNumber;
        /** Session start time (Unix timestamp) */
        sessionStartTime: z.ZodNumber;
        /** Code changes made during the session */
        codeChanges: z.ZodObject<{
            linesAdded: z.ZodNumber;
            linesRemoved: z.ZodNumber;
            filesModified: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        }, {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        }>;
        /** Per-model usage breakdown */
        modelMetrics: z.ZodRecord<z.ZodString, z.ZodObject<{
            requests: z.ZodObject<{
                count: z.ZodNumber;
                cost: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                count: number;
                cost: number;
            }, {
                count: number;
                cost: number;
            }>;
            usage: z.ZodObject<{
                inputTokens: z.ZodNumber;
                outputTokens: z.ZodNumber;
                cacheReadTokens: z.ZodNumber;
                cacheWriteTokens: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            }, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            }>;
        }, "strip", z.ZodTypeAny, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>>;
        /** Currently selected model (if any) */
        currentModel: z.ZodOptional<z.ZodString>;
        /** Final context window token breakdown at shutdown */
        currentTokens: z.ZodOptional<z.ZodNumber>;
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }, {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.shutdown";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.shutdown";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.context_changed">;
    data: z.ZodObject<{
        cwd: z.ZodString;
        gitRoot: z.ZodOptional<z.ZodString>;
        repository: z.ZodOptional<z.ZodString>;
        hostType: z.ZodOptional<z.ZodEnum<["github", "ado"]>>;
        branch: z.ZodOptional<z.ZodString>;
        headCommit: z.ZodOptional<z.ZodString>;
        baseCommit: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }, {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    id: string;
    type: "session.context_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        cwd: string;
        branch?: string | undefined;
        gitRoot?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    id: string;
    type: "session.context_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.usage_info">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        tokenLimit: z.ZodNumber;
        currentTokens: z.ZodNumber;
        messagesLength: z.ZodNumber;
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
        isInitial: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    }, {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.usage_info";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.usage_info";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.compaction_start">;
    data: z.ZodObject<{
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }, {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.compaction_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.compaction_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.compaction_complete">;
    data: z.ZodObject<{
        success: z.ZodBoolean;
        error: z.ZodOptional<z.ZodString>;
        preCompactionTokens: z.ZodOptional<z.ZodNumber>;
        postCompactionTokens: z.ZodOptional<z.ZodNumber>;
        preCompactionMessagesLength: z.ZodOptional<z.ZodNumber>;
        messagesRemoved: z.ZodOptional<z.ZodNumber>;
        tokensRemoved: z.ZodOptional<z.ZodNumber>;
        summaryContent: z.ZodOptional<z.ZodString>;
        checkpointNumber: z.ZodOptional<z.ZodNumber>;
        checkpointPath: z.ZodOptional<z.ZodString>;
        compactionTokensUsed: z.ZodOptional<z.ZodObject<{
            input: z.ZodNumber;
            output: z.ZodNumber;
            cachedInput: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            input: number;
            output: number;
            cachedInput: number;
        }, {
            input: number;
            output: number;
            cachedInput: number;
        }>>;
        requestId: z.ZodOptional<z.ZodString>;
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    }, {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    id: string;
    type: "session.compaction_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    id: string;
    type: "session.compaction_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.task_complete">;
    data: z.ZodObject<{
        summary: z.ZodDefault<z.ZodString>;
        success: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        summary: string;
        success?: boolean | undefined;
    }, {
        summary?: string | undefined;
        success?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        summary: string;
        success?: boolean | undefined;
    };
    id: string;
    type: "session.task_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        summary?: string | undefined;
        success?: boolean | undefined;
    };
    id: string;
    type: "session.task_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"user.message">;
    data: z.ZodObject<{
        content: z.ZodString;
        transformedContent: z.ZodOptional<z.ZodString>;
        attachments: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
            type: z.ZodLiteral<"file">;
            path: z.ZodString;
            displayName: z.ZodString;
            lineRange: z.ZodOptional<z.ZodObject<{
                start: z.ZodNumber;
                end: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                end: number;
                start: number;
            }, {
                end: number;
                start: number;
            }>>;
        }, "strip", z.ZodTypeAny, {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        }, {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"directory">;
            path: z.ZodString;
            displayName: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "directory";
            path: string;
            displayName: string;
        }, {
            type: "directory";
            path: string;
            displayName: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"selection">;
            filePath: z.ZodString;
            displayName: z.ZodString;
            text: z.ZodString;
            selection: z.ZodObject<{
                start: z.ZodObject<{
                    line: z.ZodNumber;
                    character: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    line: number;
                    character: number;
                }, {
                    line: number;
                    character: number;
                }>;
                end: z.ZodObject<{
                    line: z.ZodNumber;
                    character: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    line: number;
                    character: number;
                }, {
                    line: number;
                    character: number;
                }>;
            }, "strip", z.ZodTypeAny, {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            }, {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            }>;
        }, "strip", z.ZodTypeAny, {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        }, {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"github_reference">;
            number: z.ZodNumber;
            title: z.ZodString;
            referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
            state: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        }, {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"blob">;
            data: z.ZodString;
            mimeType: z.ZodString;
            displayName: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        }, {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        }>]>, "many">>;
        source: z.ZodOptional<z.ZodString>;
        /** The agent mode active when this message was sent */
        agentMode: z.ZodOptional<z.ZodEnum<["interactive", "plan", "autopilot", "shell"]>>;
        /** The CAPI interaction ID for this user message turn */
        interactionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    }, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    };
    id: string;
    type: "user.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    };
    id: string;
    type: "user.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"pending_messages.modified">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    data: {};
    id: string;
    ephemeral: true;
    type: "pending_messages.modified";
    timestamp: string;
    parentId: string | null;
}, {
    data: {};
    id: string;
    ephemeral: true;
    type: "pending_messages.modified";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.turn_start">;
    data: z.ZodObject<{
        turnId: z.ZodString;
        /** The CAPI interaction ID for this turn */
        interactionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        turnId: string;
        interactionId?: string | undefined;
    }, {
        turnId: string;
        interactionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    id: string;
    type: "assistant.turn_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    id: string;
    type: "assistant.turn_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.intent">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        intent: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        intent: string;
    }, {
        intent: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        intent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.intent";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        intent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.intent";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.reasoning">;
    data: z.ZodObject<{
        reasoningId: z.ZodString;
        content: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        content: string;
        reasoningId: string;
    }, {
        content: string;
        reasoningId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        reasoningId: string;
    };
    id: string;
    type: "assistant.reasoning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        reasoningId: string;
    };
    id: string;
    type: "assistant.reasoning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.reasoning_delta">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        reasoningId: z.ZodString;
        deltaContent: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        reasoningId: string;
        deltaContent: string;
    }, {
        reasoningId: string;
        deltaContent: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.reasoning_delta";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    id: string;
    ephemeral: true;
    type: "assistant.reasoning_delta";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.streaming_delta">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        totalResponseSizeBytes: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        totalResponseSizeBytes: number;
    }, {
        totalResponseSizeBytes: number;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        totalResponseSizeBytes: number;
    };
    id: string;
    ephemeral: true;
    type: "assistant.streaming_delta";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        totalResponseSizeBytes: number;
    };
    id: string;
    ephemeral: true;
    type: "assistant.streaming_delta";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.message">;
    data: z.ZodObject<{
        messageId: z.ZodString;
        content: z.ZodString;
        toolRequests: z.ZodOptional<z.ZodArray<z.ZodObject<{
            toolCallId: z.ZodString;
            name: z.ZodString;
            arguments: z.ZodUnknown;
            type: z.ZodOptional<z.ZodEnum<["function", "custom"]>>;
            /** Human-readable display title for the tool */
            toolTitle: z.ZodOptional<z.ZodString>;
            /** Resolved intention summary describing what this specific call does */
            intentionSummary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }>, "many">>;
        reasoningOpaque: z.ZodOptional<z.ZodString>;
        reasoningText: z.ZodOptional<z.ZodString>;
        encryptedContent: z.ZodOptional<z.ZodString>;
        /** Phase of generation for phased-output models (e.g. gpt-5.3-codex). */
        phase: z.ZodOptional<z.ZodString>;
        /** Actual output token count from the API response (completion_tokens).
         *  Used for accurate token counting instead of estimation. Optional for
         *  backwards compatibility with existing sessions that don't have this field. */
        outputTokens: z.ZodOptional<z.ZodNumber>;
        /** The CAPI interaction ID for this message */
        interactionId: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    id: string;
    type: "assistant.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        messageId: string;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    id: string;
    type: "assistant.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.message_delta">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        messageId: z.ZodString;
        deltaContent: z.ZodString;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    }, {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.message_delta";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.message_delta";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"assistant.turn_end">;
    data: z.ZodObject<{
        turnId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        turnId: string;
    }, {
        turnId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        turnId: string;
    };
    id: string;
    type: "assistant.turn_end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
    };
    id: string;
    type: "assistant.turn_end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.usage">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        model: z.ZodString;
        inputTokens: z.ZodOptional<z.ZodNumber>;
        outputTokens: z.ZodOptional<z.ZodNumber>;
        cacheReadTokens: z.ZodOptional<z.ZodNumber>;
        cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
        cost: z.ZodOptional<z.ZodNumber>;
        duration: z.ZodOptional<z.ZodNumber>;
        initiator: z.ZodOptional<z.ZodString>;
        apiCallId: z.ZodOptional<z.ZodString>;
        providerCallId: z.ZodOptional<z.ZodString>;
        parentToolCallId: z.ZodOptional<z.ZodString>;
        quotaSnapshots: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            isUnlimitedEntitlement: z.ZodBoolean;
            entitlementRequests: z.ZodNumber;
            usedRequests: z.ZodNumber;
            usageAllowedWithExhaustedQuota: z.ZodBoolean;
            overage: z.ZodNumber;
            overageAllowedWithExhaustedQuota: z.ZodBoolean;
            remainingPercentage: z.ZodNumber;
            resetDate: z.ZodOptional<z.ZodDate>;
        }, "strip", z.ZodTypeAny, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }>>>;
        /** Per-request cost/usage data from CAPI (`copilot_usage` response field). */
        copilotUsage: z.ZodOptional<z.ZodObject<{
            tokenDetails: z.ZodArray<z.ZodObject<{
                batchSize: z.ZodNumber;
                costPerBatch: z.ZodNumber;
                tokenCount: z.ZodNumber;
                tokenType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }, {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }>, "many">;
            totalNanoAiu: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }, {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }>>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }, {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.usage";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        model: string;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        parentToolCallId?: string | undefined;
        duration?: number | undefined;
        initiator?: string | undefined;
        apiCallId?: string | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
        copilotUsage?: {
            tokenDetails: {
                batchSize: number;
                costPerBatch: number;
                tokenCount: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "assistant.usage";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"abort">;
    data: z.ZodObject<{
        reason: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        reason: string;
    }, {
        reason: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        reason: string;
    };
    id: string;
    type: "abort";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        reason: string;
    };
    id: string;
    type: "abort";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"tool.user_requested">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    }, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    id: string;
    type: "tool.user_requested";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    id: string;
    type: "tool.user_requested";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"tool.execution_start">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        mcpServerName: z.ZodOptional<z.ZodString>;
        mcpToolName: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    }, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    };
    id: string;
    type: "tool.execution_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    };
    id: string;
    type: "tool.execution_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"tool.execution_partial_result">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        partialOutput: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        partialOutput: string;
    }, {
        toolCallId: string;
        partialOutput: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_partial_result";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_partial_result";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"tool.execution_progress">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        progressMessage: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        progressMessage: string;
    }, {
        toolCallId: string;
        progressMessage: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_progress";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_progress";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"tool.execution_complete">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        success: z.ZodBoolean;
        /** The model that generated the tool call. */
        model: z.ZodOptional<z.ZodString>;
        /** The CAPI interaction ID for this tool execution */
        interactionId: z.ZodOptional<z.ZodString>;
        isUserRequested: z.ZodOptional<z.ZodBoolean>;
        result: z.ZodOptional<z.ZodObject<{
            /**
             * Tool result content sent to LLM for chat completion.
             * Typically concise/truncated for token efficiency.
             * Populated from: textResultForLlm || sessionLog
             */
            content: z.ZodString;
            /**
             * Detailed tool result for UI/timeline display.
             * Preserves full content like diffs. Optional - falls back to content.
             * Populated from: sessionLog || textResultForLlm
             */
            detailedContent: z.ZodOptional<z.ZodString>;
            /**
             * Structured content blocks from tool execution.
             * Contains rich content like text, images, audio, and resources in their native format.
             * Can be populated by any tool (MCP tools, bash, etc.) that returns structured content.
             */
            contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
                type: z.ZodLiteral<"text">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "text";
            }, {
                text: string;
                type: "text";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"terminal">;
                text: z.ZodString;
                exitCode: z.ZodOptional<z.ZodNumber>;
                cwd: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            }, {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"image">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                data: string;
                type: "image";
                mimeType: string;
            }, {
                data: string;
                type: "image";
                mimeType: string;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"audio">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                data: string;
                type: "audio";
                mimeType: string;
            }, {
                data: string;
                type: "audio";
                mimeType: string;
            }>, z.ZodObject<{
                icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    src: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    sizes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
                }, "strip", z.ZodTypeAny, {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }, {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }>, "many">>;
                name: z.ZodString;
                title: z.ZodOptional<z.ZodString>;
                uri: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                mimeType: z.ZodOptional<z.ZodString>;
                size: z.ZodOptional<z.ZodNumber>;
            } & {
                type: z.ZodLiteral<"resource_link">;
            }, "strip", z.ZodTypeAny, {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            }, {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"resource">;
                resource: z.ZodUnion<[z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>, z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    blob: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>]>;
            }, "strip", z.ZodTypeAny, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }>]>, "many">>;
        }, "strip", z.ZodTypeAny, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        }, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        }>>;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
            code: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            code?: string | undefined;
        }, {
            message: string;
            code?: string | undefined;
        }>>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    }, {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    };
    id: string;
    type: "tool.execution_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    };
    id: string;
    type: "tool.execution_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"skill.invoked">;
    data: z.ZodObject<{
        /** The skill name */
        name: z.ZodString;
        /** Path to the SKILL.md file */
        path: z.ZodString;
        /** The full content of the skill file */
        content: z.ZodString;
        /** Tools that should be auto-approved when this skill is active */
        allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Name of the plugin this skill came from (only set when source is "plugin") */
        pluginName: z.ZodOptional<z.ZodString>;
        /** Version of the plugin this skill came from (only set when source is "plugin") */
        pluginVersion: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    }, {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    };
    id: string;
    type: "skill.invoked";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    };
    id: string;
    type: "skill.invoked";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.started">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        agentDescription: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    };
    id: string;
    type: "subagent.started";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    };
    id: string;
    type: "subagent.started";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.completed">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.completed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.completed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.failed">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        error: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.failed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.failed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.selected">;
    data: z.ZodObject<{
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        tools: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    }, {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.selected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.selected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.deselected">;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    data: {};
    id: string;
    type: "subagent.deselected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {};
    id: string;
    type: "subagent.deselected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"hook.start">;
    data: z.ZodObject<{
        hookInvocationId: z.ZodString;
        hookType: z.ZodString;
        input: z.ZodUnknown;
    }, "strip", z.ZodTypeAny, {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    }, {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    id: string;
    type: "hook.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    id: string;
    type: "hook.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"hook.end">;
    data: z.ZodObject<{
        hookInvocationId: z.ZodString;
        hookType: z.ZodString;
        output: z.ZodUnknown;
        success: z.ZodBoolean;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
            stack: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            stack?: string | undefined;
        }, {
            message: string;
            stack?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    id: string;
    type: "hook.end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    id: string;
    type: "hook.end";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"system.message">;
    data: z.ZodObject<{
        content: z.ZodString;
        role: z.ZodEnum<["system", "developer"]>;
        name: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodObject<{
            promptVersion: z.ZodOptional<z.ZodString>;
            variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        }, {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }, {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    id: string;
    type: "system.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    id: string;
    type: "system.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"system.notification">;
    data: z.ZodObject<{
        content: z.ZodString;
        kind: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
            type: z.ZodLiteral<"agent_completed">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            status: z.ZodEnum<["completed", "failed"]>;
            description: z.ZodOptional<z.ZodString>;
            prompt: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"agent_idle">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"shell_completed">;
            shellId: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        }, {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"shell_detached_completed">;
            shellId: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        }, {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    }, {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    };
    id: string;
    type: "system.notification";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    };
    id: string;
    type: "system.notification";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        permissionRequest: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"shell">;
            toolCallId: z.ZodOptional<z.ZodString>;
            fullCommandText: z.ZodString;
            intention: z.ZodString;
            commands: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                identifier: z.ZodString;
                readOnly: z.ZodBoolean;
            }, "strip", z.ZodTypeAny, {
                identifier: string;
                readOnly: boolean;
            }, {
                identifier: string;
                readOnly: boolean;
            }>, "many">>;
            possiblePaths: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
            possibleUrls: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                url: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                url: string;
            }, {
                url: string;
            }>, "many">>;
            hasWriteFileRedirection: z.ZodBoolean;
            canOfferSessionApproval: z.ZodBoolean;
            warning: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        }, {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"write">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            fileName: z.ZodString;
            diff: z.ZodString;
            newFileContents: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"read">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        }, {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"mcp">;
            toolCallId: z.ZodOptional<z.ZodString>;
            serverName: z.ZodString;
            toolName: z.ZodString;
            toolTitle: z.ZodString;
            args: z.ZodAny;
            readOnly: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        }, {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"url">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        }, {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"memory">;
            toolCallId: z.ZodOptional<z.ZodString>;
            subject: z.ZodString;
            fact: z.ZodString;
            citations: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        }, {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"custom-tool">;
            toolCallId: z.ZodOptional<z.ZodString>;
            toolName: z.ZodString;
            toolDescription: z.ZodString;
            args: z.ZodAny;
        }, "strip", z.ZodTypeAny, {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        }, {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"hook">;
            toolCallId: z.ZodOptional<z.ZodString>;
            toolName: z.ZodString;
            toolArgs: z.ZodOptional<z.ZodUnknown>;
            hookMessage: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }, {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    }, {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    };
    id: string;
    ephemeral: true;
    type: "permission.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        permissionRequest: {
            kind: "shell";
            fullCommandText: string;
            intention: string;
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            toolCallId?: string | undefined;
            warning?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            kind: "read";
            path: string;
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolTitle: string;
            toolName: string;
            readOnly: boolean;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            subject: string;
            fact: string;
            citations: string;
            toolCallId?: string | undefined;
        } | {
            kind: "custom-tool";
            toolName: string;
            toolDescription: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            kind: "hook";
            toolName: string;
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        };
    };
    id: string;
    ephemeral: true;
    type: "permission.requested";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        result: z.ZodObject<{
            kind: z.ZodEnum<["approved", "denied-by-rules", "denied-no-approval-rule-and-could-not-request-from-user", "denied-interactively-by-user", "denied-by-content-exclusion-policy"]>;
        }, "strip", z.ZodTypeAny, {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        }, {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        }>;
    }, "strip", z.ZodTypeAny, {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    }, {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "permission.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        result: {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy";
        };
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "permission.completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"user_input.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        question: z.ZodString;
        choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        allowFreeform: z.ZodOptional<z.ZodBoolean>;
        toolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    }, {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "user_input.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "user_input.requested";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"user_input.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "user_input.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "user_input.completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"elicitation.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        elicitationSource: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
        /** MCP elicitation mode. Absent means "form". */
        mode: z.ZodOptional<z.ZodEnum<["form", "url"]>>;
        /** A restricted subset of JSON Schema describing the form fields (form mode only). */
        requestedSchema: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"object">;
            properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }>>;
        /** URL to open in the browser (url mode only). */
        url: z.ZodOptional<z.ZodString>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        elicitationSource: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
        /** MCP elicitation mode. Absent means "form". */
        mode: z.ZodOptional<z.ZodEnum<["form", "url"]>>;
        /** A restricted subset of JSON Schema describing the form fields (form mode only). */
        requestedSchema: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"object">;
            properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }>>;
        /** URL to open in the browser (url mode only). */
        url: z.ZodOptional<z.ZodString>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        elicitationSource: z.ZodOptional<z.ZodString>;
        message: z.ZodString;
        /** MCP elicitation mode. Absent means "form". */
        mode: z.ZodOptional<z.ZodEnum<["form", "url"]>>;
        /** A restricted subset of JSON Schema describing the form fields (form mode only). */
        requestedSchema: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"object">;
            properties: z.ZodRecord<z.ZodString, z.ZodUnknown>;
            required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }, {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        }>>;
        /** URL to open in the browser (url mode only). */
        url: z.ZodOptional<z.ZodString>;
    }, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        mode?: "url" | "form" | undefined;
        requestedSchema?: {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        mode?: "url" | "form" | undefined;
        requestedSchema?: {
            properties: Record<string, unknown>;
            type: "object";
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.requested";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"elicitation.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "elicitation.completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"mcp.oauth_required">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        serverUrl: z.ZodString;
        staticClientConfig: z.ZodOptional<z.ZodObject<{
            clientId: z.ZodString;
            publicClient: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            clientId: string;
            publicClient?: boolean | undefined;
        }, {
            clientId: string;
            publicClient?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    }, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_required";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_required";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"mcp.oauth_completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "mcp.oauth_completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        sessionId: z.ZodString;
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        traceparent: z.ZodOptional<z.ZodString>;
        tracestate: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.requested";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "external_tool.completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"command.queued">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        command: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        command: string;
    }, {
        requestId: string;
        command: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        command: string;
    };
    id: string;
    ephemeral: true;
    type: "command.queued";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        command: string;
    };
    id: string;
    ephemeral: true;
    type: "command.queued";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"command.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "command.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "command.completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"exit_plan_mode.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        summary: z.ZodString;
        planContent: z.ZodString;
        actions: z.ZodArray<z.ZodString, "many">;
        recommendedAction: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    }, {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        summary: string;
        planContent: string;
        actions: string[];
        recommendedAction: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.requested";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"exit_plan_mode.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "exit_plan_mode.completed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.tools_updated">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        /** The model for which tools were resolved. */
        model: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        model: string;
    }, {
        model: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        model: string;
    };
    id: string;
    ephemeral: true;
    type: "session.tools_updated";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        model: string;
    };
    id: string;
    ephemeral: true;
    type: "session.tools_updated";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.background_tasks_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    data: {};
    id: string;
    ephemeral: true;
    type: "session.background_tasks_changed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {};
    id: string;
    ephemeral: true;
    type: "session.background_tasks_changed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.skills_loaded">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        skills: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            description: z.ZodString;
            source: z.ZodString;
            userInvocable: z.ZodBoolean;
            enabled: z.ZodBoolean;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }, {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.skills_loaded";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.skills_loaded";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.mcp_servers_loaded">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        servers: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            status: z.ZodEnum<["connected", "failed", "pending", "disabled", "not_configured"]>;
            source: z.ZodOptional<z.ZodString>;
            error: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }, {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_servers_loaded";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_servers_loaded";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.mcp_server_status_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        serverName: z.ZodString;
        status: z.ZodEnum<["connected", "failed", "pending", "disabled", "not_configured"]>;
    }, "strip", z.ZodTypeAny, {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    }, {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_server_status_changed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_server_status_changed";
    timestamp: string;
    parentId: string | null;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.extensions_loaded">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        extensions: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            source: z.ZodEnum<["project", "user"]>;
            status: z.ZodEnum<["running", "disabled", "failed", "starting"]>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    }, {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.extensions_loaded";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.extensions_loaded";
    timestamp: string;
    parentId: string | null;
}>]>;

/**
 * All possible session event type strings
 */
export declare type SessionEventType = SessionEvent["type"];

export declare type SessionExtensionsLoadedEvent = z.infer<typeof SessionExtensionsLoadedEventSchema>;

/**
 * Emitted when extensions have been loaded for the session.
 * This is an ephemeral event fired after extension discovery and loading completes.
 */
declare const SessionExtensionsLoadedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.extensions_loaded">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        extensions: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            source: z.ZodEnum<["project", "user"]>;
            status: z.ZodEnum<["running", "disabled", "failed", "starting"]>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }, {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    }, {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.extensions_loaded";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        extensions: {
            name: string;
            id: string;
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.extensions_loaded";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionHandoffEvent = z.infer<typeof SessionHandoffEventSchema>;

/**
 * Remote session handed off to local
 */
declare const SessionHandoffEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.handoff">;
    data: z.ZodObject<{
        handoffTime: z.ZodString;
        sourceType: z.ZodEnum<["remote", "local"]>;
        repository: z.ZodOptional<z.ZodObject<{
            owner: z.ZodString;
            name: z.ZodString;
            branch: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            owner: string;
            branch?: string | undefined;
        }, {
            name: string;
            owner: string;
            branch?: string | undefined;
        }>>;
        context: z.ZodOptional<z.ZodString>;
        summary: z.ZodOptional<z.ZodString>;
        remoteSessionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }, {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    id: string;
    type: "session.handoff";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        handoffTime: string;
        sourceType: "local" | "remote";
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    id: string;
    type: "session.handoff";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionIdleEvent = z.infer<typeof SessionIdleEventSchema>;

/**
 * Session initialization event (first line of JSONL file)
 */
declare const SessionIdleEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.idle">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        backgroundTasks: z.ZodOptional<z.ZodObject<{
            agents: z.ZodArray<z.ZodObject<{
                agentId: z.ZodString;
                agentType: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }, {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }>, "many">;
            shells: z.ZodArray<z.ZodObject<{
                shellId: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                shellId: string;
                description?: string | undefined;
            }, {
                shellId: string;
                description?: string | undefined;
            }>, "many">;
        }, "strip", z.ZodTypeAny, {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        }, {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        }>>;
    }, "strip", z.ZodTypeAny, {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    }, {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.idle";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        backgroundTasks?: {
            agents: {
                agentId: string;
                agentType: string;
                description?: string | undefined;
            }[];
            shells: {
                shellId: string;
                description?: string | undefined;
            }[];
        } | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.idle";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionImportLegacyEvent = z.infer<typeof SessionImportLegacyEventSchema>;

/**
 * Legacy session imported (wraps entire legacy JSON)
 */
declare const SessionImportLegacyEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.import_legacy">;
    data: z.ZodObject<{
        legacySession: z.ZodObject<{
            sessionId: z.ZodString;
            startTime: z.ZodDate;
            chatMessages: z.ZodArray<z.ZodUnion<[z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, "many">]>;
                role: z.ZodLiteral<"developer">;
                name: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }, {
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }>, z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, "many">]>;
                role: z.ZodLiteral<"system">;
                name: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }, {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            }>, z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"image_url">;
                    image_url: z.ZodObject<{
                        url: z.ZodString;
                        detail: z.ZodOptional<z.ZodEnum<["auto", "low", "high"]>>;
                    }, "strip", z.ZodTypeAny, {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    }, {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                }, {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"input_audio">;
                    input_audio: z.ZodObject<{
                        data: z.ZodString;
                        format: z.ZodUnion<[z.ZodLiteral<"wav">, z.ZodLiteral<"mp3">]>;
                    }, "strip", z.ZodTypeAny, {
                        data: string;
                        format: "wav" | "mp3";
                    }, {
                        data: string;
                        format: "wav" | "mp3";
                    }>;
                }, "strip", z.ZodTypeAny, {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                }, {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"file">;
                    file: z.ZodObject<{
                        file_date: z.ZodOptional<z.ZodString>;
                        file_id: z.ZodOptional<z.ZodString>;
                        filename: z.ZodOptional<z.ZodString>;
                    }, "strip", z.ZodTypeAny, {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    }, {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                }, {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                }>]>, "many">]>;
                role: z.ZodLiteral<"user">;
                name: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            }, {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            }>, z.ZodObject<{
                content: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"refusal">;
                    refusal: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    refusal: string;
                    type: "refusal";
                }, {
                    refusal: string;
                    type: "refusal";
                }>]>, "many">]>>>;
                role: z.ZodLiteral<"assistant">;
                name: z.ZodOptional<z.ZodString>;
                refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
                audio: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                    id: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    id: string;
                }, {
                    id: string;
                }>>>;
                function_call: z.ZodOptional<z.ZodNullable<z.ZodObject<{
                    name: z.ZodString;
                    arguments: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    name: string;
                    arguments: string;
                }, {
                    name: string;
                    arguments: string;
                }>>>;
                tool_calls: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
                    id: z.ZodString;
                    type: z.ZodLiteral<"function">;
                    function: z.ZodObject<{
                        name: z.ZodString;
                        arguments: z.ZodString;
                    }, "strip", z.ZodTypeAny, {
                        name: string;
                        arguments: string;
                    }, {
                        name: string;
                        arguments: string;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                }, {
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                }>, z.ZodObject<{
                    id: z.ZodString;
                    type: z.ZodLiteral<"custom">;
                    custom: z.ZodObject<{
                        name: z.ZodString;
                        input: z.ZodString;
                    }, "strip", z.ZodTypeAny, {
                        input: string;
                        name: string;
                    }, {
                        input: string;
                        name: string;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                }, {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                }>]>, "many">>;
            }, "strip", z.ZodTypeAny, {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            }, {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            }>, z.ZodObject<{
                content: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodObject<{
                    type: z.ZodLiteral<"text">;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    type: "text";
                }, {
                    text: string;
                    type: "text";
                }>, "many">]>;
                role: z.ZodLiteral<"tool">;
                tool_call_id: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            }, {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            }>, z.ZodObject<{
                content: z.ZodNullable<z.ZodString>;
                role: z.ZodLiteral<"function">;
                name: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                name: string;
                role: "function";
                content: string | null;
            }, {
                name: string;
                role: "function";
                content: string | null;
            }>]>, "many">;
            timeline: z.ZodArray<z.ZodIntersection<z.ZodUnion<[z.ZodObject<{
                type: z.ZodLiteral<"copilot">;
                text: z.ZodString;
                isStreaming: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            }, {
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"error">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "error";
            }, {
                text: string;
                type: "error";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"info">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "info";
            }, {
                text: string;
                type: "info";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"warning">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "warning";
            }, {
                text: string;
                type: "warning";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"user">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "user";
            }, {
                text: string;
                type: "user";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"tool_call_requested">;
                callId: z.ZodString;
                name: z.ZodString;
                toolTitle: z.ZodOptional<z.ZodString>;
                intentionSummary: z.ZodNullable<z.ZodString>;
                arguments: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
                    command: z.ZodString;
                    description: z.ZodString;
                    timeout: z.ZodOptional<z.ZodNumber>;
                    shellId: z.ZodOptional<z.ZodString>;
                    async: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    input: z.ZodString;
                    delay: z.ZodOptional<z.ZodNumber>;
                }, "strip", z.ZodTypeAny, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    delay: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                    delay: number;
                }, {
                    shellId: string;
                    delay: number;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                }, {
                    shellId: string;
                }>]>, z.ZodDiscriminatedUnion<"command", [z.ZodObject<{
                    command: z.ZodLiteral<"view">;
                    path: z.ZodString;
                    view_range: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
                }, "strip", z.ZodTypeAny, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"create">;
                    path: z.ZodString;
                    file_text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "create";
                    path: string;
                    file_text: string;
                }, {
                    command: "create";
                    path: string;
                    file_text: string;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"str_replace">;
                    path: z.ZodString;
                    new_str: z.ZodOptional<z.ZodString>;
                    old_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"insert">;
                    path: z.ZodString;
                    insert_line: z.ZodNumber;
                    new_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }>]>, z.ZodUnknown]>;
                partialOutput: z.ZodOptional<z.ZodString>;
                isHidden: z.ZodOptional<z.ZodBoolean>;
                isAlwaysExpanded: z.ZodOptional<z.ZodBoolean>;
                showNoContent: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"tool_call_completed">;
                callId: z.ZodString;
                name: z.ZodString;
                toolTitle: z.ZodOptional<z.ZodString>;
                intentionSummary: z.ZodNullable<z.ZodString>;
                result: z.ZodUnion<[z.ZodObject<{
                    type: z.ZodLiteral<"success">;
                    log: z.ZodString;
                    detailedLog: z.ZodOptional<z.ZodString>;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }, {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"failure">;
                    log: z.ZodString;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                }, {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"rejected">;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    type: "rejected";
                    markdown?: boolean | undefined;
                }, {
                    type: "rejected";
                    markdown?: boolean | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"denied">;
                    log: z.ZodString;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                }, {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                }>]>;
                arguments: z.ZodUnion<[z.ZodUnion<[z.ZodObject<{
                    command: z.ZodString;
                    description: z.ZodString;
                    timeout: z.ZodOptional<z.ZodNumber>;
                    shellId: z.ZodOptional<z.ZodString>;
                    async: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }, {
                    command: string;
                    description: string;
                    timeout?: number | undefined;
                    shellId?: string | undefined;
                    async?: boolean | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    input: z.ZodString;
                    delay: z.ZodOptional<z.ZodNumber>;
                }, "strip", z.ZodTypeAny, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }, {
                    input: string;
                    shellId: string;
                    delay?: number | undefined;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                    delay: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                    delay: number;
                }, {
                    shellId: string;
                    delay: number;
                }>, z.ZodObject<{
                    shellId: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    shellId: string;
                }, {
                    shellId: string;
                }>]>, z.ZodDiscriminatedUnion<"command", [z.ZodObject<{
                    command: z.ZodLiteral<"view">;
                    path: z.ZodString;
                    view_range: z.ZodOptional<z.ZodTuple<[z.ZodNumber, z.ZodNumber], null>>;
                }, "strip", z.ZodTypeAny, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }, {
                    command: "view";
                    path: string;
                    view_range?: [number, number] | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"create">;
                    path: z.ZodString;
                    file_text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "create";
                    path: string;
                    file_text: string;
                }, {
                    command: "create";
                    path: string;
                    file_text: string;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"str_replace">;
                    path: z.ZodString;
                    new_str: z.ZodOptional<z.ZodString>;
                    old_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }, {
                    command: "str_replace";
                    path: string;
                    old_str: string;
                    new_str?: string | undefined;
                }>, z.ZodObject<{
                    command: z.ZodLiteral<"insert">;
                    path: z.ZodString;
                    insert_line: z.ZodNumber;
                    new_str: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }, {
                    command: "insert";
                    path: string;
                    new_str: string;
                    insert_line: number;
                }>]>, z.ZodUnknown]>;
                isHidden: z.ZodOptional<z.ZodBoolean>;
                isAlwaysExpanded: z.ZodOptional<z.ZodBoolean>;
                showNoContent: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }>]>, z.ZodObject<{
                id: z.ZodString;
                timestamp: z.ZodDate;
            }, "strip", z.ZodTypeAny, {
                id: string;
                timestamp: Date;
            }, {
                id: string;
                timestamp: Date;
            }>>, "many">;
            selectedModel: z.ZodOptional<z.ZodEnum<["claude-sonnet-4.6", "claude-sonnet-4.5", "claude-haiku-4.5", "claude-opus-4.6", "claude-opus-4.6-fast", "claude-opus-4.6-1m", "claude-opus-4.5", "claude-sonnet-4", "gemini-3-pro-preview", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5.2", "gpt-5.1-codex-max", "gpt-5.1-codex", "gpt-5.1", "gpt-5.4-mini", "gpt-5.1-codex-mini", "gpt-5-mini", "gpt-4.1"]>>;
        }, "strip", z.ZodTypeAny, {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        }, {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        }>;
        importTime: z.ZodString;
        sourceFile: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    }, {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    id: string;
    type: "session.import_legacy";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        legacySession: {
            sessionId: string;
            startTime: Date;
            chatMessages: ({
                role: "developer";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "system";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                name?: string | undefined;
            } | {
                role: "user";
                content: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "image_url";
                    image_url: {
                        url: string;
                        detail?: "low" | "high" | "auto" | undefined;
                    };
                } | {
                    type: "input_audio";
                    input_audio: {
                        data: string;
                        format: "wav" | "mp3";
                    };
                } | {
                    file: {
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                        filename?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    id: string;
                    type: "function";
                } | {
                    id: string;
                    custom: {
                        input: string;
                        name: string;
                    };
                    type: "custom";
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    refusal: string;
                    type: "refusal";
                })[] | null | undefined;
                function_call?: {
                    name: string;
                    arguments: string;
                } | null | undefined;
                refusal?: string | null | undefined;
            } | {
                role: "tool";
                content: string | {
                    text: string;
                    type: "text";
                }[];
                tool_call_id: string;
            } | {
                name: string;
                role: "function";
                content: string | null;
            })[];
            timeline: (({
                text: string;
                type: "copilot";
                isStreaming?: boolean | undefined;
            } | {
                text: string;
                type: "error";
            } | {
                text: string;
                type: "info";
            } | {
                text: string;
                type: "warning";
            } | {
                text: string;
                type: "user";
            } | {
                name: string;
                type: "tool_call_requested";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    log: string;
                    type: "success";
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    log: string;
                    type: "failure";
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    log: string;
                    type: "denied";
                    markdown?: boolean | undefined;
                };
                name: string;
                type: "tool_call_completed";
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }) & {
                id: string;
                timestamp: Date;
            })[];
            selectedModel?: "gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.6" | "claude-sonnet-4.5" | "claude-haiku-4.5" | "claude-opus-4.6" | "claude-opus-4.6-fast" | "claude-opus-4.6-1m" | "claude-opus-4.5" | "claude-sonnet-4" | "gemini-3-pro-preview" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.2-codex" | "gpt-5.2" | "gpt-5.1-codex-max" | "gpt-5.1-codex" | "gpt-5.1" | "gpt-5.4-mini" | "gpt-5.1-codex-mini" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    id: string;
    type: "session.import_legacy";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionInfoEvent = z.infer<typeof SessionInfoEventSchema>;

/**
 * Informational message (for timeline/UI display)
 */
declare const SessionInfoEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.info">;
    data: z.ZodObject<{
        infoType: z.ZodString;
        message: z.ZodString;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        infoType: string;
        url?: string | undefined;
    }, {
        message: string;
        infoType: string;
        url?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.info";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.info";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

declare type SessionLogsContent = SessionsChatCompletionMessageParam | SessionsChatCompletionChunk;

declare type SessionLogsContents = SessionLogsContent[];

/**
 * SessionManager interface
 */
export declare interface SessionManager<TSessionMetadata extends SessionMetadata = SessionMetadata, TSession extends Session<TSessionMetadata> = Session<TSessionMetadata>> {
    createSession(sessionOptions: SessionOptions): Promise<TSession>;
    getSession(options: {
        sessionId: string;
    }): Promise<TSession | undefined>;
    getLastSession(): Promise<TSession | undefined>;
    getLastSessionId(): Promise<string | undefined>;
    listSessions(): Promise<TSessionMetadata[]>;
    saveSession(session: TSession): Promise<void>;
    deleteSession(sessionId: string): Promise<void>;
    closeSession(sessionId: string): Promise<void>;
}

/**
 * SessionManager options - same as SessionOptions but used for creating the manager
 */
export declare type SessionManagerOptions = {
    logger?: RunnerLogger;
    integrationId?: string;
};

export declare type SessionMcpServersResolvedEvent = z.infer<typeof SessionMcpServersResolvedEventSchema>;

/**
 * Emitted when MCP servers have completed their initial connection attempts.
 * This is an ephemeral event fired during session initialization after initializeMcpHost() completes.
 */
declare const SessionMcpServersResolvedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.mcp_servers_loaded">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        servers: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            status: z.ZodEnum<["connected", "failed", "pending", "disabled", "not_configured"]>;
            source: z.ZodOptional<z.ZodString>;
            error: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }, {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }, {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_servers_loaded";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        servers: {
            name: string;
            status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_servers_loaded";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionMcpServerStatusChangedEvent = z.infer<typeof SessionMcpServerStatusChangedEventSchema>;

/**
 * Emitted when an individual MCP server's connection status changes.
 * This is an ephemeral event fired whenever a server transitions between
 * connected, failed, pending, disabled, or not_configured states.
 */
declare const SessionMcpServerStatusChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.mcp_server_status_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        serverName: z.ZodString;
        status: z.ZodEnum<["connected", "failed", "pending", "disabled", "not_configured"]>;
    }, "strip", z.ZodTypeAny, {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    }, {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_server_status_changed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        status: "disabled" | "failed" | "connected" | "pending" | "not_configured";
        serverName: string;
    };
    id: string;
    ephemeral: true;
    type: "session.mcp_server_status_changed";
    timestamp: string;
    parentId: string | null;
}>;

export declare interface SessionMetadata {
    readonly sessionId: string;
    readonly startTime: Date;
    readonly modifiedTime: Date;
    readonly summary?: string;
    readonly isRemote: boolean;
    /** Most recent working directory context (from last start or resume) */
    readonly context?: SessionContext;
}

export declare type SessionMode = (typeof SESSION_MODES)[number];

export declare type SessionModeChangedEvent = z.infer<typeof SessionModeChangedEventSchema>;

/**
 * Agent mode changed (interactive, plan, autopilot)
 */
declare const SessionModeChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.mode_changed">;
    data: z.ZodObject<{
        previousMode: z.ZodString;
        newMode: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        previousMode: string;
        newMode: string;
    }, {
        previousMode: string;
        newMode: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        previousMode: string;
        newMode: string;
    };
    id: string;
    type: "session.mode_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        previousMode: string;
        newMode: string;
    };
    id: string;
    type: "session.mode_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionModelChangeEvent = z.infer<typeof SessionModelChangeEventSchema>;

/**
 * Model selection changed mid-session
 */
declare const SessionModelChangeEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.model_change">;
    data: z.ZodObject<{
        previousModel: z.ZodOptional<z.ZodString>;
        newModel: z.ZodString;
        previousReasoningEffort: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }, {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    id: string;
    type: "session.model_change";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        newModel: string;
        reasoningEffort?: string | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    id: string;
    type: "session.model_change";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare interface SessionOptions extends Partial<SessionMetadata> {
    clientName?: string;
    model?: string;
    integrationId?: string;
    /**
     * Reasoning effort level for models that support it.
     * Valid values: "low", "medium", "high", "xhigh"
     * Only applies to models where reasoning effort is supported.
     */
    reasoningEffort?: ReasoningEffortOption;
    /**
     * Custom API provider configuration (BYOK - Bring Your Own Key).
     * When set, bypasses Copilot API authentication and uses this provider instead.
     */
    provider?: ProviderConfig;
    featureFlags?: FeatureFlags;
    isExperimentalMode?: boolean;
    /** Feature flag service for reading ExP experiment flags. */
    featureFlagService?: FeatureFlagService;
    availableTools?: string[];
    excludedTools?: string[];
    /**
     * Whether to enable tree-sitter-based script safety assessment for shell commands.
     * When true, shell commands are classified as read-only or write using tree-sitter parsing,
     * allowing read-only commands to auto-execute without a permission prompt.
     * When false or undefined, all commands require permission approval.
     */
    enableScriptSafety?: boolean;
    /**
     * Controls which profile/startup scripts the shell sources during initialization.
     * @see ShellInitProfile
     */
    shellInitProfile?: ShellInitProfile;
    /**
     * Custom flags passed to the shell process on startup (e.g. PowerShell flags).
     * Overrides the default flags for the shell type.
     */
    shellProcessFlags?: string[];
    /** Whether to log raw interactive shell PTY data to the session state directory. */
    logInteractiveShells?: boolean;
    skillDirectories?: string[];
    disabledSkills?: Set<string>;
    installedPlugins?: InstalledPlugin[];
    mcpServers?: Record<string, MCPServerConfig>;
    mcpHost?: McpHost;
    envValueMode?: EnvValueMode;
    customAgents?: SweCustomAgent[];
    selectedCustomAgent?: SweCustomAgent;
    organizationCustomInstructions?: string;
    skipCustomInstructions?: boolean;
    /** Set of instruction source IDs to exclude from the system prompt */
    disabledInstructionSources?: ReadonlySet<string>;
    /** Whether to include co-authored-by trailer instructions in the system prompt. Defaults to true. */
    coauthorEnabled?: boolean;
    systemMessage?: SystemMessageConfig;
    hooks?: QueryHooks;
    externalToolDefinitions?: ExternalToolDefinition[];
    trajectoryFile?: string;
    eventsLogDirectory?: string;
    /**
     * Path to the session transcript (events.jsonl file).
     * Used by hooks to access the full conversation transcript.
     */
    transcriptPath?: string;
    workingDirectory?: string;
    /**
     * Repository name for the session context.
     * Used for memory service scoping, code search, and other repository-aware features.
     * Format: "owner/repo" (e.g., "github/copilot-cli")
     */
    repositoryName?: string;
    authInfo?: AuthInfo;
    copilotUrl?: string;
    enableStreaming?: boolean;
    largeOutput?: LargeToolOutputConfig;
    /** Whether ask_user is explicitly disabled (autonomous mode). When true, system prompt encourages independent action. */
    askUserDisabled?: boolean;
    /** Callback invoked when exit_plan_mode tool is called. Shows approval dialog and returns user response. */
    onExitPlanMode?: (request: ExitPlanModeRequest) => Promise<ExitPlanModeResponse>;
    /** Callback to reload MCP server configuration from disk and restart servers. */
    reloadMcpConfig?: () => Promise<void>;
    /**
     * Controller for managing extensions (subprocess-based tools).
     * Set by the server when extensions are available (requires EXTENSIONS feature flag).
     */
    extensionController?: ExtensionController;
    /** Runtime context for filtering builtin agents (e.g., "cli", "cca", "sdk"). */
    agentContext?: AgentContext;
    /** Whether the CLI is running in interactive mode. Defaults to true. When false, uses non-interactive identity and excludes plan mode instructions. */
    runningInInteractiveMode?: boolean;
    /**
     * Capabilities enabled for this session. Controls prompt content, tool availability, and behaviors.
     * If not specified, defaults to all capabilities (TUI mode).
     * @see SessionCapability for available capabilities
     */
    sessionCapabilities?: Set<SessionCapability>;
    /**
     * Custom configuration directory for the session.
     * When set, overrides the default Copilot config directory (~/.copilot or $COPILOT_HOME).
     */
    configDir?: string;
    /**
     * Runtime settings for persistence and workspace resolution.
     * Used to resolve config/state paths consistently.
     */
    runtimeSettings?: RuntimeSettings;
    /**
     * Infinite session configuration for persistent workspaces and automatic compaction.
     * When enabled, sessions automatically manage context limits and persist state.
     * Can be set to `true` for defaults, `false` to disable, or a config object for fine-tuning.
     * @default { enabled: true }
     */
    infiniteSessions?: InfiniteSessionConfig | boolean;
    /**
     * Additional content exclusion policies beyond those fetched from the API.
     * Session uses these along with authInfo and featureFlags.CONTENT_EXCLUSION
     * to auto-create the ContentExclusionService.
     */
    additionalContentExclusionPolicies?: ContentExclusionApiResponse[];
    /**
     * Client name to use for LSP sessions.
     */
    lspClientName?: string;
    /**
     /**
     * W3C Trace Context traceparent header for distributed tracing.
     * When set, the session's OTel spans are parented to the caller's trace context.
     */
    traceparent?: string;
    /** W3C Trace Context tracestate header for distributed tracing. */
    tracestate?: string;
    /**
     * Stable machine identifier from @vscode/deviceid.
     * Sent as X-Client-Machine-Id header in CAPI requests.
     */
    machineId?: string;
}

export declare type SessionPlanChangedEvent = z.infer<typeof SessionPlanChangedEventSchema>;

/**
 * Plan file changed (created, updated, or deleted)
 */
declare const SessionPlanChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.plan_changed">;
    data: z.ZodObject<{
        operation: z.ZodEnum<["create", "update", "delete"]>;
    }, "strip", z.ZodTypeAny, {
        operation: "create" | "update" | "delete";
    }, {
        operation: "create" | "update" | "delete";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        operation: "create" | "update" | "delete";
    };
    id: string;
    type: "session.plan_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        operation: "create" | "update" | "delete";
    };
    id: string;
    type: "session.plan_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionResumeEvent = z.infer<typeof SessionResumeEventSchema>;

/**
 * Session resumed from disk
 */
declare const SessionResumeEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.resume">;
    data: z.ZodObject<{
        resumeTime: z.ZodString;
        eventCount: z.ZodNumber;
        selectedModel: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
        context: z.ZodOptional<z.ZodObject<{
            cwd: z.ZodString;
            gitRoot: z.ZodOptional<z.ZodString>;
            repository: z.ZodOptional<z.ZodString>;
            hostType: z.ZodOptional<z.ZodEnum<["github", "ado"]>>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }, {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.resume";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        resumeTime: string;
        eventCount: number;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.resume";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

declare type SessionsChatCompletionChunk = CopilotChatCompletionChunk & AgentIdBag;

declare type SessionsChatCompletionMessageParam = (SessionsUserMessageParam | ChatCompletionToolMessageParam) & AgentIdBag;

export declare type SessionShutdownData = SessionShutdownEvent["data"];

export declare type SessionShutdownEvent = z.infer<typeof SessionShutdownEventSchema>;

/**
 * Session shutdown event - emitted when the session is shutting down.
 * Contains aggregated usage metrics for the entire session.
 * Persisted to events.jsonl so usage data is available after the session ends.
 */
declare const SessionShutdownEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.shutdown">;
    data: z.ZodObject<{
        /** The type of shutdown: routine (normal exit) or error (crash/fatal error) */
        shutdownType: z.ZodEnum<["routine", "error"]>;
        /** Error reason if shutdownType is "error" */
        errorReason: z.ZodOptional<z.ZodString>;
        /** Total premium requests used in the session */
        totalPremiumRequests: z.ZodNumber;
        /** Total time spent in API calls (milliseconds) */
        totalApiDurationMs: z.ZodNumber;
        /** Session start time (Unix timestamp) */
        sessionStartTime: z.ZodNumber;
        /** Code changes made during the session */
        codeChanges: z.ZodObject<{
            linesAdded: z.ZodNumber;
            linesRemoved: z.ZodNumber;
            filesModified: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        }, {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        }>;
        /** Per-model usage breakdown */
        modelMetrics: z.ZodRecord<z.ZodString, z.ZodObject<{
            requests: z.ZodObject<{
                count: z.ZodNumber;
                cost: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                count: number;
                cost: number;
            }, {
                count: number;
                cost: number;
            }>;
            usage: z.ZodObject<{
                inputTokens: z.ZodNumber;
                outputTokens: z.ZodNumber;
                cacheReadTokens: z.ZodNumber;
                cacheWriteTokens: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            }, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            }>;
        }, "strip", z.ZodTypeAny, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>>;
        /** Currently selected model (if any) */
        currentModel: z.ZodOptional<z.ZodString>;
        /** Final context window token breakdown at shutdown */
        currentTokens: z.ZodOptional<z.ZodNumber>;
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }, {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.shutdown";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    id: string;
    type: "session.shutdown";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionSkillsResolvedEvent = z.infer<typeof SessionSkillsResolvedEventSchema>;

/**
 * Emitted when skills have been loaded for the session.
 * This is an ephemeral event fired during session initialization after loadSkills() completes.
 */
declare const SessionSkillsResolvedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.skills_loaded">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        skills: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            description: z.ZodString;
            source: z.ZodString;
            userInvocable: z.ZodBoolean;
            enabled: z.ZodBoolean;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }, {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }, {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.skills_loaded";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        skills: {
            name: string;
            enabled: boolean;
            source: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    id: string;
    ephemeral: true;
    type: "session.skills_loaded";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionSnapshotRewindEvent = z.infer<typeof SessionSnapshotRewindEventSchema>;

/**
 * Session rewind event - emitted when session events are rewound (e.g., during snapshot rollback)
 * This is ephemeral and used to signal the UI to reconstruct its state from the remaining events.
 */
declare const SessionSnapshotRewindEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.snapshot_rewind">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        /** The event ID that was rewound to (events after this were removed) */
        upToEventId: z.ZodString;
        /** Number of events that were removed */
        eventsRemoved: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        upToEventId: string;
        eventsRemoved: number;
    }, {
        upToEventId: string;
        eventsRemoved: number;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        upToEventId: string;
        eventsRemoved: number;
    };
    id: string;
    ephemeral: true;
    type: "session.snapshot_rewind";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        upToEventId: string;
        eventsRemoved: number;
    };
    id: string;
    ephemeral: true;
    type: "session.snapshot_rewind";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionStartEvent = z.infer<typeof SessionStartEventSchema>;

/**
 * Session initialization event (first line of JSONL file)
 */
declare const SessionStartEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.start">;
    data: z.ZodObject<{
        sessionId: z.ZodString;
        version: z.ZodNumber;
        producer: z.ZodString;
        copilotVersion: z.ZodString;
        startTime: z.ZodString;
        selectedModel: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
        context: z.ZodOptional<z.ZodObject<{
            cwd: z.ZodString;
            gitRoot: z.ZodOptional<z.ZodString>;
            repository: z.ZodOptional<z.ZodString>;
            hostType: z.ZodOptional<z.ZodEnum<["github", "ado"]>>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        context?: {
            cwd: string;
            branch?: string | undefined;
            gitRoot?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
    };
    id: string;
    type: "session.start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionStartHook = (input: SessionStartHookInput) => Promise<SessionStartHookOutput | void>;

/**
 * Session start hook types
 */
export declare interface SessionStartHookInput extends BaseHookInput {
    source: "startup" | "resume" | "new";
    initialPrompt?: string;
}

export declare interface SessionStartHookOutput {
    additionalContext?: string;
    modifiedConfig?: Record<string, unknown>;
}

declare type SessionsUserMessageParam = ChatCompletionUserMessageParam & {
    /**
     * The component which was the source of the user message.
     * - `jit-instruction`: The message was injected by something which adds automated instructions for the agent
     * - `command-{id}`: The message was injected as a result of a command with the given id
     * - `string`: Some other source
     */
    source?: string;
};

export declare type SessionTaskCompleteEvent = z.infer<typeof SessionTaskCompleteEventSchema>;

/**
 * Task complete event - emitted when the task_complete tool is called.
 * summary uses .default("") for backward compatibility: pre-1.0.6 sessions
 * wrote these events with "data": {} (no summary field).
 */
declare const SessionTaskCompleteEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.task_complete">;
    data: z.ZodObject<{
        summary: z.ZodDefault<z.ZodString>;
        success: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        summary: string;
        success?: boolean | undefined;
    }, {
        summary?: string | undefined;
        success?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        summary: string;
        success?: boolean | undefined;
    };
    id: string;
    type: "session.task_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        summary?: string | undefined;
        success?: boolean | undefined;
    };
    id: string;
    type: "session.task_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionTitleChangedEvent = z.infer<typeof SessionTitleChangedEventSchema>;

/**
 * Emitted when the session's display title changes.
 * Fires on:
 * - Initial workspace load (resume)
 * - Automatic name generation
 * - Session rename (user-initiated)
 */
declare const SessionTitleChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.title_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        title: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        title: string;
    }, {
        title: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        title: string;
    };
    id: string;
    ephemeral: true;
    type: "session.title_changed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        title: string;
    };
    id: string;
    ephemeral: true;
    type: "session.title_changed";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionToolsUpdatedEvent = z.infer<typeof SessionToolsUpdatedEventSchema>;

/**
 * Emitted when the set of available tools changes (e.g., MCP tools added/removed,
 * model change, custom agent selection). Subscribers should call `session.getToolDefinitions()`
 * to retrieve the updated tool list.
 */
declare const SessionToolsUpdatedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.tools_updated">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        /** The model for which tools were resolved. */
        model: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        model: string;
    }, {
        model: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        model: string;
    };
    id: string;
    ephemeral: true;
    type: "session.tools_updated";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        model: string;
    };
    id: string;
    ephemeral: true;
    type: "session.tools_updated";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionTruncationEvent = z.infer<typeof SessionTruncationEventSchema>;

declare const SessionTruncationEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.truncation">;
    data: z.ZodObject<{
        tokenLimit: z.ZodNumber;
        preTruncationTokensInMessages: z.ZodNumber;
        preTruncationMessagesLength: z.ZodNumber;
        postTruncationTokensInMessages: z.ZodNumber;
        postTruncationMessagesLength: z.ZodNumber;
        tokensRemovedDuringTruncation: z.ZodNumber;
        messagesRemovedDuringTruncation: z.ZodNumber;
        performedBy: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    id: string;
    type: "session.truncation";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    id: string;
    type: "session.truncation";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionUsageInfoEvent = z.infer<typeof SessionUsageInfoEventSchema>;

/**
 * Usage info event - emitted every turn to report current context window token usage.
 * Unlike truncation events, this is always emitted regardless of whether truncation occurred.
 */
declare const SessionUsageInfoEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.usage_info">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        tokenLimit: z.ZodNumber;
        currentTokens: z.ZodNumber;
        messagesLength: z.ZodNumber;
        systemTokens: z.ZodOptional<z.ZodNumber>;
        conversationTokens: z.ZodOptional<z.ZodNumber>;
        toolDefinitionsTokens: z.ZodOptional<z.ZodNumber>;
        isInitial: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    }, {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.usage_info";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "session.usage_info";
    timestamp: string;
    parentId: string | null;
}>;

export declare type SessionWarningEvent = z.infer<typeof SessionWarningEventSchema>;

/**
 * Warning notification (for timeline/UI display)
 */
declare const SessionWarningEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.warning">;
    data: z.ZodObject<{
        warningType: z.ZodString;
        message: z.ZodString;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        warningType: string;
        url?: string | undefined;
    }, {
        message: string;
        warningType: string;
        url?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.warning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    id: string;
    type: "session.warning";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionWorkspaceFileChangedEvent = z.infer<typeof SessionWorkspaceFileChangedEventSchema>;

/**
 * Workspace file changed (created or updated)
 */
declare const SessionWorkspaceFileChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.workspace_file_changed">;
    data: z.ZodObject<{
        path: z.ZodString;
        operation: z.ZodEnum<["create", "update"]>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        operation: "create" | "update";
    }, {
        path: string;
        operation: "create" | "update";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        path: string;
        operation: "create" | "update";
    };
    id: string;
    type: "session.workspace_file_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        path: string;
        operation: "create" | "update";
    };
    id: string;
    type: "session.workspace_file_changed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

declare class ShellConfig {
    /**
     * Used to vary behavior programmatically for different shell implementations.
     */
    readonly shellType: ShellType;
    /**
     * Used when describing the shell type to users or in prompts.
     */
    readonly displayName: string;
    /**
     * Name of a tool that invokes a shell command.
     */
    readonly shellToolName: string;
    /**
     * Name of a tool that reads output from a shell session.
     */
    readonly readShellToolName: string;
    /**
     * Name of a tool that sends input to a shell session.
     */
    readonly writeShellToolName: string;
    /**
     * Name of a tool that terminates a shell session.
     */
    readonly stopShellToolName: string;
    /**
     * Name of a tool that lists all active shell sessions.
     */
    readonly listShellsToolName: string;
    /**
     * Additional information to add to the tool description.
     */
    readonly descriptionLines: string[];
    /**
     * A function that assesses the safety of a script to be run in the shell.
     * The reason this exists as a pluggable abstraction is so that only the
     * CLI needs to take a compile-time dependency on tree-sitter, and CCA doesn't.
     */
    readonly assessScriptSafety: (script: string, onWarning?: (message: string) => void) => Promise<SafetyAssessment>;
    /**
     * Controls which profile/startup scripts the shell sources during initialization.
     */
    readonly initProfile: ShellInitProfile;
    /**
     * Flags passed to the shell process on startup (e.g. `-NoProfile`, `-NoLogo` for PowerShell,
     * `--norc`, `--noprofile` for Bash). These are prepended before any structural flags
     * like `-NoExit` or `-Command`.
     */
    readonly processFlags: readonly string[];
    constructor(
    /**
     * Used to vary behavior programmatically for different shell implementations.
     */
    shellType: ShellType, 
    /**
     * Used when describing the shell type to users or in prompts.
     */
    displayName: string, 
    /**
     * Name of a tool that invokes a shell command.
     */
    shellToolName: string, 
    /**
     * Name of a tool that reads output from a shell session.
     */
    readShellToolName: string, 
    /**
     * Name of a tool that sends input to a shell session.
     */
    writeShellToolName: string, 
    /**
     * Name of a tool that terminates a shell session.
     */
    stopShellToolName: string, 
    /**
     * Name of a tool that lists all active shell sessions.
     */
    listShellsToolName: string, 
    /**
     * Additional information to add to the tool description.
     */
    descriptionLines: string[], 
    /**
     * A function that assesses the safety of a script to be run in the shell.
     * The reason this exists as a pluggable abstraction is so that only the
     * CLI needs to take a compile-time dependency on tree-sitter, and CCA doesn't.
     */
    assessScriptSafety?: (script: string, onWarning?: (message: string) => void) => Promise<SafetyAssessment>, 
    /**
     * Controls which profile/startup scripts the shell sources during initialization.
     */
    initProfile?: ShellInitProfile, 
    /**
     * Flags passed to the shell process on startup (e.g. `-NoProfile`, `-NoLogo` for PowerShell,
     * `--norc`, `--noprofile` for Bash). These are prepended before any structural flags
     * like `-NoExit` or `-Command`.
     */
    processFlags?: readonly string[]);
    withScriptSafetyAssessor(assessor: (shellType: ShellType, script: string, onWarning?: (message: string) => void) => Promise<SafetyAssessment>): ShellConfig;
    withInitProfile(profile: ShellInitProfile): ShellConfig;
    withProcessFlags(flags: readonly string[]): ShellConfig;
    static readonly bash: ShellConfig;
    static readonly powerShell: ShellConfig;
}

/** Sent when a shell command exits (after all output has been streamed). */
declare interface ShellExitNotification {
    /** Process identifier returned by `shell.exec`. */
    processId: string;
    /** Process exit code (0 = success). */
    exitCode: number;
}

/**
 * Controls which profile/startup scripts the shell sources during initialization.
 * Shell-agnostic in concept; each shell type interprets the profile concretely.
 */
declare const ShellInitProfile: {
    /** Skip all profile/rc scripts (default). */
    readonly None: "none";
    /**
     * Load non-interactive profile scripts if the shell supports them.
     * Bash: sources BASH_ENV if set. PowerShell: no-op.
     */
    readonly NonInteractive: "non-interactive";
};

declare type ShellInitProfile = (typeof ShellInitProfile)[keyof typeof ShellInitProfile];

/** Streamed output from a shell command started via `shell.exec`. */
declare interface ShellOutputNotification {
    /** Process identifier returned by `shell.exec`. */
    processId: string;
    /** Which output stream produced this chunk. */
    stream: "stdout" | "stderr";
    /** The output data (UTF-8 string, up to 64KB per notification). */
    data: string;
}

/**
 * A permission request for executing shell commands.
 */
declare type ShellPermissionRequest = {
    readonly kind: "shell";
    /** The full command that the user is being asked to approve, e.g. `echo foo && find -exec ... && git push` */
    readonly fullCommandText: string;
    /** A concise summary of the user's intention, e.g. "Echo foo and find a file and then run git push" */
    readonly intention: string;
    /**
     * The commands that are being invoked in the shell invocation.
     *
     * As a special case, which might be better represented in the type system, if there were no parsed commands
     * e.g. `export VAR=value`, then this will have a single entry with identifier equal to the fullCommandText.
     */
    readonly commands: ReadonlyArray<Command>;
    /**
     * Possible file paths that the command might access.
     *
     * This is entirely heuristic, so it's pretty untrustworthy.
     */
    readonly possiblePaths: ReadonlyArray<PossiblePath>;
    /**
     * Possible URLs that the command might access.
     *
     * This is entirely heuristic, so it's pretty untrustworthy.
     */
    readonly possibleUrls: ReadonlyArray<PossibleUrl>;
    /**
     * Indicates whether any command in the script has redirection to write to a file.
     */
    readonly hasWriteFileRedirection: boolean;
    /**
     * If there are complicated constructs, then persistent approval is not supported.
     * e.g. `cat $(echo "foo")` should not be persistently approvable because it's hard
     * for the user to understand the implications.
     */
    readonly canOfferSessionApproval: boolean;
    /**
     * Optional warning message to display (e.g., when the shell parser is unavailable).
     */
    readonly warning?: string;
};

/**
 * A background shell task (detached shell session).
 */
export declare type ShellTask = {
    type: "shell";
    id: string;
    description: string;
    status: BackgroundTaskStatus;
    startedAt: number;
    completedAt?: number;
    command: string;
    logPath: string;
    pid?: number;
};

/**
 * Fields specific to shell tasks.
 */
declare interface ShellTaskFields {
    type: "shell";
    /** Identifier of the underlying shell session */
    shellId: string;
    /** Process exit code when finished */
    exitCode?: number;
    /** Whether the shell is a fully-detached background process */
    detached: boolean;
    /** Path to the log file for detached processes */
    logPath?: string;
    /** The command being executed */
    command?: string;
    /** Process ID (read from .pid file for detached processes) */
    pid?: number;
}

/**
 * Progress for a detached shell task, derived from log file output.
 */
export declare type ShellTaskProgress = {
    type: "shell";
    /** Last 10 lines of log file output */
    recentOutput: string;
    /** Process ID read from .pid file */
    pid?: number;
};

declare type ShellType = "bash" | "powershell";

/**
 * A fully loaded skill definition.
 */
declare interface Skill {
    /** Unique identifier for the skill (from frontmatter). */
    name: string;
    /** Description of what the skill does (from frontmatter). */
    description: string;
    /** The source location type of this skill. */
    source: SkillSource;
    /** Absolute path to the SKILL.md file (or command .md file). */
    filePath: string;
    /** Absolute path to the skill's base directory (parent of SKILL.md, or commands directory for commands). */
    baseDir: string;
    /** Optional list of tools that are auto-allowed when skill is active. */
    allowedTools?: string[];
    /** The full raw content of SKILL.md or command file (for injection into conversation). */
    content: string;
    /** Whether this skill can be invoked by the user as a slash command. Defaults to true. */
    userInvocable: boolean;
    /** Whether the model is prevented from invoking this skill. Defaults to false. */
    disableModelInvocation: boolean;
    /** Name of the plugin this skill came from (only set when source is "plugin"). */
    pluginName?: string;
    /** Version of the plugin this skill came from (only set when source is "plugin"). */
    pluginVersion?: string;
    /** Whether this is a command (from .claude/commands/) rather than a skill. */
    isCommand?: boolean;
}

export declare type SkillInvokedEvent = z.infer<typeof SkillInvokedEventSchema>;

/**
 * A skill was successfully invoked and loaded.
 * Used to track skills for preservation across compaction.
 */
declare const SkillInvokedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"skill.invoked">;
    data: z.ZodObject<{
        /** The skill name */
        name: z.ZodString;
        /** Path to the SKILL.md file */
        path: z.ZodString;
        /** The full content of the skill file */
        content: z.ZodString;
        /** Tools that should be auto-approved when this skill is active */
        allowedTools: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Name of the plugin this skill came from (only set when source is "plugin") */
        pluginName: z.ZodOptional<z.ZodString>;
        /** Version of the plugin this skill came from (only set when source is "plugin") */
        pluginVersion: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    }, {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    };
    id: string;
    type: "skill.invoked";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        name: string;
        content: string;
        path: string;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
    };
    id: string;
    type: "skill.invoked";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/**
 * Source location of a skill, determines priority order.
 * - project: .github/skills/ or .claude/skills/ in current working directory (highest priority)
 * - inherited: .github/skills/ or .claude/skills/ in parent directories (monorepo support)
 * - personal-copilot: ~/.copilot/skills/
 * - personal-claude: ~/.claude/skills/
 * - plugin: From an installed plugin
 * - custom: Added via COPILOT_SKILLS_DIRS env var or config (lowest priority)
 */
declare type SkillSource = "project" | "inherited" | "personal-copilot" | "personal-claude" | "plugin" | "custom";

declare interface SSETransportConfig {
    type: "sse";
    url: string;
    headers?: Record<string, string>;
    authProvider?: OAuthClientProvider;
}

declare interface StdioTransportConfig {
    type: "stdio";
    command: string;
    args: string[];
    env: Record<string, string>;
    stderr?: Writable;
    cwd?: string;
}

/**
 * Simplified streaming chunk context containing only the essential delta information
 * needed by processors. This avoids the complexity of converting between different
 * API formats (e.g., Responses API to ChatCompletion chunks).
 *
 * @deprecated In the future, we will move to a model where the individual API clients emit Core Runtime events, instead of the current model where ChatCompletions are the defacto interface.
 * Please avoid adding new streaming chunk processors, and instead consider if now is the right time to fix the abstraction gap between the ChatCompletionsClient and the DerivedResponsesClient.
 * Talk to @jmoseley or @mrayermannmsft for more context.
 */
declare type StreamingChunkContext = {
    /**
     * The streaming ID of the message.
     */
    streamingId: string;
    /**
     * Text content delta from this chunk.
     */
    content?: string;
    /**
     * Reasoning content delta from this chunk (chain-of-thought summaries).
     */
    reasoningContent?: string;
    /**
     * Arguments delta for the report_intent tool call. Processors can accumulate
     * these deltas to extract the intent once the JSON is complete.
     */
    reportIntentArguments?: string;
    /**
     * Approximate byte size of this chunk, calculated from content and all tool call data.
     */
    size: number;
};

export declare type SubagentCompletedEvent = z.infer<typeof SubagentCompletedEventSchema>;

/**
 * Subagent execution completes successfully
 */
declare const SubagentCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.completed">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.completed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.completed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SubagentDeselectedEvent = z.infer<typeof SubagentDeselectedEventSchema>;

/**
 * A custom agent was deselected, returning to the default agent
 */
declare const SubagentDeselectedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.deselected">;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    data: {};
    id: string;
    type: "subagent.deselected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {};
    id: string;
    type: "subagent.deselected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SubagentFailedEvent = z.infer<typeof SubagentFailedEventSchema>;

/**
 * Subagent execution fails
 */
declare const SubagentFailedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.failed">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        error: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.failed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.failed";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SubagentSelectedEvent = z.infer<typeof SubagentSelectedEventSchema>;

/**
 * Subagent selected for the session
 */
declare const SubagentSelectedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.selected">;
    data: z.ZodObject<{
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        tools: z.ZodNullable<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    }, {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.selected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    id: string;
    type: "subagent.selected";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SubagentStartedEvent = z.infer<typeof SubagentStartedEventSchema>;

/**
 * Subagent execution begins
 */
declare const SubagentStartedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"subagent.started">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        agentDescription: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    };
    id: string;
    type: "subagent.started";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    };
    id: string;
    type: "subagent.started";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SubagentStartHook = (input: SubagentStartHookInput) => Promise<SubagentStartHookOutput | void>;

/**
 * Subagent start hook types — fires when a subagent is spawned via the Task tool.
 * Cannot block subagent creation. Can inject additionalContext into the subagent.
 */
export declare interface SubagentStartHookInput extends BaseHookInput {
    transcriptPath: string;
    agentName: string;
    agentDisplayName?: string;
    agentDescription?: string;
}

export declare interface SubagentStartHookOutput {
    additionalContext?: string;
}

export declare type SubagentStopHook = (input: SubagentStopHookInput) => Promise<SubagentStopHookOutput | void>;

/**
 * Subagent stop hook types - fires when a subagent completes, before returning result to parent
 */
export declare interface SubagentStopHookInput extends BaseHookInput {
    transcriptPath: string;
    agentName: string;
    agentDisplayName?: string;
    stopReason: "end_turn";
}

export declare interface SubagentStopHookOutput {
    /** If "block", the subagent will continue with another turn using the reason. Undefined means "allow". */
    decision?: "block" | "allow";
    reason?: string;
}

/**
 * Subset of src/types/clients/types.ts that is required to actually run
 * a custom agent.
 */
export declare type SweCustomAgent = {
    name: string;
    displayName: string;
    description: string;
    tools: string[] | null;
    prompt: () => Promise<string>;
    mcpServers?: Record<string, MCPServerConfig>;
    disableModelInvocation: boolean;
    /**
     * Model to use for this agent. When unset, inherits the outer agent's model.
     * When set but unavailable, falls back to the outer agent's model.
     */
    model?: string;
    /**
     * GitHub-specific configuration for this agent.
     */
    github?: {
        /**
         * GitHub MCP toolsets to enable for this agent.
         * When set, a github-mcp-server entry is automatically added/adapted in
         * the agent's mcpServers with the X-MCP-Toolsets header.
         */
        toolsets?: string[];
        /**
         * GitHub permission levels for this agent's resource scopes.
         * Used to determine whether the github-mcp-server operates in readonly mode.
         */
        permissions?: GitHubPermissions;
    };
};

/**
 * Append mode: Use CLI foundation with optional appended content (default).
 */
declare interface SystemMessageAppendConfig {
    mode?: "append";
    /**
     * Additional instructions appended after SDK-managed sections.
     */
    content?: string;
}

/**
 * System message configuration for session creation.
 * - Append mode (default): SDK foundation + optional custom content
 * - Replace mode: Full control, caller provides entire system message
 * - Customize mode: Section-level overrides with graceful fallback
 */
declare type SystemMessageConfig = SystemMessageAppendConfig | SystemMessageReplaceConfig | SystemMessageCustomizeConfig;

/**
 * Customize mode: Override individual sections of the system prompt.
 * Keeps the SDK-managed prompt structure while allowing targeted modifications.
 */
declare interface SystemMessageCustomizeConfig {
    mode: "customize";
    /**
     * Override specific sections of the system prompt by section ID.
     * Unknown section IDs gracefully fall back: content-bearing overrides are appended
     * to additional instructions, and "remove" on unknown sections is a silent no-op.
     */
    sections?: Partial<Record<SystemPromptSection, SectionOverride>>;
    /**
     * Additional content appended after all sections.
     * Equivalent to append mode's content field — provided for convenience.
     */
    content?: string;
}

export declare type SystemMessageEvent = z.infer<typeof SystemMessageEventSchema>;

/**
 * System message/prompt
 */
declare const SystemMessageEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"system.message">;
    data: z.ZodObject<{
        content: z.ZodString;
        role: z.ZodEnum<["system", "developer"]>;
        name: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodObject<{
            promptVersion: z.ZodOptional<z.ZodString>;
            variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        }, {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }, {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    id: string;
    type: "system.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    id: string;
    type: "system.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/**
 * Replace mode: Use caller-provided system message entirely.
 * Removes all SDK guardrails including security restrictions.
 */
declare interface SystemMessageReplaceConfig {
    mode: "replace";
    /**
     * Complete system message content.
     * Replaces the entire SDK-managed system message.
     */
    content: string;
}

export declare type SystemNotificationEvent = z.infer<typeof SystemNotificationEventSchema>;

declare const SystemNotificationEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"system.notification">;
    data: z.ZodObject<{
        content: z.ZodString;
        kind: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
            type: z.ZodLiteral<"agent_completed">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            status: z.ZodEnum<["completed", "failed"]>;
            description: z.ZodOptional<z.ZodString>;
            prompt: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"agent_idle">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"shell_completed">;
            shellId: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        }, {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"shell_detached_completed">;
            shellId: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        }, {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    }, {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    };
    id: string;
    type: "system.notification";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "shell_completed";
            shellId: string;
            exitCode?: number | undefined;
            description?: string | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        };
        content: string;
    };
    id: string;
    type: "system.notification";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type SystemNotificationKind = z.infer<typeof SystemNotificationKindSchema>;

declare const SystemNotificationKindSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
    type: z.ZodLiteral<"agent_completed">;
    agentId: z.ZodString;
    agentType: z.ZodString;
    status: z.ZodEnum<["completed", "failed"]>;
    description: z.ZodOptional<z.ZodString>;
    prompt: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    status: "completed" | "failed";
    type: "agent_completed";
    agentId: string;
    agentType: string;
    description?: string | undefined;
    prompt?: string | undefined;
}, {
    status: "completed" | "failed";
    type: "agent_completed";
    agentId: string;
    agentType: string;
    description?: string | undefined;
    prompt?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"agent_idle">;
    agentId: z.ZodString;
    agentType: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    type: "agent_idle";
    agentId: string;
    agentType: string;
    description?: string | undefined;
}, {
    type: "agent_idle";
    agentId: string;
    agentType: string;
    description?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"shell_completed">;
    shellId: z.ZodString;
    exitCode: z.ZodOptional<z.ZodNumber>;
    description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    type: "shell_completed";
    shellId: string;
    exitCode?: number | undefined;
    description?: string | undefined;
}, {
    type: "shell_completed";
    shellId: string;
    exitCode?: number | undefined;
    description?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"shell_detached_completed">;
    shellId: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    type: "shell_detached_completed";
    shellId: string;
    description?: string | undefined;
}, {
    type: "shell_detached_completed";
    shellId: string;
    description?: string | undefined;
}>]>;

/**
 * Known system prompt section identifiers for the "customize" mode.
 * Each section corresponds to a leaf-level part of the system prompt.
 */
declare type SystemPromptSection = "identity" | "tone" | "tool_efficiency" | "environment_context" | "code_change_rules" | "guidelines" | "safety" | "tool_instructions" | "custom_instructions" | "last_instructions";

/**
 * Callback invoked whenever the set of tracked tasks changes.
 */
declare type TaskChangeCallback = () => void;

/**
 * Callback invoked when any task completes, fails, or is cancelled.
 */
declare type TaskCompletionCallback = (task: TaskEntry) => void;

/**
 * A task entry in the registry — either an agent or a shell.
 */
declare type TaskEntry = TaskEntryBase & (AgentTaskFields | ShellTaskFields);

/**
 * Common fields shared by every task entry.
 */
declare interface TaskEntryBase {
    /** Unique task identifier */
    id: string;
    /** ID of the agent that spawned this task ("session" for root) */
    ownerId: string;
    /** Parent task ID for cascading abort */
    parentId?: string;
    /** Controller whose signal is wired to the underlying work */
    abortController: AbortController;
    /** Current lifecycle status */
    status: TaskStatus;
    /** Human-readable description */
    description?: string;
    /** Timestamp when the task was registered */
    startedAt: number;
    /** Timestamp when the task finished */
    completedAt?: number;
    /** Accumulated milliseconds the task has spent actively running (excludes idle time) */
    activeTimeMs: number;
    /** Timestamp when the current active period began (undefined while idle or finished) */
    activeStartedAt?: number;
    /** Timestamp when the task entered idle state (undefined while running or finished) */
    idleSince?: number;
}

/**
 * Options for {@link TaskRegistry.list}.
 */
declare interface TaskListOptions {
    /** Filter by task type */
    type?: TaskType;
    /** Filter by owner */
    ownerId?: string;
    /** Include non-running tasks (default: true) */
    includeCompleted?: boolean;
}

/**
 * Unified registry for tracking background agents and shell processes.
 *
 * Each task has an owner, optional parent for cascading abort,
 * and lifecycle callbacks for UI updates and completion notifications.
 */
declare class TaskRegistry {
    private readonly tasks;
    private readonly pendingPromises;
    /** Resolvers for waking idle agents when a new message arrives */
    private readonly messageResolvers;
    /** Resolvers for callers waiting on the next turn to complete */
    private readonly turnWaiters;
    private onChangeCallback?;
    private onCompletionCallback?;
    private onAgentIdleCallback?;
    /**
     * Set a callback that fires whenever a task is registered, removed, or
     * changes status. Useful for UI re-renders.
     */
    setOnChangeCallback(callback: TaskChangeCallback | undefined): void;
    /** Manually trigger the change callback (e.g., after mutating an entry in-place). */
    notifyChange(): void;
    /**
     * Set a callback that fires when any task reaches a terminal state
     * (completed, failed, or cancelled).
     */
    setOnCompletionCallback(callback: TaskCompletionCallback | undefined): void;
    /**
     * Set a callback that fires when a multi-turn agent enters idle state
     * (finished processing a turn and waiting for the next message).
     * Used to send system notifications so the parent model knows results are available.
     */
    setOnAgentIdleCallback(callback: ((task: AgentTaskEntry) => void) | undefined): void;
    /**
     * Register a new task. Throws if a task with the same ID already exists.
     */
    register(entry: TaskEntry): void;
    /**
     * Retrieve a single task by ID.
     */
    get(id: string): TaskEntry | undefined;
    /**
     * List tasks with optional filters. Every agent can see every task.
     */
    list(options?: TaskListOptions): TaskEntry[];
    /**
     * Cancel a task and all of its descendants.
     *
     * Only the task's owner or the root session (`"session"`) may cancel.
     * Returns `true` if the task was found **and** running (and is now cancelled).
     */
    cancel(id: string, requesterId: string): boolean;
    /**
     * Mark a task as completed.
     */
    complete(id: string, result?: unknown): void;
    /**
     * Mark a task as failed.
     */
    fail(id: string, error: string): void;
    /**
     * Remove a non-running task from the registry.
     *
     * Only the task's owner or the root session may remove.
     */
    remove(id: string, requesterId: string): boolean;
    /**
     * Returns `true` if any task is currently in the "running" state.
     */
    hasRunningTasks(): boolean;
    /**
     * Get all direct children of a given parent task.
     */
    getChildren(parentId: string): TaskEntry[];
    /**
     * Wait for every currently-running agent task to reach a terminal state.
     *
     * Shell tasks are excluded because their registry status reflects the
     * session lifetime, not individual command activity.  Use
     * `shellContext.waitForActiveCommands()` to wait for in-progress
     * shell commands.
     *
     * Resolves immediately if nothing is running.
     */
    waitForAgents(): Promise<void>;
    /**
     * Starts a background agent execution, registers it, and tracks the promise.
     * @param agentType - The type of agent to run
     * @param description - Short description of the task
     * @param prompt - The prompt to send to the agent
     * @param executeAgent - Function that actually executes the agent, receives an AbortSignal
     * @param options - Optional agent metadata
     * @returns The agent ID for tracking
     */
    startAgent(agentType: string, description: string, prompt: string, executeAgent: (abortSignal: AbortSignal) => Promise<unknown>, options?: {
        modelOverride?: string;
        toolCallId?: string;
        ownerId?: string;
        parentId?: string;
        preGeneratedAgentId?: string;
        executionMode?: AgentExecutionMode;
    }): string;
    /**
     * Gets the result of a background agent, optionally waiting for completion.
     * @param agentId - The agent ID to query
     * @param wait - Whether to wait for completion if still running
     * @param timeoutMs - Maximum time to wait in milliseconds (default: 30000)
     * @returns The task entry and optional result, or undefined if not found
     */
    getAgentResult(agentId: string, wait?: boolean, timeoutMs?: number): Promise<{
        task: AgentTaskEntry;
        result?: unknown;
        timedOut?: boolean;
    } | undefined>;
    /**
     * Sends a message to an agent's message queue.
     * If the agent is idle, wakes it up to process the message.
     */
    sendMessage(agentId: string, message: AgentMessage): boolean;
    /**
     * Waits for a message to arrive in the agent's queue.
     * Called by the agent executor loop when the agent has finished a turn.
     * Sets the agent status to "idle" while waiting.
     */
    waitForMessage(agentId: string, abortSignal?: AbortSignal): Promise<AgentMessage | undefined>;
    /**
     * Records a turn response for an agent.
     * Updates both latestResponse and appends to turnHistory.
     */
    setLatestResponse(agentId: string, response: string, inboundMessage?: AgentMessage): void;
    /** Flush any in-progress active period into the accumulated total. */
    private finalizeActiveTime;
    /**
     * Recursively cancel a task and all its descendants.
     */
    private cancelRecursive;
    /**
     * Fire the completion callback, swallowing errors to avoid breaking callers.
     */
    private notifyCompletion;
    /**
     * Fire the idle callback when a multi-turn agent enters idle state,
     * swallowing errors to avoid breaking callers.
     */
    private notifyAgentIdle;
    /**
     * Remove a specific turn waiter from the waiter list to prevent leaks on timeout.
     */
    private removeTurnWaiter;
}

/**
 * Lifecycle status for a tracked task.
 */
declare type TaskStatus = "running" | "idle" | "completed" | "failed" | "cancelled";

/**
 * Task type discriminator.
 */
declare type TaskType = "agent" | "shell";

/**
 * Telemetry emitted by the runtime contains properties and metrics. These are non-sensitive pieces
 * of information. There are also restricted properties that must be used to store sensitive information.
 */
declare type Telemetry = {
    /**
     * Telemetry properties can be used to store string props.
     * WARNING: Do not put sensitive data here. Use restrictedProperties for that.
     */
    properties: Record<string, string | undefined>;
    /**
     * Restricted telemetry properties must be used to store sensitive string props. These props will only be available on the restricted kusto topics.
     * Nonnullable so it is harder to overlook.
     */
    restrictedProperties: Record<string, string | undefined>;
    /**
     * The name of the telemetry event associated with the emitted runtime event.
     */
    metrics: Record<string, number | undefined>;
};

/**
 * End user wrapper for telemetry events.
 * Used by application code that doesn't need to care which hydro table what information is sent to.
 */
declare interface TelemetryEvent {
    /** Event type/kind (e.g., "session_shutdown", "tool_call_executed") */
    kind: string;
    /** Non-restricted properties (key-value pairs) */
    properties?: Record<string, string | undefined>;
    /** Restricted properties (may contain sensitive data like PII, file paths, ...)  */
    restrictedProperties?: Record<string, string | undefined>;
    /** Numeric metrics */
    metrics?: Record<string, number | undefined>;
    /** Reference to the model call that produced this event */
    modelCallId?: string;
    /**
     * When true, sending this event is deferred until the ExP (Experimentation
     * Platform) response has been received, so the event is enriched with
     * experiment assignment context and flags.  Falls back to immediate send
     * after a timeout to avoid blocking telemetry indefinitely.
     */
    awaitExpBeforeSend?: boolean;
}

/**
 * Alternatively telemetry can be emitted by an event which just contains telemetry. This is that type.
 *
 * You can use this type with our without generics. The generics help you to enforce what properties/metrics are on your event
 * more precisely and safely.
 */
declare type TelemetryEvent_2<EventT = string, TelemetryT extends Telemetry = Telemetry> = {
    kind: "telemetry";
    telemetry: EventTelemetry<EventT, TelemetryT>;
};

declare type TelemetryMeasurements = {
    [key: string]: number | undefined;
};

declare type TelemetryProperties = {
    [key: string]: string | undefined;
};

/**
 * Minimal interface for sending telemetry events.
 * Used by components that only need to emit events without depending on the full SessionTelemetry class.
 */
declare interface TelemetrySender {
    sendTelemetry(event: TelemetryEvent): void;
}

declare abstract class TelemetryService {
    protected readonly authManager?: AuthManager | undefined;
    constructor(authManager?: AuthManager | undefined);
    abstract sendTelemetryEvent(eventName: string, properties?: TelemetryProperties, measurements?: TelemetryMeasurements, tags?: TelemetryTags): void;
    abstract sendHydroEvent(event: HydroEvent, options?: {
        clientName?: string;
    }): void;
    /** Whether restricted telemetry should be sent (staff + user opted in) */
    abstract shouldSendRestrictedTelemetry(): boolean;
    abstract dispose(): Promise<void> | void;
    /**
     * Send a TelemetryEvent as hydro bag events, routing unrestricted properties to
     * cli.telemetry and restricted properties to cli.restricted_telemetry.
     *
     * @param event - The telemetry event with properties/restrictedProperties/metrics
     * @param hydroFields - Optional extra fields merged into the hydro event envelope (e.g. session_id, features)
     * @param options - Optional client name for routing
     */
    sendBagTelemetryEvent(event: TelemetryEvent, hydroFields?: {
        session_id?: string;
        features?: Record<string, string>;
    }, options?: {
        clientName?: string;
    }): void;
}

declare type TelemetryTags = {
    [key: string]: string;
};

/**
 * Detected terminal colors: background, foreground, and the 16 ANSI palette colors.
 */
declare interface TerminalColors {
    bg: string;
    fg: string;
    /** The 8 standard ANSI colors (indices 0-7) */
    ansi: {
        k: string;
        r: string;
        g: string;
        y: string;
        b: string;
        m: string;
        c: string;
        w: string;
    };
    /** The 8 bright ANSI colors (indices 8-15) */
    ansiBright: {
        k: string;
        r: string;
        g: string;
        y: string;
        b: string;
        m: string;
        c: string;
        w: string;
    };
}

export declare type TerminalContent = z.infer<typeof TerminalContentSchema>;

/**
 * Terminal content block with optional exit code and cwd
 */
declare const TerminalContentSchema: z.ZodObject<{
    type: z.ZodLiteral<"terminal">;
    text: z.ZodString;
    exitCode: z.ZodOptional<z.ZodNumber>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    text: string;
    type: "terminal";
    exitCode?: number | undefined;
    cwd?: string | undefined;
}, {
    text: string;
    type: "terminal";
    exitCode?: number | undefined;
    cwd?: string | undefined;
}>;

export declare type TextContent = z.infer<typeof TextContentSchema>;

/**
 * Text content block
 */
declare const TextContentSchema: z.ZodObject<{
    type: z.ZodLiteral<"text">;
    text: z.ZodString;
}, "strip", z.ZodTypeAny, {
    text: string;
    type: "text";
}, {
    text: string;
    type: "text";
}>;

/** Represents a Token authentication information using in the SDK. */
declare type TokenAuthInfo = {
    readonly type: "token";
    readonly host: string;
    readonly token: string;
    readonly copilotUser?: CopilotUserResponse;
};

declare type Tool = {
    name: string;
    namespacedName: string;
    /** Original/display name for the MCP server  */
    mcpServerName?: string;
    /** Raw MCP tool name as reported by the server. */
    mcpToolName?: string;
    /** Intended for UI and end-user contexts — optimized to be human-readable
     * and easily understood, even by those unfamiliar with domain-specific terminology.
     *
     * If not provided, the name should be used for display (except for Tool, where
     * annotations.title should be given precedence over using name, if present).
     */
    title: string;
    description: string;
    input_schema: ToolInputSchema;
    readOnly?: boolean;
    safeForTelemetry: {
        name: boolean;
        inputsNames: boolean;
    };
    filterMode?: ContentFilterMode;
    disableSecretMasking?: boolean;
};

declare type Tool_2<CallbackT extends ToolCallback = ToolCallback> = ToolMetadata & {
    /**
     * A human readable string summary of what this command intends to do if executed.
     *
     * If not set, no summarised intention should be assumed by the caller.
     */
    summariseIntention?: (input: unknown) => string;
    callback: CallbackT;
    shutdown?: ToolShutdown;
};

/**
 * @param input The input to the tool
 * @param options Options for the tool, includes the standard `ToolCallbackOptions` as well as any additional options that were set for the tool in settings.
 */
declare type ToolCallback = (input: unknown, options?: ToolCallbackOptions) => Promise<ToolResult>;

declare type ToolCallbackOptions<OptionsT = {
    [key: string]: unknown;
}> = {
    /**
     * The ID of the LLM tool call which initiated this tool invocation.
     */
    toolCallId: string;
    truncationOptions?: {
        /**
         * The number of tokens that the tool's response should ideally be limited to.
         */
        tokenLimit: number;
        /**
         * A function to count the number of tokens in a string.
         */
        countTokens: (input: string) => number;
    };
    /**
     * A client that the tool can use to make chat completion calls.
     */
    client?: Client_2;
    /**
     * Other options specific to the tool. Passed in from settings.
     */
    toolOptions?: OptionsT;
    /**
     * Global runtime settings.
     */
    settings: RuntimeSettings;
    /**
     * An optional AbortSignal to allow cancellation of tool execution.
     */
    abortSignal?: AbortSignal;
    /**
     * Options for handling large tool outputs.
     */
    largeOutputOptions?: LargeOutputOptions;
    /**
     * Pre-computed diff snapshot, shared across tools in a single validation pass.
     * When present, tools should use this instead of running their own git diff commands.
     */
    repoChangeSet?: RepoChangeSet;
    multiTurnConfig?: {
        /** The background agent registry to check for messages */
        registry: TaskRegistry;
        /** The agent ID in the registry */
        agentId: string;
    };
};

export declare type ToolExecutionCompleteEvent = z.infer<typeof ToolExecutionCompleteEventSchema>;

/**
 * Tool execution completes (success or error)
 */
declare const ToolExecutionCompleteEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"tool.execution_complete">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        success: z.ZodBoolean;
        /** The model that generated the tool call. */
        model: z.ZodOptional<z.ZodString>;
        /** The CAPI interaction ID for this tool execution */
        interactionId: z.ZodOptional<z.ZodString>;
        isUserRequested: z.ZodOptional<z.ZodBoolean>;
        result: z.ZodOptional<z.ZodObject<{
            /**
             * Tool result content sent to LLM for chat completion.
             * Typically concise/truncated for token efficiency.
             * Populated from: textResultForLlm || sessionLog
             */
            content: z.ZodString;
            /**
             * Detailed tool result for UI/timeline display.
             * Preserves full content like diffs. Optional - falls back to content.
             * Populated from: sessionLog || textResultForLlm
             */
            detailedContent: z.ZodOptional<z.ZodString>;
            /**
             * Structured content blocks from tool execution.
             * Contains rich content like text, images, audio, and resources in their native format.
             * Can be populated by any tool (MCP tools, bash, etc.) that returns structured content.
             */
            contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
                type: z.ZodLiteral<"text">;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "text";
            }, {
                text: string;
                type: "text";
            }>, z.ZodObject<{
                type: z.ZodLiteral<"terminal">;
                text: z.ZodString;
                exitCode: z.ZodOptional<z.ZodNumber>;
                cwd: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            }, {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"image">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                data: string;
                type: "image";
                mimeType: string;
            }, {
                data: string;
                type: "image";
                mimeType: string;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"audio">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                data: string;
                type: "audio";
                mimeType: string;
            }, {
                data: string;
                type: "audio";
                mimeType: string;
            }>, z.ZodObject<{
                icons: z.ZodOptional<z.ZodArray<z.ZodObject<{
                    src: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    sizes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    theme: z.ZodOptional<z.ZodEnum<["light", "dark"]>>;
                }, "strip", z.ZodTypeAny, {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }, {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }>, "many">>;
                name: z.ZodString;
                title: z.ZodOptional<z.ZodString>;
                uri: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                mimeType: z.ZodOptional<z.ZodString>;
                size: z.ZodOptional<z.ZodNumber>;
            } & {
                type: z.ZodLiteral<"resource_link">;
            }, "strip", z.ZodTypeAny, {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            }, {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"resource">;
                resource: z.ZodUnion<[z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>, z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    blob: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>]>;
            }, "strip", z.ZodTypeAny, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }>]>, "many">>;
        }, "strip", z.ZodTypeAny, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        }, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        }>>;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
            code: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            code?: string | undefined;
        }, {
            message: string;
            code?: string | undefined;
        }>>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    }, {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    };
    id: string;
    type: "tool.execution_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        success: boolean;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                exitCode?: number | undefined;
                cwd?: string | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                name: string;
                type: "resource_link";
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                    theme?: "light" | "dark" | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
    };
    id: string;
    type: "tool.execution_complete";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

declare type ToolExecutionEvent = {
    kind: "tool_execution";
    turn: number;
    callId?: string;
    toolCallId: string;
    toolResult: ToolResultExpanded;
    durationMs: number;
};

export declare type ToolExecutionPartialResultEvent = z.infer<typeof ToolExecutionPartialResultEventSchema>;

/**
 * Tool execution partial result (streaming updates)
 * Note: These events have ephemeral: true and are NOT persisted to disk
 */
declare const ToolExecutionPartialResultEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"tool.execution_partial_result">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        partialOutput: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        partialOutput: string;
    }, {
        toolCallId: string;
        partialOutput: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_partial_result";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_partial_result";
    timestamp: string;
    parentId: string | null;
}>;

export declare type ToolExecutionProgressEvent = z.infer<typeof ToolExecutionProgressEventSchema>;

/**
 * Tool execution progress notification (e.g., from MCP servers)
 * Note: These events have ephemeral: true and are NOT persisted to disk
 */
declare const ToolExecutionProgressEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"tool.execution_progress">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        progressMessage: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        progressMessage: string;
    }, {
        toolCallId: string;
        progressMessage: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_progress";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    id: string;
    ephemeral: true;
    type: "tool.execution_progress";
    timestamp: string;
    parentId: string | null;
}>;

export declare type ToolExecutionStartEvent = z.infer<typeof ToolExecutionStartEventSchema>;

/**
 * Tool execution begins
 */
declare const ToolExecutionStartEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"tool.execution_start">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        mcpServerName: z.ZodOptional<z.ZodString>;
        mcpToolName: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    }, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    };
    id: string;
    type: "tool.execution_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
    };
    id: string;
    type: "tool.execution_start";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/**
 * JSON Schema object for tool input parameters.
 *
 * Tool input schemas are always objects (type: "object") since function calling
 * requires named parameters. This type is compatible with:
 * - OpenAI's `FunctionParameters` (`{ [key: string]: unknown }`)
 * - Anthropic's `Tool.InputSchema` (`{ type: 'object'; [k: string]: unknown }`)
 *
 * When accessing specific schema properties (e.g., `properties`, `required`),
 * explicit type narrowing or assertions are required.
 */
declare type ToolInputSchema = {
    type: "object";
    [key: string]: unknown;
};

/**
 * An event that is emitted by the `Client` for each tool message it will send back to the LLM.
 */
declare type ToolMessageEvent = {
    kind: "message";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    message: ChatCompletionToolMessageParam;
};

/**
 * Lightweight tool metadata used for system message building, token counting, and display.
 * Contains only the declarative properties of a tool, without execution callbacks.
 *
 * This is the base type that Tool extends. Functions that only need tool metadata
 * (like cliSystemMessage) should accept ToolMetadata[] to allow passing either
 * ToolMetadata[] or Tool[] without conversion.
 */
declare type ToolMetadata = {
    /**
     * Name used to identify the tool in prompts and tool calls.
     */
    name: string;
    /**
     * Optional namespaced name for the tool used for declarative filtering of tools.
     * e.g.: "playwright/navigate"
     */
    namespacedName?: string;
    /**
     * Optional MCP metadata.
     * These are only set for MCP-backed tools and are used for telemetry/logging.
     *
     * Note: `mcpServerName` is a display/original name and may contain "/".
     */
    mcpServerName?: string;
    mcpToolName?: string;
    /** Intended for UI and end-user contexts — optimized to be human-readable
     * and easily understood, even by those unfamiliar with domain-specific terminology.
     *
     * If not provided, the name should be used for display (except for Tool, where
     * annotations.title should be given precedence over using name, if present).
     */
    title?: string;
    /**
     * Description of what the tool does.
     */
    description: string;
    /**
     * JSON Schema for the tool's input.
     * Required for function tools, optional for custom tools.
     */
    input_schema?: ToolInputSchema;
    /**
     * Optional instructions for how to use this tool effectively.
     * These instructions will be included in the system prompt's <tools> section.
     */
    instructions?: string;
    /**
     * When true, marks this tool as deferred for tool search.
     * Deferred tools are sent to the model with `copilot_defer_loading: true`
     * and are not loaded into the model's context until discovered via a tool search tool.
     * See: https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool
     */
    deferLoading?: boolean;
    /**
     * The type of the tool. Defaults to "function" if not specified.
     * - "function": Standard function tool with JSON Schema input
     * - "custom": Custom tool with grammar-based input format
     */
    type?: "function" | "custom";
    /**
     * The input format for custom tools. Only used when type is "custom".
     */
    format?: CustomToolInputFormat;
    /**
     * Whether calling this tool should terminate the agent loop.
     * When true, the model will not be called again after this tool executes.
     */
    isTerminal?: boolean;
    /**
     * Whether or not information about this tool is safe to send to telemetry without obfuscation.
     * - If `true`/`false`, then it will be assumed that all such information is safe/unsafe.
     * - If an object, then safety is determined per property.
     */
    safeForTelemetry?: {
        name: boolean;
        inputsNames: boolean;
    } | true;
};

declare type ToolProgressCallback = (callId: string, progressMessage: string) => void;

declare type ToolResult = string | ToolResultExpanded;

declare type ToolResultExpanded<TelemetryT extends Telemetry = Telemetry> = {
    /**
     * The result to be given back to the LLM.
     *
     * If @see sessionLog is omitted, then this will be used as the session log.
     */
    textResultForLlm: string;
    /**
     * The result to be given back to the LLM. It can be either base64 encoded image or audio content.
     */
    binaryResultsForLlm?: BinaryResult[];
    /**
     * Whether or not the result should be considered a success, failure, or previously interrupted.
     * - `success`: The tool executed successfully and produced a valid result.
     * - `failure`: The tool encountered an error or did not produce a valid result.
     * - `rejected`: The tool call was rejected either because the user didn't want this call, or a previous dependent one.
     * - `denied`: The tool call was denied because the permissions service said no.
     */
    resultType: "success" | "failure" | "rejected" | "denied";
    /**
     * If there was any sort of error that caused the tool to fail, then a string representation of the error. Typically
     * only set if {@link resultType} is `'failure'`.
     */
    error?: string;
    /**
     * Specific telemetry for the tool. Will be sent back to the server by the agent.
     */
    toolTelemetry?: {
        properties?: TelemetryT["properties"];
        restrictedProperties?: TelemetryT["restrictedProperties"];
        metrics?: TelemetryT["metrics"];
    };
    /**
     * Well-formatted (typically Markdown) string that can be used to display the input/output of the tool invoked.
     *
     * (Optional) If omitted, the text result for the LLM will be used as the session log.
     */
    sessionLog?: string;
    /**
     * When true, skips the large output processing that would normally write
     * large results to a temp file. Used when the caller explicitly requested
     * the full output (e.g., forceReadLargeFiles=true on the view tool).
     */
    skipLargeOutputProcessing?: boolean;
    /**
     * User messages to inject into the conversation history after this tool result.
     * These messages are added to the conversation and sent to the model, but can be
     * filtered from the timeline display based on their source.
     *
     * Use case: Skills inject their full content as user messages so the model
     * treats them as instructions to follow, while keeping the timeline clean.
     */
    newMessages?: InjectedUserMessage[];
    /**
     * Structured content blocks from tool execution.
     * Contains rich content like text, images, audio, and resources in their native format.
     * Can be populated by any tool (MCP tools, bash, etc.) that returns structured content.
     */
    contents?: ContentBlock[];
    /**
     * Tool references returned by a tool search tool.
     * When set, the tool result message content will be an array of
     * `{ type: "tool_reference", tool_name: "..." }` objects instead of plain text.
     * This tells the model which deferred tools are now available for use.
     */
    toolReferences?: string[];
    /**
     * Information about a skill invocation. Set by the skill tool when a skill is
     * successfully loaded. The session uses this to emit a skill.invoked event
     * for tracking skills across compaction.
     * @internal
     */
    skillInvocation?: {
        /** The skill name */
        name: string;
        /** Path to the SKILL.md file */
        path: string;
        /** The full content of the skill file */
        content: string;
        /** Tools that should be auto-approved when this skill is active */
        allowedTools?: string[];
        /** Name of the plugin this skill came from (only set when source is "plugin") */
        pluginName?: string;
        /** Version of the plugin this skill came from (only set when source is "plugin") */
        pluginVersion?: string;
    };
};

/**
 * Hydro event types for CLI telemetry.
 * These types map to the Hydro schemas defined in github/hydro-schemas
 * under proto/hydro/schemas/copilot_cli/v0/
 *
 * See:
 * - model_call.proto
 * - tool_call.proto
 * - telemetry.proto
 * - restricted_telemetry.proto
 * - (restricted_model_call.proto — removed: traces too large for hydro)
 * - restricted_tool_call.proto
 * - entities/client_info.proto
 * - entities/tool_result_type.proto
 * - entities/model_choice.proto
 * - entities/model_choice_tool_call.proto
 */
/**
 * Tool execution result type.
 * Maps to: copilot_cli.v0.entities.ToolResultType
 */
declare type ToolResultType = "UNKNOWN_RESULT" | "SUCCESS" | "FAILURE";

/**
 * A callback to be called when the tool is shutting down. Gives the tool
 * a chance to clean things up, and return a telemetry event (if desired) which
 * will be emitted by the agent.
 */
declare type ToolShutdown = () => Promise<TelemetryEvent_2 | void>;

export declare type ToolUserRequestedEvent = z.infer<typeof ToolUserRequestedEventSchema>;

/**
 * Tool user requested event
 */
declare const ToolUserRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"tool.user_requested">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    }, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    id: string;
    type: "tool.user_requested";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    id: string;
    type: "tool.user_requested";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

/**
 * Converts full Tool objects to lightweight ToolMetadata.
 * Strips non-serializable callback properties (callback, shutdown, summariseIntention).
 */
export declare function toToolMetadata(tools: Tool_2[]): ToolMetadata[];

/**
 * TrafficFilter represents a single traffic filter with a parameter name and value.
 */
declare interface TrafficFilter {
    param: TrafficFilterParam;
    value: string;
}

/**
 * TrafficFilterParam represents the parameter names pre-registered with ExP for use
 * as traffic filters. Derived automatically from TrafficFilterParams.
 */
declare type TrafficFilterParam = (typeof TrafficFilterParams)[keyof typeof TrafficFilterParams];

/**
 * Traffic filter parameter names for the x-exp-parameters header.
 */
declare const TrafficFilterParams: {
    /** Parameter for Copilot Tracking ID */
    readonly CopilotTrackingID: "copilottrackingid";
    /** Parameter for Extension Name */
    readonly ExtensionName: "extensionname";
    /** Parameter for CLI Version filter */
    readonly CLIVersion: "github_copilotcli_cliversion";
    /** Parameter for audience filter (github, microsoft, or external) */
    readonly Audience: "github_copilotcli_audience";
    /** Parameter for Experimental mode filter */
    readonly Experimental: "github_copilotcli_experimentationoptin";
    /** Parameter for Prerelease filter */
    readonly Prerelease: "github_copilotcli_prerelease";
    /** Parameter for first launch timestamp filter (Unix timestamp in seconds) */
    readonly FirstLaunchAt: "github_copilotcli_firstlaunchat";
    /** Parameter for copilot plan filter */
    readonly CopilotPlan: "github_copilotcli_copilotplan";
};

declare interface TransportFactory {
    createTransport(transportOptions: TransportOptions): StdioClientTransport | StreamableHTTPClientTransport | SSEClientTransport | InMemoryClientTransport;
}

declare type TransportOptions = StdioTransportConfig | HTTPTransportConfig | SSETransportConfig | InMemoryTransportConfig;

declare type TruncationEvent = {
    kind: "history_truncated";
    turn: number;
    performedBy: string;
    truncateResult: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
    };
};

declare type TurnEvent = {
    kind: "turn_started" | "turn_ended" | "turn_failed" | "turn_retry";
    model: string;
    modelInfo: object;
    turn: number;
    timestampMs: number;
    error?: string;
    /** Why this retry is happening (e.g., "streaming_error", "rate_limit"). */
    reason?: string;
};

export declare type UpdatableSessionOptions = Omit<SessionOptions, "sessionId" | "startTime" | "modifiedTime" | "summary">;

/**
 * A permission request for accessing URLs.
 */
declare type UrlPermissionRequest = {
    readonly kind: "url";
    /** The intention, e.g. "Fetch web content" */
    readonly intention: string;
    /** The URL being accessed */
    readonly url: string;
};

/**
 * Event emitted every turn to report current context window token usage.
 * Unlike TruncationEvent, this is always emitted regardless of whether truncation occurred.
 */
declare type UsageInfoEvent = {
    kind: "usage_info";
    turn: number;
    tokenLimit: number;
    currentTokens: number;
    messagesLength: number;
    /** Token count from system message(s) */
    systemTokens?: number;
    /** Token count from non-system messages (user, assistant, tool) */
    conversationTokens?: number;
    /** Token count from tool definitions */
    toolDefinitionsTokens?: number;
    /** Whether this is the first usage_info event emitted in this session */
    isInitial?: boolean;
};

/**
 * Aggregated usage metrics for a session
 */
export declare interface UsageMetrics {
    totalPremiumRequests: number;
    /** Raw count of user-initiated requests (not multiplied) */
    totalUserRequests: number;
    totalApiDurationMs: number;
    sessionStartTime: number;
    codeChanges: CodeChangeMetrics;
    modelMetrics: Map<string, ModelMetrics>;
    currentModel?: string;
    /** Input tokens from the most recent main-agent API call (not accumulated) */
    lastCallInputTokens: number;
    /** Output tokens from the most recent main-agent API call (not accumulated) */
    lastCallOutputTokens: number;
}

/**
 * UsageMetricsTracker maintains usage metrics state and processes session events.
 * This is the core logic used by both the Session class and React hooks.
 */
export declare class UsageMetricsTracker {
    private _metrics;
    private fileEditingToolCallIds;
    constructor(sessionStartTime: Date);
    /**
     * Get the current usage metrics.
     * Returns a shallow copy to prevent external mutation.
     */
    get metrics(): UsageMetrics;
    /**
     * Process a session event and update metrics accordingly.
     * Call this for each event emitted by the session.
     */
    processEvent(event: SessionEvent): void;
    private processUsageEvent;
    private processAssistantMessage;
    private processToolComplete;
    /**
     * Reconstruct metrics from a full array of events.
     * Used when initializing from an existing session (e.g., resume).
     */
    static fromEvents(events: readonly SessionEvent[], sessionStartTime: Date): UsageMetricsTracker;
}

/** Represents the user-based authentication information (OAuth). */
declare type UserAuthInfo = {
    readonly type: "user";
    readonly host: string;
    readonly login: string;
    readonly copilotUser?: CopilotUserResponse;
};

export declare type UserInputCompletedEvent = z.infer<typeof UserInputCompletedEventSchema>;

/**
 * Emitted when a pending user input request has been resolved by a client.
 * Other clients should dismiss any user input UI for this requestId.
 */
declare const UserInputCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"user_input.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "user_input.completed";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
    };
    id: string;
    ephemeral: true;
    type: "user_input.completed";
    timestamp: string;
    parentId: string | null;
}>;

declare type UserInputRequest = {
    question: string;
    choices?: string[];
    allowFreeform?: boolean;
    toolCallId?: string;
};

export declare type UserInputRequestedEvent = z.infer<typeof UserInputRequestedEventSchema>;

/**
 * Emitted when the session needs user input from a client (ask_user tool).
 * The client should respond via session.respondToUserInput(requestId, response).
 */
declare const UserInputRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"user_input.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        question: z.ZodString;
        choices: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        allowFreeform: z.ZodOptional<z.ZodBoolean>;
        toolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    }, {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "user_input.requested";
    timestamp: string;
    parentId: string | null;
}, {
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    id: string;
    ephemeral: true;
    type: "user_input.requested";
    timestamp: string;
    parentId: string | null;
}>;

declare type UserInputResponse = {
    answer: string;
    wasFreeform: boolean;
};

export declare type UserMessageEvent = z.infer<typeof UserMessageEventSchema>;

/**
 * An event that is emitted by the `Client` for each user message it adds to the middle of the conversation.
 */
declare type UserMessageEvent_2 = {
    kind: "message";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    message: ChatCompletionUserMessageParam;
    /**
     * The component which was the source of the user message.
     * - `jit-instruction`: The message was injected by something which adds automated instructions for the agent
     * - `command-{id}`: The message was injected as a result of a command with the given id
     * - `string`: Some other source
     */
    source?: string;
};

declare const UserMessageEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"user.message">;
    data: z.ZodObject<{
        content: z.ZodString;
        transformedContent: z.ZodOptional<z.ZodString>;
        attachments: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
            type: z.ZodLiteral<"file">;
            path: z.ZodString;
            displayName: z.ZodString;
            lineRange: z.ZodOptional<z.ZodObject<{
                start: z.ZodNumber;
                end: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                end: number;
                start: number;
            }, {
                end: number;
                start: number;
            }>>;
        }, "strip", z.ZodTypeAny, {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        }, {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"directory">;
            path: z.ZodString;
            displayName: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "directory";
            path: string;
            displayName: string;
        }, {
            type: "directory";
            path: string;
            displayName: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"selection">;
            filePath: z.ZodString;
            displayName: z.ZodString;
            text: z.ZodString;
            selection: z.ZodObject<{
                start: z.ZodObject<{
                    line: z.ZodNumber;
                    character: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    line: number;
                    character: number;
                }, {
                    line: number;
                    character: number;
                }>;
                end: z.ZodObject<{
                    line: z.ZodNumber;
                    character: z.ZodNumber;
                }, "strip", z.ZodTypeAny, {
                    line: number;
                    character: number;
                }, {
                    line: number;
                    character: number;
                }>;
            }, "strip", z.ZodTypeAny, {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            }, {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            }>;
        }, "strip", z.ZodTypeAny, {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        }, {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"github_reference">;
            number: z.ZodNumber;
            title: z.ZodString;
            referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
            state: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        }, {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"blob">;
            data: z.ZodString;
            mimeType: z.ZodString;
            displayName: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        }, {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        }>]>, "many">>;
        source: z.ZodOptional<z.ZodString>;
        /** The agent mode active when this message was sent */
        agentMode: z.ZodOptional<z.ZodEnum<["interactive", "plan", "autopilot", "shell"]>>;
        /** The CAPI interaction ID for this user message turn */
        interactionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    }, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    };
    id: string;
    type: "user.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            text: string;
            type: "selection";
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
        } | {
            number: number;
            url: string;
            type: "github_reference";
            title: string;
            referenceType: "pr" | "issue" | "discussion";
            state: string;
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "plan" | "autopilot" | undefined;
        interactionId?: string | undefined;
    };
    id: string;
    type: "user.message";
    timestamp: string;
    parentId: string | null;
    ephemeral?: boolean | undefined;
}>;

export declare type UserPromptSubmittedHook = (input: UserPromptSubmittedHookInput) => Promise<UserPromptSubmittedHookOutput | void>;

/**
 * User prompt submitted hook types
 */
export declare interface UserPromptSubmittedHookInput extends BaseHookInput {
    prompt: string;
}

export declare interface UserPromptSubmittedHookOutput {
    modifiedPrompt?: string;
    additionalContext?: string;
    suppressOutput?: boolean;
}

declare type WildcardEventHandler = (event: SessionEvent) => void | Promise<void>;

/** Valid wire API format values for BYOK configuration. */
declare const WIRE_APIS: readonly ["completions", "responses"];

declare type WireApi = (typeof WIRE_APIS)[number];

/**
 * Working directory context for session tracking
 */
declare interface WorkingDirectoryContext {
    /** Current working directory */
    cwd: string;
    /** Git repository root, if in a git repo */
    gitRoot?: string;
    /** Repository identifier string (e.g. "owner/repo" for GitHub, "org/project/repo" for Azure DevOps) */
    repository?: string;
    /** Hosting platform type (e.g. "github" or "ado") */
    hostType?: RepoHostType;
    /** Current git branch, if in a git repo */
    branch?: string;
    /** Current HEAD commit SHA */
    headCommit?: string;
    /** Merge-base commit SHA (fork point from the remote default branch) */
    baseCommit?: string;
}

declare type Workspace = z_2.infer<typeof WorkspaceSchema>;

/**
 * Log message prefix emitted when a session workspace is initialized.
 * This marker is used by `findSessionLogFiles` to identify which process log
 * files belong to a given session, so changes here must stay in sync.
 */
export declare const WORKSPACE_INITIALIZED_LOG_PREFIX = "Workspace initialized:";

/**
 * Working directory context for workspace creation/update
 */
declare interface WorkspaceContext {
    cwd?: string;
    gitRoot?: string;
    repository?: string;
    hostType?: "github" | "ado";
    branch?: string;
}

/**
 * Information about the current workspace for context injection into prompts.
 */
declare interface WorkspaceContextInfo {
    /** Name of the workspace (for display) */
    name?: string;
    /** Path to the workspace directory */
    workspacePath: string;
    /** Number of prior session summaries */
    summaryCount: number;
    /** Whether a plan.md file exists */
    hasPlan: boolean;
    /** List of files in the files/ directory (if any) */
    filesInWorkspace?: string[];
    /** List of checkpoints with their titles */
    checkpoints?: CheckpointInfo[];
}

/**
 * Schema for workspace metadata.
 * Stored at: ~/.copilot/session-state/{session-id}/workspace.yaml
 */
declare const WorkspaceSchema: z_2.ZodObject<{
    id: z_2.ZodString;
    cwd: z_2.ZodOptional<z_2.ZodString>;
    git_root: z_2.ZodOptional<z_2.ZodString>;
    repository: z_2.ZodOptional<z_2.ZodString>;
    host_type: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
    branch: z_2.ZodOptional<z_2.ZodString>;
    summary: z_2.ZodOptional<z_2.ZodString>;
    name: z_2.ZodOptional<z_2.ZodString>;
    summary_count: z_2.ZodDefault<z_2.ZodNumber>;
    created_at: z_2.ZodOptional<z_2.ZodString>;
    updated_at: z_2.ZodOptional<z_2.ZodString>;
    mc_task_id: z_2.ZodOptional<z_2.ZodString>;
    mc_session_id: z_2.ZodOptional<z_2.ZodString>;
    mc_last_event_id: z_2.ZodOptional<z_2.ZodString>;
}, "strip", z_2.ZodTypeAny, {
    id: string;
    summary_count: number;
    name?: string | undefined;
    branch?: string | undefined;
    summary?: string | undefined;
    cwd?: string | undefined;
    repository?: string | undefined;
    created_at?: string | undefined;
    git_root?: string | undefined;
    host_type?: "github" | "ado" | undefined;
    updated_at?: string | undefined;
    mc_task_id?: string | undefined;
    mc_session_id?: string | undefined;
    mc_last_event_id?: string | undefined;
}, {
    id: string;
    name?: string | undefined;
    branch?: string | undefined;
    summary?: string | undefined;
    cwd?: string | undefined;
    repository?: string | undefined;
    created_at?: string | undefined;
    git_root?: string | undefined;
    host_type?: "github" | "ado" | undefined;
    summary_count?: number | undefined;
    updated_at?: string | undefined;
    mc_task_id?: string | undefined;
    mc_session_id?: string | undefined;
    mc_last_event_id?: string | undefined;
}>;

/**
 * A permission request for writing to new or existing files.
 */
declare type WritePermissionRequest = {
    readonly kind: "write";
    /** The intention of the edit operation, e.g. "Edit file" or "Create file" */
    readonly intention: string;
    /** The name of the file being edited */
    readonly fileName: string;
    /** The diff of the changes being made */
    readonly diff: string;
    /** The new file contents (for IDE diff view) */
    readonly newFileContents?: string;
};

export { }
