import type { ChatCompletionAssistantMessageParam } from 'openai/resources/chat/completions';
import { ChatCompletionChunk } from 'openai/resources';
import type { ChatCompletionMessage } from 'openai/resources/chat/completions';
import { 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 { CreateMessageRequestParams } from '@modelcontextprotocol/sdk/types.js';
import { CreateMessageResultWithTools } from '@modelcontextprotocol/sdk/types.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 as ReasoningEffort_2 } from 'openai/resources';
import type { Responses } 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 { ZodDefault } from 'zod';
import { ZodDiscriminatedUnion } from 'zod';
import { ZodEnum } from 'zod';
import { ZodLiteral } from 'zod';
import { ZodNativeEnum } 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;
    };
    type: "abort";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        reason: string;
    };
    type: "abort";
    id: string;
    parentId: string | null;
    timestamp: string;
    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"]>;

/**
 * Lightweight progress information for a running background agent.
 * Stored on the registry entry so tools can read current progress directly.
 */
declare interface AgentProgressInfo {
    /** The most recent intent reported by the agent via report_intent */
    latestIntent?: string;
    /** Number of tool calls the agent has completed since the agent was started */
    toolCallsCompleted: number;
    /** The resolved model name used by the agent at runtime */
    resolvedModel?: string;
    /** Accumulated input token count across all model calls */
    totalInputTokens: number;
    /** Accumulated output token count across all model calls */
    totalOutputTokens: number;
}

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[];
    /** Lightweight progress information for the current run */
    progress?: AgentProgressInfo;
    /** Number of in-flight read_agent(wait: true) calls claiming this completion */
    completionClaimCount?: number;
}

/**
 * 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;
}

export declare function aggregateFailureContexts(contexts: string[]): string;

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;
    visibility?: ApiVisibility;
};

/** 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";

declare type ApiVisibility = "public" | "internal";

export declare function appendPostToolUseFailureContext(baseContent: string, failureHookContext: string | undefined, toolName?: string): string;

/** Options for experimentation staff status overrides */
declare interface AppInsightsTelemetryOptions {
    /** Whether the config file has `staff: true` */
    configStaff?: boolean;
    /** Whether streamer mode is active (suppresses staff for experiments) */
    streamerMode?: boolean;
}

declare class AppInsightsTelemetryService extends TelemetryService {
    readonly authManager: AuthManager;
    private readonly authCallback;
    private readonly pendingEvents;
    private readonly pendingRestrictedEvents;
    private readonly clientName;
    private readonly clientType;
    private readonly devDeviceId?;
    private clientInfo;
    private readonly configStaff;
    private readonly streamerMode;
    private queue?;
    private restrictedQueue?;
    private copilotUser?;
    private endpointUrl?;
    private featureFlagService?;
    /** When true, events are silently dropped rather than buffered. Set on
     *  explicit logout so post-logout events aren't deferred to a future login. */
    private loggedOut;
    constructor(authManager: AuthManager, clientName: string, clientType: string, featureFlagService?: IFeatureFlagService, options?: AppInsightsTelemetryOptions, devDeviceId?: string);
    /** Check if user is staff based on organization membership from the API */
    private isStaff;
    /**
     * Check if user should be treated as staff for experimentation purposes.
     * Combines API org check with config flag, but suppressed in streamer mode.
     */
    private isStaffForExperimentation;
    private hasRestrictedTelemetryOptedOut;
    private isRestrictedTelemetryPlanEligible;
    /** Check if restricted telemetry should be sent for eligible users who have not opted out. */
    shouldSendRestrictedTelemetry(): boolean;
    private sendTelemetryEventInternal;
    sendTelemetryEvent(eventName: string, properties?: TelemetryProperties, measurements?: TelemetryMeasurements, tags?: TelemetryTags): void;
    sendHydroEvent(event: HydroEvent, options?: {
        clientName?: string;
    }): void;
    dispose(): Promise<void>;
    private updateCopilotUser;
    /** Creates new telemetry queues with the given endpoint URL and drains pending events. */
    private updateQueues;
    private getTags;
    private getCommonProperties;
    private buildClientInfo;
}

/**
 * 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;
    };
    type: "assistant.intent";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        intent: string;
    };
    type: "assistant.intent";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "assistant.message_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    type: "assistant.message_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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>;
            /** Name of the MCP server hosting this tool */
            mcpServerName: 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;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            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>;
        requestId: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        messageId: string;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        content: string;
        messageId: string;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            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;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "assistant.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        messageId: string;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "assistant.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "assistant.reasoning_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    type: "assistant.reasoning_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "assistant.reasoning";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        reasoningId: string;
    };
    type: "assistant.reasoning";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "assistant.streaming_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        totalResponseSizeBytes: number;
    };
    type: "assistant.streaming_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "assistant.turn_end";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
    };
    type: "assistant.turn_end";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "assistant.turn_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    type: "assistant.turn_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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>;
        reasoningTokens: z.ZodOptional<z.ZodNumber>;
        cost: z.ZodOptional<z.ZodNumber>;
        duration: z.ZodOptional<z.ZodNumber>;
        ttftMs: z.ZodOptional<z.ZodNumber>;
        interTokenLatencyMs: 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, {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }, {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }>, "many">;
            totalNanoAiu: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }, {
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }>>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }, {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    type: "assistant.usage";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    type: "assistant.usage";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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";
    filePath: string;
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
}, {
    text: string;
    type: "selection";
    filePath: string;
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
}>, 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;
    type: "github_reference";
    url: string;
    state: string;
    title: string;
    referenceType: "pr" | "issue" | "discussion";
}, {
    number: number;
    type: "github_reference";
    url: string;
    state: string;
    title: string;
    referenceType: "pr" | "issue" | "discussion";
}>, 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;
    private _lastAuthErrors;
    constructor(featureFlags?: FeatureFlags, config?: AuthManagerConfig);
    /**
     * Returns errors encountered during the most recent auth resolution attempt.
     * When non-empty, indicates tokens were found but could not be validated
     * (e.g., due to network failures or API errors). Useful for surfacing
     * the real cause of auth failure to the user instead of a generic
     * "no authentication found" message.
     */
    get lastAuthErrors(): readonly string[];
    /**
     * Register a callback to be called when authentication state changes.
     * The callback is invoked immediately only when auth has already settled.
     * If auth has not settled yet, the callback waits for a later auth change
     * notification.
     * @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;
    /**
     * Wraps fetchCopilotUser with error handling that logs and returns undefined on failure.
     * @param host The host URL.
     * @param token The auth token.
     * @param userDescription Optional context for the error message (e.g., "user@host").
     */
    private safeFetchCopilotUser;
    private logFetchCopilotUserError;
    /**
     * 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, waiting for the initial load if needed.
     * Runs the whole authentication flow if no auth has been found yet, and no other load is in progress.
     * @returns Current auth info.
     */
    getCurrentAuthInfo(): Promise<AuthInfo | null>;
    /**
     * Re-fetches the Copilot user info for the current auth and notifies callbacks.
     * Useful after actions that change the user's subscription status.
     * @returns Updated auth info, or null if no auth is available.
     */
    refreshCopilotUser(): 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;
}

/**
 * Extended model type that includes reasoning effort metadata.
 * Returned by {@link getAvailableModels} for VS Code extension consumption.
 */
export declare type AvailableModel = Model & {
    capabilities: Model["capabilities"] & {
        supports: Model["capabilities"]["supports"] & {
            reasoningEffort?: boolean;
        };
    };
    supportedReasoningEfforts?: ReasoningEffortLevel[];
    defaultReasoningEffort?: ReasoningEffortLevel;
};

/**
 * Simplified model info for tools that need to validate/display available models.
 */
declare type AvailableModelInfo = {
    /** Model identifier (e.g., "claude-sonnet-4.5") */
    id: string;
    /** Human-readable label (e.g., "Claude Sonnet 4.5") */
    label: string;
    /** Brief description of the model's characteristics */
    description?: string;
    /** Cost multiplier for the model (e.g., 0 for free, 1 for standard, 3 for premium) */
    multiplier?: number;
};

/**
 * 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;
}>;

/**
 * Converts CAPI model list to simplified AvailableModelInfo format for tools.
 * Filters to only supported models that are available and not blocked by policy.
 * @internal Exported for testing only.
 */
export declare function buildAvailableModelInfo(modelList: Model[], featureFlagService?: IFeatureFlagService): Promise<AvailableModelInfo[]>;

/**
 * Builds the `providerAndModel` string for BYOM (custom provider) sessions,
 * encoding `reasoningEffort` when set so that `splitAgentModelSetting` can
 * parse it into `clientOptions.defaultReasoningEffort`.
 */
export declare function buildByomProviderAndModel(model: string, reasoningEffort: string | undefined): string;

export declare type CapabilitiesChangedEvent = z.infer<typeof CapabilitiesChangedEventSchema>;

/**
 * Emitted when the session's advertised capabilities change (e.g., a client
 * joins with `requestElicitation: true`, adding elicitation support).
 * Subscribers should update their cached capabilities.
 */
declare const CapabilitiesChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"capabilities.changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        ui: z.ZodOptional<z.ZodObject<{
            elicitation: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            elicitation?: boolean | undefined;
        }, {
            elicitation?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    }, {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    };
    type: "capabilities.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    };
    type: "capabilities.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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, sampling, 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;
}

/** Clears the cached model list so the next retrieval hits the server. */
export declare function clearCachedModels(): void;

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?: string;
    /**
     * Explicit override for requesting reasoning summaries.
     * When omitted, the client falls back to its default or feature-flag-controlled behavior.
     */
    enableReasoningSummaries?: boolean;
    /**
     * Responses API text shaping options to send for models using the Responses API.
     */
    responsesTextConfig?: Responses.ResponseTextConfig;
    /**
     * 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;
    /**
     * Feature flag service for accessing ExP assignment context.
     * When set, the CAPI client includes the latest assignment context as an
     * `X-Copilot-Client-Exp-Assignment-Context` header on every request (synchronously, never blocks).
     */
    featureFlagService?: IFeatureFlagService;
    /** SDK-supplied overrides for model capabilities, deep-merged over runtime defaults. */
    modelCapabilitiesOverride?: ModelCapabilitiesOverride;
};

/**
 * 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;
    };
    type: "command.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "command.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

export declare type CommandExecuteEvent = z.infer<typeof CommandExecuteEventSchema>;

/**
 * Emitted when a registered command needs to be dispatched to its owning SDK client.
 * The server intercepts this event and routes it to the connection that registered the command.
 */
declare const CommandExecuteEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"command.execute">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        command: z.ZodString;
        commandName: z.ZodString;
        args: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    }, {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    };
    type: "command.execute";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    };
    type: "command.execute";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/** Result type for external command execution (SDK-registered commands). */
declare type CommandExecutionResult = {
    error?: string;
};

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, {
        command: string;
        requestId: string;
    }, {
        command: string;
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        command: string;
        requestId: string;
    };
    type: "command.queued";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        command: string;
        requestId: string;
    };
    type: "command.queued";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    /** Post-compaction context window usage, matching the shape of `session.usage_info` event data. */
    contextWindow?: {
        /** Maximum token count for the model's context window. */
        tokenLimit: number;
        /** Current total tokens in the context window (system + conversation + tool definitions). */
        currentTokens: number;
        /** Current number of messages in the conversation. */
        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;
    };
}

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";
    cwd?: string | undefined;
    exitCode?: number | undefined;
}, {
    text: string;
    type: "terminal";
    cwd?: string | undefined;
    exitCode?: number | 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;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }, {
        src: string;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | 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, {
    type: "resource_link";
    name: string;
    uri: string;
    size?: number | undefined;
    mimeType?: string | undefined;
    description?: string | undefined;
    icons?: {
        src: string;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    title?: string | undefined;
}, {
    type: "resource_link";
    name: string;
    uri: string;
    size?: number | undefined;
    mimeType?: string | undefined;
    description?: string | undefined;
    icons?: {
        src: string;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    title?: string | 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, {
        uri: string;
        blob: string;
        mimeType?: string | undefined;
    }, {
        uri: string;
        blob: string;
        mimeType?: string | undefined;
    }>]>;
}, "strip", z.ZodTypeAny, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        uri: string;
        blob: string;
        mimeType?: string | undefined;
    };
}, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        uri: string;
        blob: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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, {
            type: string;
            name: string;
        }, {
            type: string;
            name: 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;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
        telemetry?: string | undefined;
    }, {
        api?: string | undefined;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
        telemetry?: 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, {
        login?: string | null | undefined;
        name?: string | null | undefined;
    }, {
        login?: string | null | undefined;
        name?: 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, {
        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;
        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;
        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;
    }, {
        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;
        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;
        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>;
    limited_user_quotas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
    limited_user_reset_date: z.ZodOptional<z.ZodString>;
    monthly_quotas: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
}, "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;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
        telemetry?: string | undefined;
    } | undefined;
    organization_login_list?: string[] | undefined;
    organization_list?: ({
        login?: string | null | undefined;
        name?: string | null | undefined;
    } | null)[] | null | undefined;
    codex_agent_enabled?: boolean | undefined;
    is_mcp_enabled?: boolean | null | undefined;
    quota_reset_date?: string | undefined;
    quota_snapshots?: {
        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;
        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;
        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;
    limited_user_quotas?: Record<string, number> | undefined;
    limited_user_reset_date?: string | undefined;
    monthly_quotas?: Record<string, number> | 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;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
        telemetry?: string | undefined;
    } | undefined;
    organization_login_list?: string[] | undefined;
    organization_list?: ({
        login?: string | null | undefined;
        name?: string | null | undefined;
    } | null)[] | null | undefined;
    codex_agent_enabled?: boolean | undefined;
    is_mcp_enabled?: boolean | null | undefined;
    quota_reset_date?: string | undefined;
    quota_snapshots?: {
        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;
        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;
        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;
    limited_user_quotas?: Record<string, number> | undefined;
    limited_user_reset_date?: string | undefined;
    monthly_quotas?: Record<string, number> | undefined;
}>;

export declare interface CoreServices {
    telemetryService: TelemetryService;
    featureFlagService: IFeatureFlagService;
}

declare type CoreServicesInput = {
    telemetryService: TelemetryService;
    featureFlagService: IFeatureFlagService;
};

/**
 * Counts the total number of hooks in a QueryHooks object.
 */
export declare function countHooks(hooks: QueryHooks | undefined): number;

export declare function createCoreServices({ telemetryService, featureFlagService }: CoreServicesInput): CoreServices;

/**
 * Create an empty metrics object.
 */
export declare function createEmptyMetrics(sessionStartTime?: number): UsageMetrics;

/**
 * Factory for creating a LocalFeatureFlagService.
 * Convenience wrapper for `new LocalFeatureFlagService(options)`.
 */
export declare function createLocalFeatureFlagService(options?: Partial<FeatureFlagInitOptions>): LocalFeatureFlagService;

/**
 * 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;
};

/** Like {@link DeepPartial} but correctly recurses into `T | undefined` union properties. */
declare type DeepOptional<T> = {
    [P in keyof T]?: NonNullable<T[P]> extends (infer U)[] ? U[] : NonNullable<T[P]> extends object ? DeepOptional<NonNullable<T[P]>> : T[P];
};

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<{
    mouse: z.ZodOptional<z.ZodBoolean>;
    askUser: z.ZodOptional<z.ZodBoolean>;
    autoUpdate: z.ZodOptional<z.ZodBoolean>;
    bashEnv: z.ZodOptional<z.ZodBoolean>;
    powershellFlags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    autoUpdatesChannel: z.ZodOptional<z.ZodEnum<["stable", "prerelease"]>>;
    banner: z.ZodOptional<z.ZodEnum<["always", "once", "never"]>>;
    beep: z.ZodOptional<z.ZodBoolean>;
    includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
    compactPaste: z.ZodOptional<z.ZodBoolean>;
    copyOnSelect: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    model: z.ZodOptional<z.ZodString>;
    effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    renderMarkdown: z.ZodOptional<z.ZodBoolean>;
    statusLine: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        command: string;
        type: "command";
        padding?: number | undefined;
    }, {
        command: string;
        type: "command";
        padding?: number | undefined;
    }>>;
    screenReader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodString>;
    colorMode: 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">>;
    storeTokenPlaintext: z.ZodOptional<z.ZodBoolean>;
    stream: z.ZodOptional<z.ZodBoolean>;
    streamerMode: z.ZodOptional<z.ZodBoolean>;
    footer: z.ZodOptional<z.ZodObject<{
        show_model_effort: z.ZodOptional<z.ZodBoolean>;
        show_directory: z.ZodOptional<z.ZodBoolean>;
        show_branch: z.ZodOptional<z.ZodBoolean>;
        show_context_window: z.ZodOptional<z.ZodBoolean>;
        show_quota: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        show_model_effort?: boolean | undefined;
        show_directory?: boolean | undefined;
        show_branch?: boolean | undefined;
        show_context_window?: boolean | undefined;
        show_quota?: boolean | undefined;
    }, {
        show_model_effort?: boolean | undefined;
        show_directory?: boolean | undefined;
        show_branch?: boolean | undefined;
        show_context_window?: boolean | undefined;
        show_quota?: boolean | undefined;
    }>>;
    updateTerminalTitle: 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">>;
    /** Boolean lookup for enabling/disabling individual feature flags (preferred). */
    enabledFeatureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    /** @deprecated Legacy format — use `enabledFeatureFlags` instead. */
    feature_flags: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        enabled?: string[] | undefined;
    }, {
        enabled?: string[] | undefined;
    }>>;
    skillDirectories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabledMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    enabledMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    sandbox: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodBoolean>;
        filesystem: z.ZodOptional<z.ZodObject<{
            readwritePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            readonlyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            deniedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            clearPolicyOnExit: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        }, {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        }>>;
        network: z.ZodOptional<z.ZodObject<{
            allowOutbound: z.ZodOptional<z.ZodBoolean>;
            allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        }, {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        enabled?: boolean | undefined;
        filesystem?: {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        } | undefined;
        network?: {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        } | undefined;
    }, {
        enabled?: boolean | undefined;
        filesystem?: {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        } | undefined;
        network?: {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        } | undefined;
    }>>;
    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>>;
    extraKnownMarketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodObject<{
            source: z.ZodLiteral<"directory">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            source: "directory";
        }, {
            path: string;
            source: "directory";
        }>, 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, {
            source: "github";
            repo: string;
            ref?: string | undefined;
        }, {
            source: "github";
            repo: string;
            ref?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: {
            path: string;
            source: "directory";
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            source: "github";
            repo: string;
            ref?: string | undefined;
        };
    }, {
        source: {
            path: string;
            source: "directory";
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            source: "github";
            repo: string;
            ref?: string | undefined;
        };
    }>>>;
    copilot_url: z.ZodOptional<z.ZodString>;
    show_reasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    remoteSessions: z.ZodOptional<z.ZodBoolean>;
    staff: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    logLevel: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
    mouse: z.ZodOptional<z.ZodBoolean>;
    askUser: z.ZodOptional<z.ZodBoolean>;
    autoUpdate: z.ZodOptional<z.ZodBoolean>;
    bashEnv: z.ZodOptional<z.ZodBoolean>;
    powershellFlags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    autoUpdatesChannel: z.ZodOptional<z.ZodEnum<["stable", "prerelease"]>>;
    banner: z.ZodOptional<z.ZodEnum<["always", "once", "never"]>>;
    beep: z.ZodOptional<z.ZodBoolean>;
    includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
    compactPaste: z.ZodOptional<z.ZodBoolean>;
    copyOnSelect: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    model: z.ZodOptional<z.ZodString>;
    effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    renderMarkdown: z.ZodOptional<z.ZodBoolean>;
    statusLine: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        command: string;
        type: "command";
        padding?: number | undefined;
    }, {
        command: string;
        type: "command";
        padding?: number | undefined;
    }>>;
    screenReader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodString>;
    colorMode: 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">>;
    storeTokenPlaintext: z.ZodOptional<z.ZodBoolean>;
    stream: z.ZodOptional<z.ZodBoolean>;
    streamerMode: z.ZodOptional<z.ZodBoolean>;
    footer: z.ZodOptional<z.ZodObject<{
        show_model_effort: z.ZodOptional<z.ZodBoolean>;
        show_directory: z.ZodOptional<z.ZodBoolean>;
        show_branch: z.ZodOptional<z.ZodBoolean>;
        show_context_window: z.ZodOptional<z.ZodBoolean>;
        show_quota: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        show_model_effort?: boolean | undefined;
        show_directory?: boolean | undefined;
        show_branch?: boolean | undefined;
        show_context_window?: boolean | undefined;
        show_quota?: boolean | undefined;
    }, {
        show_model_effort?: boolean | undefined;
        show_directory?: boolean | undefined;
        show_branch?: boolean | undefined;
        show_context_window?: boolean | undefined;
        show_quota?: boolean | undefined;
    }>>;
    updateTerminalTitle: 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">>;
    /** Boolean lookup for enabling/disabling individual feature flags (preferred). */
    enabledFeatureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    /** @deprecated Legacy format — use `enabledFeatureFlags` instead. */
    feature_flags: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        enabled?: string[] | undefined;
    }, {
        enabled?: string[] | undefined;
    }>>;
    skillDirectories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabledMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    enabledMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    sandbox: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodBoolean>;
        filesystem: z.ZodOptional<z.ZodObject<{
            readwritePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            readonlyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            deniedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            clearPolicyOnExit: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        }, {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        }>>;
        network: z.ZodOptional<z.ZodObject<{
            allowOutbound: z.ZodOptional<z.ZodBoolean>;
            allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        }, {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        enabled?: boolean | undefined;
        filesystem?: {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        } | undefined;
        network?: {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        } | undefined;
    }, {
        enabled?: boolean | undefined;
        filesystem?: {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        } | undefined;
        network?: {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        } | undefined;
    }>>;
    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>>;
    extraKnownMarketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodObject<{
            source: z.ZodLiteral<"directory">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            source: "directory";
        }, {
            path: string;
            source: "directory";
        }>, 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, {
            source: "github";
            repo: string;
            ref?: string | undefined;
        }, {
            source: "github";
            repo: string;
            ref?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: {
            path: string;
            source: "directory";
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            source: "github";
            repo: string;
            ref?: string | undefined;
        };
    }, {
        source: {
            path: string;
            source: "directory";
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            source: "github";
            repo: string;
            ref?: string | undefined;
        };
    }>>>;
    copilot_url: z.ZodOptional<z.ZodString>;
    show_reasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    remoteSessions: z.ZodOptional<z.ZodBoolean>;
    staff: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    logLevel: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
    mouse: z.ZodOptional<z.ZodBoolean>;
    askUser: z.ZodOptional<z.ZodBoolean>;
    autoUpdate: z.ZodOptional<z.ZodBoolean>;
    bashEnv: z.ZodOptional<z.ZodBoolean>;
    powershellFlags: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    autoUpdatesChannel: z.ZodOptional<z.ZodEnum<["stable", "prerelease"]>>;
    banner: z.ZodOptional<z.ZodEnum<["always", "once", "never"]>>;
    beep: z.ZodOptional<z.ZodBoolean>;
    includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
    compactPaste: z.ZodOptional<z.ZodBoolean>;
    copyOnSelect: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    model: z.ZodOptional<z.ZodString>;
    effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    renderMarkdown: z.ZodOptional<z.ZodBoolean>;
    statusLine: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        command: string;
        type: "command";
        padding?: number | undefined;
    }, {
        command: string;
        type: "command";
        padding?: number | undefined;
    }>>;
    screenReader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodString>;
    colorMode: 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">>;
    storeTokenPlaintext: z.ZodOptional<z.ZodBoolean>;
    stream: z.ZodOptional<z.ZodBoolean>;
    streamerMode: z.ZodOptional<z.ZodBoolean>;
    footer: z.ZodOptional<z.ZodObject<{
        show_model_effort: z.ZodOptional<z.ZodBoolean>;
        show_directory: z.ZodOptional<z.ZodBoolean>;
        show_branch: z.ZodOptional<z.ZodBoolean>;
        show_context_window: z.ZodOptional<z.ZodBoolean>;
        show_quota: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        show_model_effort?: boolean | undefined;
        show_directory?: boolean | undefined;
        show_branch?: boolean | undefined;
        show_context_window?: boolean | undefined;
        show_quota?: boolean | undefined;
    }, {
        show_model_effort?: boolean | undefined;
        show_directory?: boolean | undefined;
        show_branch?: boolean | undefined;
        show_context_window?: boolean | undefined;
        show_quota?: boolean | undefined;
    }>>;
    updateTerminalTitle: 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">>;
    /** Boolean lookup for enabling/disabling individual feature flags (preferred). */
    enabledFeatureFlags: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodBoolean>>;
    /** @deprecated Legacy format — use `enabledFeatureFlags` instead. */
    feature_flags: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        enabled?: string[] | undefined;
    }, {
        enabled?: string[] | undefined;
    }>>;
    skillDirectories: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabledSkills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    disabledMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    enabledMcpServers: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    sandbox: z.ZodOptional<z.ZodObject<{
        enabled: z.ZodOptional<z.ZodBoolean>;
        filesystem: z.ZodOptional<z.ZodObject<{
            readwritePaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            readonlyPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            deniedPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            clearPolicyOnExit: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        }, {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        }>>;
        network: z.ZodOptional<z.ZodObject<{
            allowOutbound: z.ZodOptional<z.ZodBoolean>;
            allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        }, {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        enabled?: boolean | undefined;
        filesystem?: {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        } | undefined;
        network?: {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        } | undefined;
    }, {
        enabled?: boolean | undefined;
        filesystem?: {
            readwritePaths?: string[] | undefined;
            readonlyPaths?: string[] | undefined;
            deniedPaths?: string[] | undefined;
            clearPolicyOnExit?: boolean | undefined;
        } | undefined;
        network?: {
            allowOutbound?: boolean | undefined;
            allowLocalNetwork?: boolean | undefined;
        } | undefined;
    }>>;
    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>>;
    extraKnownMarketplaces: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
        source: z.ZodUnion<[z.ZodObject<{
            source: z.ZodLiteral<"directory">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            source: "directory";
        }, {
            path: string;
            source: "directory";
        }>, 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, {
            source: "github";
            repo: string;
            ref?: string | undefined;
        }, {
            source: "github";
            repo: string;
            ref?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        source: {
            path: string;
            source: "directory";
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            source: "github";
            repo: string;
            ref?: string | undefined;
        };
    }, {
        source: {
            path: string;
            source: "directory";
        } | {
            url: string;
            source: "git";
            ref?: string | undefined;
        } | {
            source: "github";
            repo: string;
            ref?: string | undefined;
        };
    }>>>;
    copilot_url: z.ZodOptional<z.ZodString>;
    show_reasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, "many">>;
        postToolUseFailure: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        permissionRequest: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
        notification: 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>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "PreCompact"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }, "timeout" | "command">, {
            powershell?: string | undefined;
            timeout?: number | undefined;
            command?: string | undefined;
            type?: "command" | undefined;
            bash?: string | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "PreCompact" | undefined;
            matcher?: string | undefined;
        }>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    remoteSessions: z.ZodOptional<z.ZodBoolean>;
    staff: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    logLevel: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, z.ZodTypeAny, "passthrough">>;

/**
 * Default feature flags (non-staff, non-experimental).
 * Use this as a fallback when you don't have access to staff/experimental status.
 */
export declare const defaultFeatureFlags: FeatureFlags;

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",
    GPT_5_4_MINI_FOR_EXPLORE = "copilot_cli_gpt_5_4_mini_for_explore",
    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",
    ANTHROPIC_MESSAGES_API = "copilot_cli_anthropic_messages_api",
    DISABLE_REASONING_OUTPUT_GPT = "copilot_cli_disable_reasoning_output_gpt",
    /** When true, enables tool search with deferred loading for MCP and external tools */
    TOOL_SEARCH = "copilot_cli_tool_search",
    /** When true, enables MCP allowlist enforcement (checks servers against configured registries) */
    MCP_ALLOWLIST = "copilot_cli_mcp_allowlist",
    /** When true, enables the rubber-duck subagent for adversarial feedback */
    RUBBER_DUCK_AGENT = "copilot_cli_rubber_duck_agent",
    /**
     * Numeric parameter controlling the byte threshold for large output file offloading
     * Rev'd to _2 following discovery of race condition with auth and exp flag loading
     */
    LARGE_OUTPUT_THRESHOLD = "copilot_cli_large_output_threshold_2",
    /** When true, removes the parallel tool calling prompt from the CLI system prompt */
    REMOVE_PARALLEL_TOOL_PROMPT = "copilot_cli_remove_parallel_tool_prompt",
    /** When true, removes the directory listing from the system prompt to improve cache rates */
    REMOVE_CWD_LISTING = "copilot_cli_remove_cwd_listing"
}

/**
 * Generate a human-readable title for a system notification kind.
 * Used as the `title` field in notification hook payloads.
 */
export declare function describeSystemNotificationKind(kind: SystemNotificationKind): string;

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>;
}

declare interface DisposableTelemetrySender extends TelemetrySender {
    dispose(): void;
    setExtraFeatures(features: Record<string, string>): 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;
        action: z.ZodOptional<z.ZodEnum<["accept", "decline", "cancel"]>>;
        content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    }, {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    };
    type: "elicitation.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    };
    type: "elicitation.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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, {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        }, {
            type: "object";
            properties: Record<string, unknown>;
            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, {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        }, {
            type: "object";
            properties: Record<string, unknown>;
            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, {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        }, {
            type: "object";
            properties: Record<string, unknown>;
            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;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
        elicitationSource?: string | undefined;
    } & {
        [k: string]: unknown;
    };
    type: "elicitation.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
        elicitationSource?: string | undefined;
    } & {
        [k: string]: unknown;
    };
    type: "elicitation.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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, {
        uri: string;
        blob: string;
        mimeType?: string | undefined;
    }, {
        uri: string;
        blob: string;
        mimeType?: string | undefined;
    }>]>;
}, "strip", z.ZodTypeAny, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        uri: string;
        blob: string;
        mimeType?: string | undefined;
    };
}, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        uri: string;
        blob: 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"];

/**
 * Models that are explicitly excluded from the model picker regardless of
 * API enablement or policy status. These models will never be shown to users.
 */
export declare const EXCLUDED_MODELS: ReadonlySet<string>;

/**
 * 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;
        approved: z.ZodOptional<z.ZodBoolean>;
        selectedAction: z.ZodOptional<z.ZodString>;
        autoApproveEdits: z.ZodOptional<z.ZodBoolean>;
        feedback: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    }, {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    };
    type: "exit_plan_mode.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    };
    type: "exit_plan_mode.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    }, {
        requestId: string;
        summary: string;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        summary: string;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    };
    type: "exit_plan_mode.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        summary: string;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    };
    type: "exit_plan_mode.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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;
}

/**
 * Descriptions for experimental feature flags shown in the `/experimental` command help.
 * This is type-checked to ensure all experimental flags have descriptions.
 */
export declare const experimentalFeatureFlagDescriptions: ExperimentalFeatureFlags;

/**
 * Type that extracts only the experimental feature flags from FeatureFlagAvailabilityMap.
 * This ensures that all experimental flags must have descriptions defined.
 */
declare type ExperimentalFeatureFlags = {
    [K in keyof FeatureFlagAvailabilityMap as FeatureFlagAvailabilityMap[K] extends "experimental" | "staff-or-experimental" ? K : never]: string;
};

/**
 * Client defines the interface for interacting with the ExP API.
 */
declare interface ExperimentsClientInterface {
    getExperimentsResponse(randomizationUnit: TrafficFilter, trafficFilters: readonly TrafficFilter[], endpoint: string): Promise<GetExperimentsResponseResult>;
}

declare type ExperimentsFetchOutcome = "success" | "timeout" | "error" | "skipped";

/** 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 */
export declare interface ExpRetrievalResult {
    /** Whether the ExP context was successfully retrieved */
    success: boolean;
    /** How the ExP fetch attempt completed */
    fetchOutcome: ExperimentsFetchOutcome;
    /** 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 */
export 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;
    };
    type: "external_tool.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "external_tool.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "external_tool.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    type: "external_tool.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

export 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
 */
export 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
 */
export declare const featureFlagAvailability: Record<string, FeatureFlagAvailability>;

declare type FeatureFlagAvailabilityMap = typeof featureFlagAvailability;

/** Callback type for feature flag change listeners */
export declare type FeatureFlagChangeListener = (flags: FeatureFlags, expFlags: ExpFlags, expResponse: CopilotExpAssignmentResponse) => void;

/** Options for initializing feature flags */
export 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;
    /** Static overrides for feature flags (e.g. from RuntimeSettings.featureFlags or tests) */
    flagOverrides?: Partial<Record<FeatureFlag, boolean>>;
    /** Static overrides for ExP experiment flags (e.g. for tests without ExP infrastructure) */
    expFlagOverrides?: Partial<Record<ExpFlagKey, ExpFlagValue>>;
}

/** Resolved feature flags with boolean values for runtime use */
export 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();
 */
export declare class FeatureFlagService implements IFeatureFlagService {
    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;
    private latestSecondaryAssignmentContext;
    constructor(options: FeatureFlagInitOptions);
    /**
     * Creates a FeatureFlagService with a custom experiments client.
     * Use in tests to inject mock ExP responses.
     */
    static createForTest(mockClient: ExperimentsClientInterface, options: FeatureFlagInitOptions): FeatureFlagService;
    /**
     * 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 (sync, local-only).
     * Returns the statically-resolved value without consulting ExP.
     *
     * @param flag The feature flag name
     * @returns The boolean value of the flag
     */
    getLegacyFlag(flag: FeatureFlag): boolean;
    /**
     * Gets the value of a feature flag, checking ExP via the mapping table
     * then falling back to the local static value.
     *
     * @param flag The feature flag name
     * @returns The resolved boolean value
     */
    getFlag(flag: FeatureFlag): Promise<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>;
    /**
     * 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 the gpt-5.4-mini default model for explore subagents is enabled.
     * Awaits the ExP assignment for `copilot_cli_gpt_5_4_mini_for_explore`;
     * falls back to the `GPT_5_4_MINI_FOR_EXPLORE` feature flag when ExP has no assignment.
     */
    isGpt54MiniForExploreEnabled(): 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 the Anthropic Messages API (`/v1/messages`) is enabled for Anthropic models.
     * Awaits the ExP assignment for `copilot_cli_anthropic_messages_api`;
     * falls back to the `ANTHROPIC_MESSAGES_API` feature flag when ExP has no assignment.
     */
    isAnthropicMessagesApiEnabled(): Promise<boolean>;
    /**
     * Whether GPT reasoning output should be disabled by default.
     * Awaits the ExP assignment for `copilot_cli_disable_reasoning_output_gpt`;
     * falls back to the `DISABLE_REASONING_OUTPUT_GPT` feature flag when ExP has no assignment.
     */
    isDisableReasoningOutputGptEnabled(): 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>;
    /**
     * Whether the GPT default model experiment is enabled.
     * Awaits the ExP assignment for `copilot_cli_gpt_default_model`.
     */
    isGptDefaultModelEnabled(): Promise<boolean>;
    /**
     * Whether the Opus 1M default model experiment is enabled.
     * Awaits the ExP assignment for `copilot_cli_opus_1m_default_model`.
     */
    isOpus1mDefaultModelEnabled(): Promise<boolean>;
    /**
     * Returns the ExP-assigned large output threshold in bytes.
     * Awaits the ExP assignment for `copilot_cli_large_output_threshold_2`,
     * then falls back to the default when ExP has no assignment or the value
     * is invalid.
     */
    getLargeOutputThresholdBytes(): Promise<number>;
    /**
     * 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;
    getSecondaryAssignmentIfPresent(): string | undefined;
    captureSecondaryAssignmentContext(assignmentContext: string): void;
    /**
     * 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;
}

/**
 * Mapping from FeatureFlag names to their corresponding ExP flag keys.
 * Used by LocalFeatureFlagService to check COPILOT_EXP_* env overrides and
 * by the async getFlag() to look up ExP experiments for a given feature flag.
 */
export declare const featureFlagToExpFlag: Partial<Record<FeatureFlag, ExpFlagKey>>;

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<AvailableModel[]>;

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_2;
    /**
     * 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;
    /**
     * Session filesystem for session-scoped file I/O (e.g. large output handling).
     */
    sessionFs?: SessionFs;
};

/** 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[]>;

declare interface GetExperimentsResponseResult {
    response: CopilotExpAssignmentResponse;
    outcome: ExperimentsFetchOutcome;
    error?: string;
}

/**
 * Check for a COPILOT_EXP_<flag> env var override for the given ExP flag.
 * Env var names are upper-cased with hyphens replaced by underscores.
 * Returns undefined when no override is set.
 */
export declare function getExpFlagEnvOverride(flag: ExpFlagKey): ExpFlagValue | undefined;

export declare function getPostToolUseFailureError(toolResult: ToolResultExpanded): string;

/** 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;
    type: "github_reference";
    url: string;
    state: string;
    title: string;
    referenceType: "pr" | "issue" | "discussion";
}, {
    number: number;
    type: "github_reference";
    url: string;
    state: string;
    title: string;
    referenceType: "pr" | "issue" | "discussion";
}>;

/**
 * Git operations needed for remote→local session handoff.
 * Injected by CLI so that LocalSessionManager has no direct dependency on CLI git helpers.
 */
export declare interface HandoffGitOperations {
    getRepositoryInfo(cwd: string): Promise<{
        repository: string;
    }>;
    getUncommittedChangesCount(cwd: string): Promise<{
        staged: number;
        unstaged: number;
        untracked: number;
        hasChanges: boolean;
    }>;
    switchToBranch(branch: string, cwd: string): Promise<void>;
}

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";

/** Models visible in help text and CLI --model choices (excludes {@link HIDDEN_MODELS}) */
export declare const HELP_VISIBLE_MODELS: ("gpt-5-mini" | "gpt-4.1" | "claude-sonnet-4.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye")[];

/**
 * Models that are not publicly visible by default.
 *
 * **Visibility & Access Control:**
 * - Hidden models are excluded from help text and CLI `--model` choices (see {@link HELP_VISIBLE_MODELS})
 * - Hidden models appear in the `/model` picker ONLY for staff users (verified via CAPI org membership)
 * - Staff determination: Uses authInfo.copilotUser.organization_login_list (server-verified, cannot be spoofed)
 * - For non-staff users: Hidden models are completely filtered out in `categorizeModels` when isStaff=false
 *
 * **Use Cases:**
 * - Internal-only models (e.g. `claude-opus-4.6-1m` for internal testing)
 * - Pre-announcement models that should not be marketed publicly yet
 * - Models that need streamer mode name masking during screen sharing
 *
 * **Important for Maintainers:**
 * - If a hidden model is no longer restricted, remove it from this set
 * - If adding a new hidden model, ensure staff access is needed in `/model` command
 * - The visibility check in categorizeModels (line ~228) must remain in sync with this set
 * - See `categorizeModels` in modelResolver.ts for the actual filtering implementation
 */
export declare const HIDDEN_MODELS: ReadonlySet<SupportedModel>;

/** 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;
    };
    type: "hook.end";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    type: "hook.end";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "hook.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    type: "hook.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
}

/**
 * Read-only interface for consuming feature flags.
 *
 * Includes the convenience boolean methods and flag accessors that consumers
 * need.
 */
export declare interface IFeatureFlagService {
    /**
     * Gets the value of a specific feature flag (sync, local-only).
     * This returns the statically-resolved value without consulting ExP.
     */
    getLegacyFlag(flag: FeatureFlag): boolean;
    /**
     * Gets the value of a feature flag, checking ExP via the mapping table
     * then falling back to the local static value.
     */
    getFlag(flag: FeatureFlag): Promise<boolean>;
    /** Gets all feature flags (frozen copy). */
    getAllFlags(): FeatureFlags;
    /** Gets all ExP flags synchronously (may contain pending/stale data). */
    getAllExpFlagsSync(): ExpFlags;
    /** Gets the latest ExP response synchronously. */
    getLatestExpResponse(): CopilotExpAssignmentResponse;
    /** Gets the cached assignment context string for telemetry, if available. */
    getLatestAssignmentIfPresent(): string | undefined;
    /** Gets the CAPI assignment context string for telemetry, if available. */
    getSecondaryAssignmentIfPresent(): string | undefined;
    /** Stores a CAPI assignment context for telemetry. */
    captureSecondaryAssignmentContext(assignmentContext: string): void;
    /** Subscribes to feature flag changes. Returns an unsubscribe function. */
    subscribe(listener: FeatureFlagChangeListener): () => void;
    /** Returns a promise that resolves once the initial ExP fetch has completed. */
    waitForExpResponse(): Promise<void>;
    /** Gets a feature flag, preferring the ExP assignment and otherwise falling back to the static flag. */
    getFlagWithExpOverride(expFlag: ExpFlagKey, featureFlag: FeatureFlag): Promise<boolean>;
    /** Subscribes to an auth source for ExP assignment fetching. No-op when ExP is not available. */
    subscribeToAuth(auth: AuthSubscriber): void;
    /** Registers a callback for ExP retrieval telemetry. No-op when ExP is not available. */
    onExpRetrievalResult(callback: ExpRetrievalTelemetryCallback): void;
    /** Whether the GPT-5.4 sub-agent default model policy is enabled. */
    isGpt54ForSubagentsEnabled(): Promise<boolean>;
    /** Whether the gpt-5.4-mini default model for explore subagents is enabled. */
    isGpt54MiniForExploreEnabled(): Promise<boolean>;
    /** Whether embedding-based dynamic instruction retrieval is enabled. */
    isDynamicInstructionsRetrievalEnabled(): Promise<boolean>;
    /** Whether the opus medium effort default policy is enabled. */
    isOpusMediumEffortDefaultEnabled(): Promise<boolean>;
    /** Whether WebSocket transport for the Responses API is enabled. */
    isWebSocketResponsesEnabled(): Promise<boolean>;
    /** Whether the Anthropic Messages API (`/v1/messages`) is enabled for Anthropic models. */
    isAnthropicMessagesApiEnabled(): Promise<boolean>;
    /** Whether GPT reasoning output should be disabled by default. */
    isDisableReasoningOutputGptEnabled(): Promise<boolean>;
    /** Whether tool search with deferred loading is enabled. */
    isToolSearchEnabled(): Promise<boolean>;
    /** Whether the GPT default model experiment is enabled. */
    isGptDefaultModelEnabled(): Promise<boolean>;
    /** Whether the Opus 1M default model experiment is enabled. */
    isOpus1mDefaultModelEnabled(): Promise<boolean>;
    /**
     * Returns the ExP-assigned large output threshold in bytes.
     * Falls back to the default (20 KB) when ExP has no assignment or the value is invalid.
     */
    getLargeOutputThresholdBytes(): Promise<number>;
}

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"]>) => void | Promise<void> : M extends {
    result: z_2.ZodTypeAny;
} ? () => z_2.infer<M["result"]> | Promise<z_2.infer<M["result"]>> : () => void | Promise<void>;

/**
 * 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;
    private onReauthRequired?;
    /** 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);
    /** Register a callback invoked when a tool call detects the server needs re-authentication. */
    setOnReauthRequired(callback: (serverName: string) => void): void;
    /**
     * 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;
    /** Glob pattern from frontmatter — when set, this instruction applies only to matching files */
    applyTo?: string;
    /** Short description (body after frontmatter) for use in instruction tables */
    description?: string;
};

/** 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"
/** MCP sampling request executed on behalf of an MCP server */
| "conversation-sampling"
/** 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 {
        AppInsightsTelemetryService,
        NoopTelemetryService,
        SessionTelemetry,
        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;
            bearerToken: string;
            baseUrl: string;
        };
        openai: {
            baseUrl: string;
            apiKey: string;
            azureKeyVaultUri: string;
            azureSecretName: string;
            azure: {
                url: string;
                /** When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route. */
                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;
            /** CAPI session token — JWT for auto-mode session-based billing discount, sent as Copilot-Session-Token header. */
            capiSessionToken: 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,
             * or an async callback that lazily resolves the threshold (e.g. from ExP).
             * Default is 20KB.
             */
            maxSizeBytes?: number | (() => Promise<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 = {
    /** Maximum output size in bytes before output is written to a temp file. */
    maxOutputSizeBytes: number;
    /** Optional session filesystem for writing large output temp files. */
    sessionFs?: SessionFs;
};

/**
 * 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;
}

/**
 * Loads feature flags from the given config object.
 * This applies config-based overrides on top of already-resolved feature flags.
 *
 * @param config The configuration object to load feature flags from.
 * @param featureFlags The already-resolved feature flags to apply overrides to.
 *
 * @returns An object containing the updated feature flags.
 */
export declare function loadFeatureFlagsFromConfig(config: DefaultConfig, featureFlags: FeatureFlags): FeatureFlags;

/**
 * Loads feature flags from the environment variable COPILOT_CLI_ENABLED_FEATURE_FLAGS.
 * The variable should contain a comma-separated list of feature flag names.
 * Unknown feature flags are ignored.
 *
 * Loads feature flags from the environment based on their exact names, e.g.
 * if there were a feature flag named "EXPERIMENTAL_MODE", setting the environment
 * variable EXPERIMENTAL_MODE=true would enable that flag.
 *
 * @param featureFlags The feature flags to match against for updating.
 *
 * @returns An object containing the feature flags.
 */
export declare function loadFeatureFlagsFromEnv(featureFlags: FeatureFlags): FeatureFlags;

/**
 * Lightweight IFeatureFlagService implementation that resolves static flags
 * without ExP infrastructure. Suitable for the Actions runtime, SDK, and tests.
 *
 * Resolves flags from FeatureFlagInitOptions (staff/experimental/team → env vars → config → flagOverrides).
 * Checks COPILOT_EXP_* env var overrides for known ExP flags so operators can still
 * toggle experiments without the ExP service.
 */
export declare class LocalFeatureFlagService implements IFeatureFlagService {
    private readonly flags;
    private readonly expFlagOverrides;
    private latestSecondaryAssignmentContext;
    constructor(options?: Partial<FeatureFlagInitOptions>);
    /** Resolve an ExP flag value: expFlagOverrides → env override → undefined */
    private resolveExpFlag;
    getLegacyFlag(flag: FeatureFlag): boolean;
    getFlag(flag: FeatureFlag): Promise<boolean>;
    getAllFlags(): FeatureFlags;
    getAllExpFlagsSync(): ExpFlags;
    getLatestExpResponse(): CopilotExpAssignmentResponse;
    getLatestAssignmentIfPresent(): string | undefined;
    getSecondaryAssignmentIfPresent(): string | undefined;
    captureSecondaryAssignmentContext(assignmentContext: string): void;
    subscribe(_listener: FeatureFlagChangeListener): () => void;
    waitForExpResponse(): Promise<void>;
    getFlagWithExpOverride(_expFlag: ExpFlagKey, featureFlag: FeatureFlag): Promise<boolean>;
    subscribeToAuth(_auth: AuthSubscriber): void;
    onExpRetrievalResult(_callback: ExpRetrievalTelemetryCallback): void;
    isGpt54ForSubagentsEnabled(): Promise<boolean>;
    isGpt54MiniForExploreEnabled(): Promise<boolean>;
    isDynamicInstructionsRetrievalEnabled(): Promise<boolean>;
    isOpusMediumEffortDefaultEnabled(): Promise<boolean>;
    isWebSocketResponsesEnabled(): Promise<boolean>;
    isAnthropicMessagesApiEnabled(): Promise<boolean>;
    isDisableReasoningOutputGptEnabled(): Promise<boolean>;
    isToolSearchEnabled(): Promise<boolean>;
    isGptDefaultModelEnabled(): Promise<boolean>;
    isOpus1mDefaultModelEnabled(): Promise<boolean>;
    getLargeOutputThresholdBytes(): Promise<number>;
}

/**
 * Session class with event sourcing
 */
export declare class LocalSession extends Session<LocalSessionMetadata> {
    private callback;
    private isProcessing;
    private itemQueue;
    private _cachedTools;
    private _cachedClient;
    private premiumRequestProcessor;
    private immediatePromptProcessor;
    private compactionProcessor;
    get hasActiveWork(): boolean;
    /** 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?: DisposableTelemetrySender;
    /** 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 readonly memoryApiCache;
    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(coreServices: CoreServices, 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
     * @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;
    /**
     * Fire a notification hook for a permission prompt being shown to the user.
     * Called by the CLI when a permission prompt is actually presented, not when auto-approved.
     */
    notifyPermissionPrompt(message: string): void;
    private queuePostToolUseFailureContext;
    private runPostToolUseFailureHooks;
    private processToolExecutionResult;
    /**
     * Fire notification hooks for a given notification event.
     * Non-blocking — errors are caught and logged by executeHooks.
     * If any hook returns additionalContext, it's injected as a prepended user message.
     */
    private fireNotificationHook;
    /**
     * 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;
    /**
     * Check if the session is currently processing queued items.
     * Returns true when processQueuedItems() is actively running (e.g., during
     * an autopilot continuation that was started as fire-and-forget).
     */
    isProcessingMessages(): boolean;
    /**
     * Override setSelectedModel to enqueue the change when the session is mid-turn.
     * The model change will be applied after the current turn completes, in queue order.
     */
    setSelectedModel(model: string, reasoningEffort?: ReasoningEffortOption, modelCapabilitiesOverrides?: ModelCapabilitiesOverride): Promise<void>;
    /**
     * Check whether there are any active background agents.
     * Used to determine whether session.idle should be deferred.
     */
    private hasActiveBackgroundWork;
    /**
     * 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;
    /**
     * Check V8 heap pressure and take corrective action when memory is high.
     *
     * Called at natural checkpoints (turn boundaries, tool completion) where
     * the session can safely pause to reclaim memory. The strategy is:
     *   1. Try a GC — may be enough on its own.
     *   2. If still under pressure and no compaction is already running,
     *      trigger an emergency compaction to free message history.
     */
    private respondToMemoryPressure;
    /**
     * 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.
     *
     * Delegates to {@link FeatureFlagService.getFlagWithExpOverride} 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;
    private resolveIsRubberDuckAgentExpEnabled;
    /**
     * 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 and defaultAgentExcludedTools, if any.
     *
     * defaultAgentExcludedTools only applies when no custom agent is selected.
     * Custom agents define their own tool lists and are not affected by defaultAgentExcludedTools.
     *
     * @param allTools - All available tools
     * @returns Filtered tools based on selected custom agent and default agent exclusion restrictions
     */
    private filterToolsForSelectedAgent;
    private invokeCallbacks;
    /** Emit model_resolution_info telemetry once per session. */
    private emitModelResolutionInfo;
    private getModelList;
    protected getAvailableModelsForAgentValidation(): Promise<Model[] | undefined>;
    /**
     * Resolves and validates the selected model, returning the model ID and provider configuration.
     * Throws if an explicitly-selected model is not available.
     */
    private resolveAndValidateModel;
    /**
     * 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 a sampling inference request on behalf of an MCP server.
     * Uses the sampling client pattern for proper CAPI correlation, billing, and
     * usage telemetry. No boundary events are emitted — sampling has its own UI.
     *
     * @param samplingRequest - Pre-extracted system prompt and user prompt strings
     * @returns Promise resolving to the sampling agent result
     */
    executeSamplingInference(samplingRequest: SamplingInferenceRequest, abortSignal?: AbortSignal): Promise<McpSamplingAgentResult>;
    /**
     * Makes an ephemeral model call using the current conversation context.
     * The question and response are NOT added to conversation history.
     * No tools are provided — the model answers from context alone.
     *
     * @param question - The user's side question
     * @param onChunk - Callback invoked with each streaming text chunk
     * @param abortSignal - Optional signal to cancel the request
     * @returns The full response text
     */
    ephemeralQuery(question: string, onChunk: (text: string) => void, abortSignal?: AbortSignal): 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 sessionStoreUnsubscribe?;
    private _startupPrompts;
    private pendingRepoHooks;
    private _lastLoadedHookCount;
    /**
     * 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[];
    /**
     * The hook count from the last successful loadDeferredRepoHooks call.
     * Reset to 0 at the start of each loadDeferredRepoHooks invocation.
     */
    get lastLoadedHookCount(): number;
    private readonly coreServices;
    private readonly featureFlagService;
    private readonly telemetryService;
    private readonly defaultMachineId?;
    private readonly handoffGitOperations?;
    readonly otel?: OtelLifecycle;
    /** Factory for creating per-session virtual filesystems. */
    sessionFsFactory: (sessionId: string) => SessionFs;
    /** Local-only compatibility path for migrating legacy flat-file sessions. */
    private supportLegacyMigration;
    constructor(coreServices: CoreServices, { version, flushDebounceMs, settings, defaultMachineId, handoffGitOperations }?: LocalSessionManagerOptions);
    /**
     * Replace the session filesystem factory for all future sessions.
     * Must only be called when no sessions are active.
     */
    setSessionFsFactory(factory: (sessionId: string) => SessionFs): void;
    /** Wire OTel trace context resolver onto a session so MCP calls propagate traceparent/tracestate. */
    private wireMcpTraceContextResolver;
    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 or CLOUD_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>;
    /** Flush a session's pending events to disk by session ID. */
    saveSessionById(sessionId: string): Promise<void>;
    /** Wire flush callback so shared APIs (e.g., history.truncate) can flush buffered events. */
    private wireFlushCallback;
    /**
     * Fork a session by copying its events to a new session directory.
     * Creates a new session with a fresh ID whose event history is a copy of the source session's
     * events, optionally truncated to a boundary event.
     *
     * @param sourceSessionId - The session ID to fork from
     * @param toEventId - Optional event ID boundary (exclusive); only events before this ID are included
     * @returns The new session ID
     */
    forkSession(sourceSessionId: string, toEventId?: string): Promise<{
        sessionId: string;
    }>;
    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;
    /**
     * Get metadata for a single session by ID without loading the full session.
     * Returns undefined if the session does not exist.
     */
    getSessionMetadata({ sessionId }: {
        sessionId: string;
    }): Promise<LocalSessionMetadata | undefined>;
    /**
     * List all sessions by reading from disk.
     *
     * When `metadataLimit` is provided, only the first N sessions (sorted by
     * modification time) will have their full metadata loaded (summary, context).
     * The remaining sessions are returned with basic info only (sessionId, times).
     * This avoids reading thousands of workspace.yaml / events.jsonl files when
     * only a screenful of sessions will be displayed initially.
     */
    listSessions(options?: {
        metadataLimit?: number;
    }): 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).
     *
     * When `metadataLimit` is provided, only the first N sessions (by mtime)
     * will have full metadata loaded. This is the primary optimization for
     * the session picker: display recent sessions immediately, load older
     * session metadata lazily on scroll.
     *
     * @param currentContext The current working directory context to compare against
     * @param metadataLimit Max number of sessions to load full metadata for
     */
    listSessionsWithScores(currentContext?: WorkingDirectoryContext, metadataLimit?: number): Promise<ScoredSessionMetadata<LocalSessionMetadata>[]>;
    /**
     * Load full metadata (summary, context) for sessions that were loaded
     * without it (due to metadataLimit). Reads workspace.yaml for context
     * and falls back to JSONL for summary when workspace.yaml lacks one.
     */
    enrichSessionMetadata(sessions: LocalSessionMetadata[]): Promise<LocalSessionMetadata[]>;
    /**
     * Delete a session from disk
     */
    deleteSession(sessionId: string): Promise<void>;
    /**
     * Register an in-use lock for a session and check whether
     * another process already holds a lock on it.
     * @returns Whether the session was already in use by another process
     */
    registerSessionInUse(sessionId: string, settings?: RuntimeSettings): Promise<boolean>;
    /**
     * Check which sessions from a list are currently in use by another process.
     * This is an advisory, opt-in check for UI display (e.g., session picker badges).
     * It does NOT register locks — only reads existing lock files.
     *
     * @param sessionIds - Session IDs to check
     * @returns Set of session IDs that have alive lock files held by other processes
     */
    checkSessionsInUse(sessionIds: string[]): Promise<Set<string>>;
    /**
     * Register an in-use lock for a session directory and check whether
     * another process already holds a lock 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, eventFilter?: (events: readonly SessionEvent[]) => SessionEvent[]): AsyncGenerator<HandoffProgress, LocalSession, undefined>;
    /**
     * Helper method to fetch from git remote
     */
    private gitFetch;
}

declare type LocalSessionManagerOptions = {
    version?: string;
    flushDebounceMs?: number;
    settings?: RuntimeSettings;
    /** Default machine ID for sessions (from getCachedDeviceId in CLI) */
    defaultMachineId?: string;
    /** Git operations for remote→local session handoff */
    handoffGitOperations?: HandoffGitOperations;
};

export declare interface LocalSessionMetadata extends SessionMetadata {
    readonly isRemote: false;
}

/**
 * A local skill loaded from the filesystem.
 */
declare interface LocalSkill extends SkillBase {
    /** The source location type of this skill. */
    source: LocalSkillSource;
    /** Absolute path to the SKILL.md file. */
    filePath: string;
    /** Absolute path to the skill's base directory. */
    baseDir: string;
    /** The full raw content of SKILL.md or command file. */
    content: string;
}

/**
 * Source location of a local skill, determines priority order.
 * - project: .github/skills/, .agents/skills/, or .claude/skills/ in current working directory (highest priority)
 * - inherited: .github/skills/, .agents/skills/, or .claude/skills/ in parent directories (monorepo support)
 * - personal-copilot: ~/.copilot/skills/
 * - personal-agents: ~/.agents/skills/
 * - personal-claude: ~/.claude/skills/
 * - plugin: From an installed plugin
 * - custom: Added via COPILOT_SKILLS_DIRS env var or config
 * - builtin: Bundled with the runtime (lowest priority, can be overridden by any other source)
 */
declare type LocalSkillSource = "project" | "inherited" | "personal-copilot" | "personal-agents" | "personal-claude" | "plugin" | "custom" | "builtin";

/** Basic logging interface */
declare interface Logger {
    info(message: string): void;
    debug(message: string): void;
    warning(message: string): void;
    error(message: string): void;
}

/** The global logger instance used throughout the application */
export declare const logger: QueuingProxyLogger;

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, {
    source: "github";
    repo: string;
    path?: string | undefined;
    ref?: string | undefined;
}, {
    source: "github";
    repo: string;
    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, {
    path: string;
    source: "local";
}, {
    path: string;
    source: "local";
}>]>;

export declare const MAX_POST_TOOL_USE_FAILURE_CONTEXT_LENGTH: number;

/**
 * A non-default server that passed an {@link McpConfigFilter}.
 */
declare interface McpAllowedServer {
    /** The config key / name of the server. */
    name: string;
    /** PII-free note about why the server was allowed (e.g. "Found in registry <hash>"). */
    redactedNote?: 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[];
    /** Non-default servers that passed the filter. */
    allowedServers?: McpAllowedServer[];
}

/**
 * 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;
    /** PII-free version of {@link reason} with URLs and names hashed. Safe for non-restricted telemetry. */
    redactedReason?: string;
}

/**
 * Manages the lifecycle of MCP (Model Context Protocol) servers and provides access to their tools.
 */
declare class McpHost {
    protected registry: MCPRegistry;
    private processor;
    protected config: MCPServersConfig;
    private startServersPromise?;
    protected transport: InProcMCPTransport | null;
    private disabledServers;
    private progressCallback?;
    private traceContextResolver?;
    private mcp3pEnabled;
    private configFilter;
    private elicitationHandler?;
    protected statusCallback?: ServerStatusCallback;
    protected logger: RunnerLogger;
    protected onOAuthRequired?: McpHostOptions["onOAuthRequired"];
    protected settings?: RuntimeSettings;
    private serverStateChangedCallback?;
    private serverStatusChangedCallback?;
    private filteredServerNames;
    constructor(options: McpHostOptions);
    /**
     * 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<StartServersResult>;
    /**
     * 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 all servers that require user-initiated authentication.
     * @returns A record of server names to their needs-auth information
     */
    getNeedsAuthServers(): Record<string, {
        timestamp: number;
    }>;
    /**
     * 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, forceReauth?: boolean): 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, forceReauth?: boolean): Promise<void>;
    /**
     * Evict cached OIDC tokens and restart a server to pick up fresh credentials.
     * Used for auth-retry reconnection when a tool call receives a 401.
     */
    reconnectServerWithFreshOIDCAuth(serverName: string): 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;
    /**
     * Check if a server was filtered out by a config filter (e.g. allowlist enforcement).
     * Filtered servers should be hidden from the UI (e.g. /mcp show).
     * @param serverName - Name of the server to check
     * @returns True if server was filtered out
     */
    isServerFiltered(serverName: string): boolean;
    /**
     * Disable a server at runtime.
     * Callers are responsible for persisting this change if cross-session persistence is desired.
     * @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;
    /**
     * Re-authenticate a remote MCP server by clearing cached OAuth tokens
     * and restarting the connection with a forced OAuth flow.
     * Override in subclasses that support OAuth (e.g., CliMcpHost).
     * @param serverName - Name of the server to re-authenticate
     */
    reauthenticateServer(_serverName: string): Promise<void>;
    /**
     * 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;
    /**
     * Set the resolver for OTel trace context on MCP tool calls.
     * When set, `traceparent`/`tracestate` will be injected into `params._meta`.
     */
    setTraceContextResolver(resolver: TraceContextResolver | 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 McpHostOptions {
    logger: RunnerLogger;
    mcpConfig: string | MCPServersConfig;
    disabledMcpServers?: string[];
    envValueMode?: EnvValueMode;
    sessionId?: string;
    onOAuthRequired?: (serverName: string, serverUrl: string, staticClientConfig?: {
        clientId: string;
        publicClient?: boolean;
    }) => Promise<OAuthClientProvider | undefined>;
    settings?: RuntimeSettings;
    elicitationHandler?: (serverName: string, request: ElicitRequestParams) => Promise<ElicitResult>;
    samplingHandler?: (serverName: string, requestId: string | number, request: CreateMessageRequestParams) => Promise<CreateMessageResultWithTools | undefined>;
    mcp3pEnabled?: boolean;
    onOIDCAuthRequired?: OIDCAuthCallback;
    configFilter?: McpConfigFilter;
    /**
     * Optional secret store for resolving ${secret:...} placeholders.
     * Only used in the CLI; the Actions runtime does not use this.
     */
    secretStore?: McpSecretStoreInterface;
}

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;
    };
    type: "mcp.oauth_completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "mcp.oauth_completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "mcp.oauth_required";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    };
    type: "mcp.oauth_required";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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>;
    /**
     * Servers that require user-initiated OAuth authentication.
     * Distinct from failed — the server would work if the user authenticates.
     */
    needsAuthServers: Record<string, {
        timestamp: number;
    }>;
    private toolsChangedCallback?;
    private elicitationHandler?;
    private samplingHandler?;
    /** 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>, samplingHandler?: (serverName: string, requestId: string | number, request: CreateMessageRequestParams) => Promise<CreateMessageResultWithTools | undefined>);
    /**
     * 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;
    /**
     * Register the sampling request handler on a client if a handler is available.
     */
    private registerSamplingHandler;
    /**
     * 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;
    /**
     * Record that a server requires user-initiated OAuth authentication.
     * Clears any existing failure record since the server isn't truly failed.
     * @param serverName - Name of the server
     */
    recordNeedsAuth(serverName: string): void;
    /**
     * Clear a server's needs-auth record (e.g., after successful authentication).
     * @param serverName - Name of the server
     */
    clearNeedsAuth(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 interface McpSamplingAgentResult<TelemetryT extends Telemetry = Telemetry> {
    action: "success" | "failure" | "reject";
    /** The result of the sampling request, if successful. */
    result?: CreateMessageResultWithTools;
    /**
     * If there was an error during processing the sampling request, this field will contain a description of the error.
     * This is separate from the "reject" action, which indicates that the request was processed successfully but the
     * response was rejected (e.g. by content filters or because it didn't meet certain criteria).
     */
    error?: string;
    /**
     * Specific telemetry for the sampling request. Will be sent back to the server by the agent.
     */
    toolTelemetry?: {
        properties?: TelemetryT["properties"];
        restrictedProperties?: TelemetryT["restrictedProperties"];
        metrics?: TelemetryT["metrics"];
    };
}

/**
 * Interface for MCP secret storage operations.
 * Secrets are stored in the OS keychain (via keytar) with a file-based fallback.
 *
 * Implementations live in the CLI layer (e.g., `src/cli/mcp-oauth/mcp-secret-store.ts`);
 * the interface is defined here so core and mcp-client code can depend on it
 * without importing from `src/cli/`.
 */
declare interface McpSecretStoreInterface {
    /** Get a secret value by its ID. */
    getSecret(secretId: string): Promise<string | undefined>;
    /** Save a secret value. Returns true if stored in keychain, false if file fallback. */
    saveSecret(secretId: string, value: string): Promise<boolean>;
    /** Delete a secret by its ID. */
    deleteSecret(secretId: string): Promise<void>;
    /** Delete all secrets for a given server name. */
    deleteServerSecrets(serverName: string): Promise<void>;
    /**
     * Resolve all ${secret:...} placeholders in a string, replacing them
     * with the actual secret values from the store.
     * Returns the string with all resolvable placeholders replaced.
     */
    resolveSecrets(value: string): Promise<string>;
}

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 .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;
    /**
     * Optional. When truthy, an OIDC token is automatically gathered.
     */
    oidc?: MCPServerOIDCConfig;
}

/**
 * Inline OIDC configuration for an MCP server.
 * When truthy, the runtime automatically injects an OIDC token:
 * - Local servers: as GITHUB_COPILOT_OIDC_MCP_TOKEN env var
 * - Remote servers: as a Bearer Authorization header, optionally GITHUB_COPILOT_OIDC_MCP_TOKEN for other headers
 */
declare type MCPServerOIDCConfig = boolean | Record<string, unknown>;

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?;
    private _traceContextResolver?;
    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;
    /**
     * Set the resolver used to obtain OTel trace context for MCP tool calls.
     * When set, `traceparent`/`tracestate` will be injected into `params._meta`
     * of `callTool` requests, following the OTel MCP semantic conventions.
     */
    setTraceContextResolver(resolver: TraceContextResolver | undefined): void;
    /** Returns the current trace context resolver, if set. */
    protected get traceContextResolver(): TraceContextResolver | undefined;
    /**
     * Resolves OTel trace context for a tool call, returning a shaped object
     * suitable for injection into `_meta` or the HTTP request body.
     * Best-effort: returns `undefined` on error or when unavailable.
     */
    protected resolveTraceContext(toolCallId?: string): {
        traceparent: string;
        tracestate?: string;
    } | undefined;
    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 a memory operation (store or vote).
 *
 * When `action` is `"store"`: `subject`, `fact`, and `citations` are present.
 * When `action` is `"vote"`: `fact`, `direction`, and `reason` are present.
 *
 * Prefer using {@link StoreMemoryPermissionRequest} or {@link VoteMemoryPermissionRequest}
 * at construction sites for stricter compile-time enforcement.
 *
 * This flat shape is kept for compatibility with the Zod-inferred event schema type
 * (Zod v3 can't model nested discriminated unions).
 */
declare type MemoryPermissionRequest = {
    readonly kind: "memory";
    readonly action: "store" | "vote";
    /** The subject of the memory being stored (store only) */
    readonly subject?: string;
    /** The fact being stored or voted on */
    readonly fact: string;
    /** The source citations for the fact (store only) */
    readonly citations?: string;
    /** The vote direction (vote only) */
    readonly direction?: "upvote" | "downvote";
    /** The reason for the vote (vote only) */
    readonly reason?: 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;

/**
 * Merge session-level provider headers with per-turn request headers.
 * Per-turn headers augment and overwrite session-level headers with the same key
 * (case-insensitive, since HTTP header names are case-insensitive per RFC 9110).
 * When a request header overwrites a provider header, the request header's
 * original casing is used in the result.
 * Returns `undefined` when neither source provides headers so callers can
 * avoid sending an empty object.
 */
export declare function mergeRequestHeaders(providerHeaders: Record<string, string> | undefined, requestHeaders: Record<string, string> | undefined): Record<string, string> | undefined;

/**
 * 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 enum MissionControlIndexingLevel {
    Local = "local",
    User = "user",
    RepoAndUser = "repo_and_user"
}

declare type Model = {
    id: string;
    name: string;
    preview?: boolean;
    vendor?: string;
    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;
        restricted_to?: string[];
    };
};

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: ModelResponseUsage | undefined;
    /**
     * 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;
    /** Number of tools sent to the model for this call. */
    toolCount?: number;
};

/**
 * Deep-partial override for model capabilities, derived from {@link Model}.
 * Only non-undefined values are applied over the runtime-resolved capabilities.
 */
declare type ModelCapabilitiesOverride = DeepOptional<Model["capabilities"]>;

/**
 * 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;
        reasoningTokens: number;
    };
}

/**
 * OpenAI's CompletionUsage extended with cache creation token counts.
 * Providers like Anthropic report `cache_creation_input_tokens` which has
 * no standard OpenAI equivalent; this type carries that data alongside the
 * standard usage fields so all token counts travel together.
 */
declare type ModelResponseUsage = NonNullable<OpenAI.ChatCompletion["usage"]> & {
    prompt_tokens_details?: {
        /** Tokens written to the prompt cache (e.g. Anthropic's `cache_creation_input_tokens`). */
        cache_creation_tokens?: 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;
}

export declare type NotificationHook = (input: NotificationHookInput) => Promise<NotificationHookOutput | void>;

/**
 * Notification hook types - fires when the CLI shows a notification (permission, elicitation, completion)
 */
export declare interface NotificationHookInput extends BaseHookInput {
    message: string;
    title?: string;
    notificationType: string;
}

export declare interface NotificationHookOutput {
    additionalContext?: string;
}

declare type OIDCAuthCallback = (secretNames: string[], mcpServerNames: string[], agentName?: string, agentVersion?: string) => Promise<OIDCAuthResult>;

/**
 * Structured result from an OIDC token exchange, keeping secret-based tokens
 * and MCP-server-based tokens in separate maps so callers don't need to
 * re-classify names after the fact.
 */
declare interface OIDCAuthResult {
    /** Tokens keyed by OIDC secret name (GITHUB_COPILOT_OIDC_* / GITHUB_AGENTIC_APP_OIDC_*). */
    secretTokens: Record<string, string>;
    /** Tokens keyed by MCP server name. */
    mcpServerTokens: Record<string, string>;
    /** Failures reported for individual token exchanges that failed upstream. */
    failures: OIDCTokenFailure[];
}

/** Describes a single upstream OIDC token exchange failure. */
declare interface OIDCTokenFailure {
    /** HTTP-level status code from the upstream provider. */
    responseCode: number;
    /** User-facing message describing the failure. */
    message: string;
    /** Internal error detail for logging/diagnostics. */
    error: string;
    /** Optional URL with more context about the failure. */
    failureUrl?: string;
    /** Optional MCP server name associated with this failure. */
    serverName?: string;
    /** Optional secret name associated with this failure. */
    secretName?: string;
}

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;
};

/** Callback shape for tool-list updates, shared between OtelSession and OtelSessionTracker. */
declare type OnToolsUpdateFn = (callback: (tools: Array<{
    name: string;
    description: string;
    input_schema?: unknown;
}>, model: string) => void) => () => void;

/**
 * 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;
    onToolsUpdate?: OnToolsUpdateFn;
};

/** Options forwarded from the session creation call. */
declare interface OtelTrackingOptions {
    model?: string;
    providerType?: string;
    providerBaseUrl?: string;
    streaming?: boolean;
    traceparent?: string;
    tracestate?: string;
}

/**
 * Parse a COPILOT_EXP_* env var value into a typed ExpFlagValue.
 * Returns undefined if the value is empty or unrecognised.
 */
export declare function parseExpFlagValue(value: string | undefined): ExpFlagValue | undefined;

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: {};
    type: "pending_messages.modified";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {};
    type: "pending_messages.modified";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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;
    /** Tool call IDs that a preToolUse hook has explicitly allowed (permissionDecision: "allow"). */
    private readonly hookAllowedToolCallIds;
    private readonly permissionRequests;
    private readonly userInputRequests;
    private readonly elicitationRequests;
    private readonly samplingRequests;
    private readonly mcpOAuthRequests;
    private readonly externalToolRequests;
    private readonly queuedCommandRequests;
    private readonly commandExecutionRequests;
    private readonly exitPlanModeRequests;
    /** Per-capability cancel callbacks. When a capability is lost, all registered callbacks fire. */
    private readonly capabilityCancellers;
    constructor(emitEphemeral: (type: string, data: Record<string, unknown>) => void);
    /** Mark a tool call ID as pre-approved by a preToolUse hook. */
    addHookAllowedToolCallId(toolCallId: string): void;
    /** Clear all hook-allowed tool call IDs (called at the start of each preToolsExecution batch). */
    clearHookAllowedToolCallIds(): 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;
    /**
     * Try to respond to a pending elicitation request by its ID.
     * Returns true if the request was found and resolved, false if already resolved.
     */
    tryRespondToElicitation(requestId: string, response: ElicitResult): boolean;
    /** Emit a sampling request event and return a promise that resolves when responded to. */
    requestSampling(serverName: string, mcpRequestId: string | number, request: CreateMessageRequestParams): Promise<CreateMessageResultWithTools | undefined>;
    /** Respond to a pending sampling request by its ID. Response is optional for reject/cancel. */
    respondToSampling(requestId: string, response?: CreateMessageResultWithTools): void;
    /**
     * Register a callback to fire when a capability is lost.
     * Returns an unregister function to clean up when the request completes normally.
     */
    private onCapabilityLost;
    /** Cancel all pending requests tied to a specific capability. */
    cancelRequestsForCapability(capability: string): 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;
    /**
     * Create a pending command execution and emit a command.execute event.
     * The server intercepts this event and routes to the owning connection.
     */
    executeCommand(commandName: string, args: string): Promise<CommandExecutionResult>;
    /** Respond to a pending command execution request by its ID. Returns true if a request was found. */
    respondToCommandExecution(requestId: string, error?: string): boolean;
    /** Reject pending command executions for specific command names (e.g., on client disconnect). */
    rejectCommandExecutionsForNames(commandNames: Set<string>, error: Error): void;
    /** Reject all pending command execution requests (e.g., when the session is aborted). */
    rejectAllCommandExecutions(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>;
    /**
     * Create a pending exit plan mode request, emit the event, and return both the requestId and promise.
     * Use this when the caller needs the requestId to route a callback response through respondToExitPlanMode().
     */
    createExitPlanModeRequest(request: ExitPlanModeRequest, planContent?: string): {
        requestId: string;
        promise: 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", "denied-by-permission-request-hook"]>;
        }, "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" | "denied-by-permission-request-hook";
        }, {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy" | "denied-by-permission-request-hook";
        }>;
    }, "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" | "denied-by-permission-request-hook";
        };
        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" | "denied-by-permission-request-hook";
        };
        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" | "denied-by-permission-request-hook";
        };
        requestId: string;
    };
    type: "permission.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    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" | "denied-by-permission-request-hook";
        };
        requestId: string;
    };
    type: "permission.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * 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";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: 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>;
            canOfferSessionApproval: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: 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, {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        }, {
            path: string;
            kind: "read";
            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;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        }, {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            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>;
            action: z.ZodDefault<z.ZodEnum<["store", "vote"]>>;
            subject: z.ZodOptional<z.ZodString>;
            fact: z.ZodString;
            citations: z.ZodOptional<z.ZodString>;
            direction: z.ZodOptional<z.ZodEnum<["upvote", "downvote"]>>;
            reason: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: string | undefined;
        }, {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        }>]>;
        resolvedByHook: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    }, {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    };
    type: "permission.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    };
    type: "permission.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

export declare type PermissionRequestHook = (input: PermissionRequestHookInput) => Promise<PermissionRequestHookOutput | void>;

/**
 /**
 * PermissionRequest hook types - fires when a tool-level permission dialog is about to be shown
 */
export declare interface PermissionRequestHookInput extends BaseHookInput {
    hookName: "permissionRequest";
    toolName: string;
    toolInput: unknown;
    permissionSuggestions: Array<{
        kind: string;
        [key: string]: unknown;
    }>;
}

export declare interface PermissionRequestHookOutput {
    behavior?: "allow" | "deny";
    message?: string;
    interrupt?: boolean;
}

/**
 * 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 forceReject?: boolean;
} | {
    readonly kind: "denied-by-content-exclusion-policy";
    readonly path: string;
    readonly message: string;
} | {
    readonly kind: "denied-by-permission-request-hook";
    readonly message?: string;
    readonly interrupt?: boolean;
};

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";
    commands: readonly {
        identifier: string;
        readOnly: boolean;
    }[];
    intention: string;
    fullCommandText: string;
    possiblePaths: readonly string[];
    possibleUrls: readonly {
        url: string;
    }[];
    hasWriteFileRedirection: boolean;
    canOfferSessionApproval: boolean;
    warning?: string | undefined;
    toolCallId?: string | undefined;
}, {
    kind: "shell";
    commands: readonly {
        identifier: string;
        readOnly: boolean;
    }[];
    intention: string;
    fullCommandText: string;
    possiblePaths: readonly string[];
    possibleUrls: readonly {
        url: string;
    }[];
    hasWriteFileRedirection: boolean;
    canOfferSessionApproval: boolean;
    warning?: string | undefined;
    toolCallId?: 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>;
    canOfferSessionApproval: z.ZodBoolean;
}, "strip", z.ZodTypeAny, {
    kind: "write";
    diff: string;
    intention: string;
    canOfferSessionApproval: boolean;
    fileName: string;
    toolCallId?: string | undefined;
    newFileContents?: string | undefined;
}, {
    kind: "write";
    diff: string;
    intention: string;
    canOfferSessionApproval: boolean;
    fileName: 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, {
    path: string;
    kind: "read";
    intention: string;
    toolCallId?: string | undefined;
}, {
    path: string;
    kind: "read";
    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;
    toolName: string;
    readOnly: boolean;
    toolTitle: string;
    toolCallId?: string | undefined;
    args?: any;
}, {
    kind: "mcp";
    serverName: string;
    toolName: string;
    readOnly: boolean;
    toolTitle: string;
    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>;
    action: z.ZodDefault<z.ZodEnum<["store", "vote"]>>;
    subject: z.ZodOptional<z.ZodString>;
    fact: z.ZodString;
    citations: z.ZodOptional<z.ZodString>;
    direction: z.ZodOptional<z.ZodEnum<["upvote", "downvote"]>>;
    reason: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    action: "store" | "vote";
    kind: "memory";
    fact: string;
    toolCallId?: string | undefined;
    reason?: string | undefined;
    direction?: "upvote" | "downvote" | undefined;
    citations?: string | undefined;
    subject?: string | undefined;
}, {
    kind: "memory";
    fact: string;
    action?: "store" | "vote" | undefined;
    toolCallId?: string | undefined;
    reason?: string | undefined;
    direction?: "upvote" | "downvote" | undefined;
    citations?: string | undefined;
    subject?: 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 PostToolUseFailureHook = (input: PostToolUseFailureHookInput) => Promise<PostToolUseFailureHookOutput | void>;

export declare interface PostToolUseFailureHookInput extends BaseHookInput {
    toolName: string;
    toolArgs: unknown;
    error: string;
}

export declare interface PostToolUseFailureHookOutput {
    additionalContext?: string;
}

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?;
    private readonly onToolCallAllowed?;
    private readonly onAdditionalContext?;
    constructor(hooks: QueryHooks | undefined, workingDir: string, sessionId: string, requestHookPermission?: RequestHookPermissionFn | undefined, emitter?: HookEventEmitter | undefined, onToolCallAllowed?: ((toolCallId: string) => void) | undefined, onAdditionalContext?: ((toolCallId: string, context: string) => void) | 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;
};

/** A slash command registered by an SDK client. */
declare interface ProtocolCommandDefinition {
    /** Command name (without leading /). */
    name: string;
    /** Human-readable description shown in command completion UI. */
    description?: string;
}

/** 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. When set, uses the versioned deployment route. When omitted, uses the GA versionless v1 route. */
        apiVersion?: string;
    };
    /**
     * Well-known model ID used for configuration and capability lookup.
     * When set, agent behavior config (tools, reasoning, prompts) and token limits
     * are inferred from this model instead of the wire model.
     * Defaults to `COPILOT_MODEL` / `--model` when not explicitly set.
     */
    modelId?: string;
    /**
     * The model identifier sent to the provider API for inference (the "wire" model).
     * This is what your provider knows (e.g., a custom fine-tune name or Azure
     * deployment), as opposed to `modelId` which is the well-known base model
     * used for internal capability/config lookups.
     * Defaults to `COPILOT_MODEL` / `--model` when not explicitly set.
     */
    wireModel?: string;
    /** Maximum prompt/input tokens for the model. */
    maxPromptTokens?: number;
    /** Maximum context window tokens for the model. */
    maxContextWindowTokens?: number;
    /** Maximum output tokens for the model. */
    maxOutputTokens?: number;
    /** Custom HTTP headers to include in all outbound requests to the provider. */
    headers?: Record<string, 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;
}

/**
 * Hook system with arrays of specific hook callbacks
 */
export declare interface QueryHooks {
    preToolUse?: PreToolUseHook[];
    postToolUse?: PostToolUseHook[];
    postToolUseFailure?: PostToolUseFailureHook[];
    userPromptSubmitted?: UserPromptSubmittedHook[];
    sessionStart?: SessionStartHook[];
    sessionEnd?: SessionEndHook[];
    errorOccurred?: ErrorOccurredHook[];
    agentStop?: AgentStopHook[];
    subagentStop?: SubagentStopHook[];
    subagentStart?: SubagentStartHook[];
    preCompact?: PreCompactHook[];
    permissionRequest?: PermissionRequestHook[];
    notification?: NotificationHook[];
}

/**
 * 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 | QueuedModelChangeItem;

/**
 * Represents a queued user message to be processed by the agentic loop.
 */
export declare interface QueuedMessageItem {
    kind: "message";
    options: SendOptions;
}

/**
 * Represents a queued model change to be applied after the current turn.
 */
export declare interface QueuedModelChangeItem {
    kind: "model_change";
    model: string;
    reasoningEffort?: ReasoningEffortOption;
    modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
}

/** Logger that queues log messages until a real logger is set */
declare class QueuingProxyLogger implements Logger, Disposable_2 {
    private initialQueue;
    private initialQueueResolvers;
    private logWriter;
    private writePromise;
    /** Sets the log writer and flushes any queued log messages.
     * Should only be called once per process (except in tests).
     */
    setLogWriter(logWriter: LogWriter): void;
    /** Waits for all queued log messages to be written. */
    flush(): Promise<void>;
    /** Alias for Disposable interface */
    dispose(): Promise<void>;
    outputPath(): string | undefined;
    private logToLevel;
    info(message: string): void;
    debug(message: string): void;
    warning(message: string): void;
    error(message: string | Error): void;
    log(message: string): void;
    isDebug(): boolean;
    notice(message: string | Error): void;
    startGroup(name: string, _?: LogLevel): void;
    endGroup(_?: LogLevel): void;
}

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 = string;

/** Re-export ReasoningEffortOption as ReasoningEffortLevel for backwards compatibility */
declare type ReasoningEffortLevel = ReasoningEffortOption;

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;
    readonly taskType?: RemoteTaskType;
    constructor(coreServices: CoreServices, options: SessionOptions & {
        repository: {
            name: string;
            owner: string;
            branch: string;
        };
        remoteSessionIds: string[];
        pullRequestNumber?: number;
        resourceId?: string;
        taskType?: RemoteTaskType;
    });
    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;
    /** Whether this task originated from CCA or CLI `--remote`. */
    readonly taskType?: RemoteTaskType;
}

/**
 * A remote skill loaded from sweagentd (org/enterprise skills).
 * Content is fetched lazily when the skill is invoked.
 */
declare interface RemoteSkill extends SkillBase {
    /** Remote skills always have source "remote". */
    source: "remote";
    /** Relative path to SKILL.md within the source repository (e.g., ".github/skills/foo/SKILL.md"). */
    relativePath: string;
    /** Relative path to the skill's directory within the source repository. */
    relativeDir: string;
    /** Lazy content loader - must be called to fetch skill content on-demand. */
    fetchContent: () => Promise<string>;
}

/** Discriminates whether a remote task originated from CCA or CLI `--remote`. */
export declare type RemoteTaskType = "cca" | "cli";

/**
 * 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, abortSignal?: AbortSignal): 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 an ExP-backed feature flag.
 *
 * When `featureFlagService` is available, waits for the ExP-backed resolution.
 * Otherwise falls back to the static feature flag.
 */
export declare function resolveExpFlag(featureFlagService: IFeatureFlagService | undefined, expFlag: ExpFlagKey, featureFlag: FeatureFlag, featureFlags?: Readonly<Partial<Record<FeatureFlag, boolean>>>): Promise<boolean>;

/**
 * Resolves feature flag availability to boolean values based on user status and team membership.
 *
 * @param isStaff Whether the user is a staff member
 * @param isExperimental Whether experimental mode is enabled
 * @param isTeam Whether the current repository is considered a team repo (enabling "team" tier flags)
 * @returns Feature flags with boolean values
 */
export declare function resolveFeatureFlags(isStaff: boolean, isExperimental: boolean, isTeam: boolean): FeatureFlags;

/**
 * Validate and coerce an ExP flag value to a safe large output threshold (bytes).
 * Returns the default when the value is missing, non-numeric, or out of range.
 */
export declare function resolveLargeOutputThresholdFromExp(value: ExpFlagValue | undefined): number;

/**
 * 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;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }, {
        src: string;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | 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, {
    type: "resource_link";
    name: string;
    uri: string;
    size?: number | undefined;
    mimeType?: string | undefined;
    description?: string | undefined;
    icons?: {
        src: string;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    title?: string | undefined;
}, {
    type: "resource_link";
    name: string;
    uri: string;
    size?: number | undefined;
    mimeType?: string | undefined;
    description?: string | undefined;
    icons?: {
        src: string;
        theme?: "light" | "dark" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    title?: string | 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?: IFeatureFlagService): 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;
};

export declare type SamplingCompletedEvent = z.infer<typeof SamplingCompletedEventSchema>;

/**
 * Emitted when a pending sampling request has been resolved by a client.
 */
declare const SamplingCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"sampling.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    type: "sampling.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "sampling.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/** Data-only request for sampling inference — no CLI/UI concerns. */
declare interface SamplingInferenceRequest {
    /** The MCP server name that initiated the request. */
    serverName: string;
    /** The JSON-RPC request ID from the MCP protocol. */
    requestId: string | number;
    /** System prompt from the MCP sampling request. */
    systemPrompt: string;
    /** Conversation messages converted from MCP SamplingMessage format. */
    messages: ChatCompletionMessageParam[];
    /** Maximum number of output tokens requested by the MCP server. */
    maxTokens: number;
}

export declare type SamplingRequestedEvent = z.infer<typeof SamplingRequestedEventSchema>;

/**
 * Emitted when an MCP server requests a sampling (model inference) call.
 * The client should show the request for approval, perform inference if approved,
 * and respond via session.respondToSampling(requestId, result).
 */
declare const SamplingRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"sampling.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        mcpRequestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        mcpRequestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        mcpRequestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
    }, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    type: "sampling.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    type: "sampling.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * Sandbox configuration, inferred from the config schema.
 * `enabled` is required at the usage boundary (defaults to false when loading).
 */
declare type SandboxConfig = {
    enabled: boolean;
} & Omit<NonNullable<DefaultConfig["sandbox"]>, "enabled">;

/**
 * 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;

export declare type SdkCommandsChangedEvent = z.infer<typeof SdkCommandsChangedEventSchema>;

/**
 * Emitted when SDK-registered commands change (registered or unregistered).
 * Subscribers should update their command lists.
 */
declare const SdkCommandsChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"commands.changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        commands: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description?: string | undefined;
        }, {
            name: string;
            description?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    }, {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    type: "commands.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    type: "commands.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * Override operation for a single system prompt section.
 * Either a static operation (replace, remove, append, prepend) or a transform callback.
 */
declare type SectionOverride = StaticSectionOverride | TransformSectionOverride;

/**
 * Batched transform callback for system prompt sections.
 * Receives a map of section IDs to their current rendered content,
 * returns a map of section IDs to their transformed content.
 */
declare type SectionTransformFn = (sections: Record<string, string>) => Promise<Record<string, 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";
    filePath: string;
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
}, {
    text: string;
    type: "selection";
    filePath: string;
    displayName: string;
    selection: {
        end: {
            line: number;
            character: number;
        };
        start: {
            line: number;
            character: number;
        };
    };
}>;

export declare interface SendOptions {
    prompt: string;
    /** If provided, this is shown in the timeline instead of prompt */
    displayPrompt?: string;
    attachments?: Attachment[];
    mode?: "enqueue" | "immediate";
    /**
     * 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"`: runtime-generated notifications hidden from the timeline.
     * - `` `command-${id}` ``: injected by a remote command with the given MC command id.
     */
    source?: "system" | `command-${string}`;
    /** Structured metadata for system notifications. Only used when source is "system". */
    notificationKind?: SystemNotificationKind;
    /**
     * Custom HTTP headers to include in outbound model requests for this turn.
     * Merged with session-level provider headers: per-turn headers augment and
     * overwrite session-level headers with the same key.
     */
    requestHeaders?: Record<string, string>;
}

declare type ServerConnectionStatus = "connected" | "failed" | "needs-auth" | "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;
} | {
    status: "needs-auth";
};

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>;
            modelCapabilities: ZodOptional<ZodObject<    {
            supports: ZodOptional<ZodOptional<ZodObject<    {
            vision: ZodOptional<ZodOptional<ZodBoolean>>;
            reasoningEffort: ZodOptional<ZodOptional<ZodBoolean>>;
            }, "strip", ZodTypeAny, {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            }, {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            }>>>;
            limits: ZodOptional<ZodOptional<ZodObject<    {
            max_prompt_tokens: ZodOptional<ZodOptional<ZodNumber>>;
            max_output_tokens: ZodOptional<ZodOptional<ZodNumber>>;
            max_context_window_tokens: ZodOptional<ZodOptional<ZodNumber>>;
            vision: ZodOptional<ZodOptional<ZodObject<    {
            supported_media_types: ZodOptional<ZodArray<ZodString, "many">>;
            max_prompt_images: ZodOptional<ZodNumber>;
            max_prompt_image_size: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            }, {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            }>>>;
            }, "strip", ZodTypeAny, {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            }, {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            }>>>;
            }, "strip", ZodTypeAny, {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            }, {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            }>>;
            }, "strip", ZodTypeAny, {
            modelId: string;
            reasoningEffort?: string | undefined;
            modelCapabilities?: {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            } | undefined;
            }, {
            modelId: string;
            reasoningEffort?: string | undefined;
            modelCapabilities?: {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            } | undefined;
            }>;
            result: ZodObject<    {
            modelId: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId?: string | undefined;
            }, {
            modelId?: string | undefined;
            }>;
        };
    }>;
    readonly mode: ApiSchemaToInterface<{
        get: {
            result: ZodEnum<["interactive", "plan", "autopilot"]>;
        };
        set: {
            params: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "autopilot" | "plan";
            }, {
            mode: "interactive" | "autopilot" | "plan";
            }>;
        };
    }>;
    readonly name: ApiSchemaToInterface<{
        get: {
            result: ZodObject<    {
            name: ZodNullable<ZodString>;
            }, "strip", ZodTypeAny, {
            name: string | null;
            }, {
            name: string | null;
            }>;
        };
        set: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
        };
    }>;
    readonly plan: ApiSchemaToInterface<{
        read: {
            result: ZodObject<    {
            exists: ZodBoolean;
            content: ZodNullable<ZodString>;
            path: ZodNullable<ZodString>;
            }, "strip", ZodTypeAny, {
            path: string | null;
            content: string | null;
            exists: boolean;
            }, {
            path: string | null;
            content: string | null;
            exists: boolean;
            }>;
        };
        update: {
            params: ZodObject<    {
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            }, {
            content: string;
            }>;
        };
        delete: {};
    }>;
    readonly workspaces: ApiSchemaToInterface<{
        getWorkspace: {
            result: ZodObject<    {
            workspace: ZodNullable<ZodObject<    {
            id: ZodString;
            cwd: ZodOptional<ZodString>;
            git_root: ZodOptional<ZodString>;
            repository: ZodOptional<ZodString>;
            host_type: ZodOptional<ZodEnum<["github", "ado"]>>;
            branch: ZodOptional<ZodString>;
            summary: ZodOptional<ZodString>;
            name: ZodOptional<ZodString>;
            summary_count: ZodDefault<ZodNumber>;
            created_at: ZodOptional<ZodString>;
            updated_at: ZodOptional<ZodString>;
            mc_task_id: ZodOptional<ZodString>;
            mc_session_id: ZodOptional<ZodString>;
            mc_last_event_id: ZodOptional<ZodString>;
            session_sync_level: ZodOptional<ZodNativeEnum<MissionControlIndexingLevel>>;
            pr_create_sync_dismissed: ZodOptional<ZodBoolean>;
            chronicle_sync_dismissed: ZodOptional<ZodBoolean>;
            }, "strip", ZodTypeAny, {
            id: string;
            summary_count: number;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            }, {
            id: string;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            }>>;
            }, "strip", ZodTypeAny, {
            workspace: {
            id: string;
            summary_count: number;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            } | null;
            }, {
            workspace: {
            id: string;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            } | null;
            }>;
        };
        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, {
            path: string;
            content: string;
            }, {
            path: string;
            content: string;
            }>;
        };
    }>;
    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: {};
        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, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }, {
            skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
        };
        disable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
        };
        reload: {};
    }>;
    readonly mcp: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            servers: ZodArray<ZodObject<    {
            name: ZodString;
            status: ZodEnum<["connected", "failed", "needs-auth", "pending", "disabled", "not_configured"]>;
            source: ZodOptional<ZodEnum<["user", "workspace", "plugin", "builtin"]>>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }[];
            }, {
            servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
        };
        disable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
        };
        reload: {};
    }>;
    readonly plugins: ApiSchemaToInterface<{
        list: {
            result: ZodObject<    {
            plugins: ZodArray<ZodObject<    {
            name: ZodString;
            marketplace: ZodString;
            version: ZodOptional<ZodString>;
            enabled: ZodBoolean;
            }, "strip", ZodTypeAny, {
            enabled: boolean;
            name: string;
            marketplace: string;
            version?: string | undefined;
            }, {
            enabled: boolean;
            name: string;
            marketplace: string;
            version?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            plugins: {
            enabled: boolean;
            name: string;
            marketplace: string;
            version?: string | undefined;
            }[];
            }, {
            plugins: {
            enabled: boolean;
            name: string;
            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, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }[];
            }, {
            extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
        };
        disable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
        };
        reload: {};
    }>;
    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;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            }, {
            textResultForLlm: string;
            error?: string | undefined;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            }>]>>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            } | undefined;
            }, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            } | undefined;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    }>;
    readonly commands: ApiSchemaToInterface<{
        handlePendingCommand: {
            params: ZodObject<    {
            requestId: ZodString;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
            }, {
            requestId: string;
            error?: string | undefined;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    }>;
    readonly ui: ApiSchemaToInterface<{
        elicitation: {
            params: ZodObject<    {
            message: ZodString;
            requestedSchema: ZodObject<    {
            type: ZodLiteral<"object">;
            properties: ZodRecord<ZodString, ZodUnion<[ZodObject<    {
            type: ZodLiteral<"string">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            enum: ZodArray<ZodString, "many">;
            enumNames: ZodOptional<ZodArray<ZodString, "many">>;
            default: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            }, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"string">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            oneOf: ZodArray<ZodObject<    {
            const: ZodString;
            title: ZodString;
            }, "strip", ZodTypeAny, {
            title: string;
            const: string;
            }, {
            title: string;
            const: string;
            }>, "many">;
            default: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }, {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"array">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minItems: ZodOptional<ZodNumber>;
            maxItems: ZodOptional<ZodNumber>;
            items: ZodObject<    {
            type: ZodLiteral<"string">;
            enum: ZodArray<ZodString, "many">;
            }, "strip", ZodTypeAny, {
            type: "string";
            enum: string[];
            }, {
            type: "string";
            enum: string[];
            }>;
            default: ZodOptional<ZodArray<ZodString, "many">>;
            }, "strip", ZodTypeAny, {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }, {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"array">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minItems: ZodOptional<ZodNumber>;
            maxItems: ZodOptional<ZodNumber>;
            items: ZodObject<    {
            anyOf: ZodArray<ZodObject<    {
            const: ZodString;
            title: ZodString;
            }, "strip", ZodTypeAny, {
            title: string;
            const: string;
            }, {
            title: string;
            const: string;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            anyOf: {
            title: string;
            const: string;
            }[];
            }, {
            anyOf: {
            title: string;
            const: string;
            }[];
            }>;
            default: ZodOptional<ZodArray<ZodString, "many">>;
            }, "strip", ZodTypeAny, {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }, {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"boolean">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            default: ZodOptional<ZodBoolean>;
            }, "strip", ZodTypeAny, {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }, {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"string">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minLength: ZodOptional<ZodNumber>;
            maxLength: ZodOptional<ZodNumber>;
            format: ZodOptional<ZodEnum<["email", "uri", "date", "date-time"]>>;
            default: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            }, {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            }>, ZodObject<    {
            type: ZodEnum<["number", "integer"]>;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minimum: ZodOptional<ZodNumber>;
            maximum: ZodOptional<ZodNumber>;
            default: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }, {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>]>>;
            required: ZodOptional<ZodArray<ZodString, "many">>;
            }, "strip", ZodTypeAny, {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            }, {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            }>;
            }, "strip", ZodTypeAny, {
            message: string;
            requestedSchema: {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            };
            }, {
            message: string;
            requestedSchema: {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            };
            }>;
            result: ZodObject<    {
            action: ZodEnum<["accept", "decline", "cancel"]>;
            content: ZodOptional<ZodRecord<ZodString, ZodUnion<[ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString, "many">]>>>;
            }, "strip", ZodTypeAny, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }>;
        };
        handlePendingElicitation: {
            params: ZodObject<    {
            requestId: ZodString;
            result: ZodObject<    {
            action: ZodEnum<["accept", "decline", "cancel"]>;
            content: ZodOptional<ZodRecord<ZodString, ZodUnion<[ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString, "many">]>>>;
            }, "strip", ZodTypeAny, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }>;
            }, "strip", ZodTypeAny, {
            result: {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            };
            requestId: string;
            }, {
            result: {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            };
            requestId: string;
            }>;
            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;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            }, {
            message: string;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-by-permission-request-hook">;
            message: ZodOptional<ZodString>;
            interrupt: ZodOptional<ZodBoolean>;
            }, "strip", ZodTypeAny, {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            }, {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            }>]>;
            }, "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;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            };
            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;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            };
            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" | "warning" | "info" | undefined;
    }) => {
        eventId: string;
    } | Promise<{
        eventId: string;
    }>;
    readonly history: ApiSchemaToInterface<{
        compact: {
            result: ZodObject<    {
            success: ZodBoolean;
            tokensRemoved: ZodNumber;
            messagesRemoved: ZodNumber;
            contextWindow: ZodOptional<ZodObject<    {
            tokenLimit: ZodNumber;
            currentTokens: ZodNumber;
            messagesLength: ZodNumber;
            systemTokens: ZodOptional<ZodNumber>;
            conversationTokens: ZodOptional<ZodNumber>;
            toolDefinitionsTokens: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            }, {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            }>>;
            }, "strip", ZodTypeAny, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            contextWindow?: {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            } | undefined;
            }, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            contextWindow?: {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            } | undefined;
            }>;
        };
        truncate: {
            params: ZodObject<    {
            eventId: ZodString;
            }, "strip", ZodTypeAny, {
            eventId: string;
            }, {
            eventId: string;
            }>;
            result: ZodObject<    {
            eventsRemoved: ZodNumber;
            }, "strip", ZodTypeAny, {
            eventsRemoved: number;
            }, {
            eventsRemoved: number;
            }>;
        };
    }>;
    readonly usage: ApiSchemaToInterface<{
        getMetrics: {
            result: ZodObject<    {
            totalPremiumRequestCost: ZodNumber;
            totalUserRequests: ZodNumber;
            totalApiDurationMs: ZodNumber;
            sessionStartTime: ZodNumber;
            codeChanges: ZodObject<    {
            linesAdded: ZodNumber;
            linesRemoved: ZodNumber;
            filesModifiedCount: ZodNumber;
            }, "strip", ZodTypeAny, {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            }, {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            }>;
            modelMetrics: ZodRecord<ZodString, ZodObject<    {
            requests: ZodObject<    {
            count: ZodNumber;
            cost: ZodNumber;
            }, "strip", ZodTypeAny, {
            count: number;
            cost: number;
            }, {
            count: number;
            cost: number;
            }>;
            usage: ZodObject<    {
            inputTokens: ZodNumber;
            outputTokens: ZodNumber;
            cacheReadTokens: ZodNumber;
            cacheWriteTokens: ZodNumber;
            reasoningTokens: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            }, {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            }>;
            }, "strip", ZodTypeAny, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }>>;
            currentModel: ZodOptional<ZodString>;
            lastCallInputTokens: ZodNumber;
            lastCallOutputTokens: ZodNumber;
            }, "strip", ZodTypeAny, {
            totalApiDurationMs: number;
            sessionStartTime: number;
            codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            };
            modelMetrics: Record<string, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }>;
            totalPremiumRequestCost: number;
            totalUserRequests: number;
            lastCallInputTokens: number;
            lastCallOutputTokens: number;
            currentModel?: string | undefined;
            }, {
            totalApiDurationMs: number;
            sessionStartTime: number;
            codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            };
            modelMetrics: Record<string, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }>;
            totalPremiumRequestCost: number;
            totalUserRequests: number;
            lastCallInputTokens: number;
            lastCallOutputTokens: number;
            currentModel?: string | undefined;
            }>;
        };
    }>;
    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;
    /**
     * Optional callback to flush pending I/O (e.g., buffered events from SessionWriter)
     * before destructive operations like truncation. Set by the session manager.
     */
    private _flushCallback?;
    /** Register a callback to flush pending writes. Called by session manager during setup. */
    setFlushCallback(cb: () => Promise<void>): void;
    /** Flush any pending writes to disk. No-op if no flush callback is registered. */
    flushPendingWrites(): Promise<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(): IFeatureFlagService;
    /** Whether experimental mode is enabled for this session */
    isExperimentalMode: boolean;
    /** Whether this session was already in use by another client at start/resume time */
    alreadyInUse: boolean;
    /** Get the installed plugins for this session */
    getInstalledPlugins(): readonly InstalledPlugin[] | undefined;
    /**
     * Whether this session still has active work that should prevent stale cleanup.
     * Subclasses can override to include implementation-specific activity signals.
     */
    get hasActiveWork(): boolean;
    /** 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>;
        /** Optional secret store for resolving ${secret:...} placeholders (CLI only). */
        secretStore?: McpSecretStoreInterface;
    }): Promise<StartServersResult>;
    /**
     * 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;
    private lastEventId;
    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 compactionCheckpointMessageRef;
    private compactionCheckpointEventIndex;
    private eventProcessingQueue;
    private eventHandlers;
    private wildcardEventHandlers;
    private usageMetricsTracker;
    protected integrationId: string;
    protected availableTools?: string[];
    protected excludedTools?: string[];
    protected defaultAgentExcludedTools?: string[];
    protected enableScriptSafety?: boolean;
    protected shellInitProfile?: ShellInitProfile;
    protected shellProcessFlags?: string[];
    protected sandboxConfig?: SandboxConfig;
    /** Cached ShellConfig, invalidated when options change. */
    protected resolvedShellConfig?: ShellConfig;
    protected logInteractiveShells?: boolean;
    protected mcpServers?: Record<string, MCPServerConfig>;
    protected mcpHost?: McpHost;
    /** Resolver for OTel trace context on MCP tool calls. Set by the session manager. */
    protected _mcpTraceContextResolver?: TraceContextResolver;
    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;
    /** Ad-hoc hooks added dynamically at runtime, keyed by an owner ID */
    protected adHocHooks: Map<string, QueryHooks>;
    protected customAgents?: SweCustomAgent[];
    protected selectedCustomAgent?: SweCustomAgent;
    protected customAgentsLocalOnly: boolean;
    protected instructionDirectories?: string[];
    protected organizationCustomInstructions?: string;
    protected skipCustomInstructions: boolean;
    protected disabledInstructionSources?: ReadonlySet<string>;
    protected coauthorEnabled?: boolean;
    protected systemMessageConfig?: SystemMessageConfig;
    protected sectionTransformFn?: SectionTransformFn;
    protected workingDir: string;
    protected featureFlags?: FeatureFlags;
    protected featureFlagService: IFeatureFlagService;
    protected skillDirectories?: string[];
    protected enableConfigDiscovery: boolean;
    protected disabledSkills?: Set<string>;
    protected disabledMcpServers?: string[];
    protected _loadedSkills: Skill[];
    protected _skillsLoaded: boolean;
    protected _skillsLoadingPromise?: Promise<void>;
    protected _agentsLoadingPromise?: Promise<void>;
    private _reloadAvailableModels?;
    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?: DisposableTelemetrySender;
    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;
    /** Virtual filesystem for session-scoped storage (events, workspace, temp files). */
    readonly sessionFs: SessionFs;
    protected authInfo?: AuthInfo;
    protected copilotUrl?: string;
    protected provider?: ProviderConfig;
    protected modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
    protected reasoningEffort?: ReasoningEffortOption;
    protected enableReasoningSummaries?: boolean;
    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;
    /**
     * Fire a notification hook for a permission prompt being shown to the user.
     * Called by the CLI when a permission prompt is actually presented, not when auto-approved.
     * No-op on the base class; overridden by LocalSession which has the hook infrastructure.
     */
    notifyPermissionPrompt(_message: string): void;
    /**
     * Requests permission with hook pre-evaluation.
     * Runs permissionRequest hooks (from both config and ad-hoc sources) before
     * falling through to the standard PendingRequestStore permission flow.
     * This is the single entry point for all permission requests, ensuring hooks
     * are enforced for all consumers (CLI, SDK, ACP) consistently.
     */
    protected requestPermissionWithHooks(permissionRequest: PermissionRequest): Promise<PermissionRequestResult>;
    /** 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;
    /** Respond to a pending sampling request by its ID. */
    respondToSampling(requestId: string, response?: CreateMessageResultWithTools): void;
    /**
     * Try to respond to a pending elicitation request by its ID.
     * Returns true if the request was found and resolved, false if it was already resolved
     * by another client (race-safe: first responder wins).
     */
    tryRespondToElicitation(requestId: string, response: ElicitResult): boolean;
    /**
     * 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;
    /** Request a UI elicitation dialog. Used by session.ui.* API methods. */
    requestUiElicitation(request: ElicitRequestFormParams): Promise<ElicitResult>;
    /**
     * Whether this session supports UI dialogs (confirm, select, input).
     * Note: getEffectiveCapabilities() always returns a concrete Set, so the
     * hasCapability fallback for undefined (returns true) won't trigger here.
     */
    supportsElicitation(): boolean;
    /**
     * Assert that a capability is enabled for this session.
     * Throws if the capability is missing, with a message including the capability name.
     */
    assertCapability(capability: SessionCapability): void;
    /**
     * Dynamically add a capability to this session.
     * Returns true if the capability was newly added, false if already present.
     */
    addCapability(capability: SessionCapability): boolean;
    /**
     * Dynamically remove a capability from this session.
     * Returns true if the capability was removed, false if it wasn't present.
     * Cancels any pending requests that depend on the removed capability.
     */
    removeCapability(capability: SessionCapability): boolean;
    /** 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;
    /** SDK-registered commands keyed by name. */
    private readonly sdkCommands;
    /** Register SDK commands. Upserts by name. Emits `commands.changed`. */
    registerSdkCommands(commands: ProtocolCommandDefinition[]): void;
    /** Unregister SDK commands by name. Returns number unregistered. Emits `commands.changed`. */
    unregisterSdkCommands(names: string[]): number;
    /** Get all currently registered SDK commands. */
    getSdkCommands(): ProtocolCommandDefinition[];
    /** Respond to a pending command execution request by its ID. */
    respondToCommandExecution(requestId: string, error?: string): void;
    /** Execute a registered command (emits command.queued, server routes to owning connection). */
    executeCommand(commandName: string, args: string): Promise<CommandExecutionResult>;
    /** Reject pending command executions for specific command names (e.g., on client disconnect). */
    rejectCommandExecutionsForNames(commandNames: Set<string>, error: Error): void;
    private emitSdkCommandsChanged;
    /** Respond to a pending exit plan mode request by its ID. */
    respondToExitPlanMode(requestId: string, response: ExitPlanModeResponse): void;
    /**
     * Whether a direct (in-process) exit plan mode callback is set.
     * When true, the callback already handles both local and remote responses
     * (via prompt manager wrapping), so event listeners should NOT independently
     * dispatch to remote clients to avoid duplicate requests.
     */
    hasDirectExitPlanModeHandler(): boolean;
    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(coreServices: CoreServices, 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;
    };
    /**
     * Tracks whether `sessionStart` hooks have already been fired for this session.
     * Used to ensure sessionStart hooks execute only once per session, even when
     * `send()` is called multiple times in interactive mode.
     */
    protected _sessionStartHooksFired: boolean;
    /**
     * Cached `additionalContext` returned by `sessionStart` hooks.
     * Injected into every turn's messages so later prompts still see the context.
     */
    protected _sessionStartAdditionalContext: string | undefined;
    /**
     * When true, this session was restored from persisted events via `fromEvents()`.
     * Used to set the correct `source` field on `sessionStart` hooks.
     */
    protected _createdFromEvents: boolean;
    /**
     * When true, `sessionEnd` hooks are NOT fired at the end of each `runAgenticLoop()`.
     * Instead, the caller (e.g., CLI interactive mode) is responsible for calling
     * `fireSessionEndHooks()` explicitly when the session truly ends.
     */
    protected _deferSessionEnd: boolean;
    /** Memoized in-flight promise so concurrent callers await the same execution. */
    private _sessionEndHooksPromise;
    /**
     * Opt in to deferred sessionEnd hook execution. When called, sessionEnd hooks
     * will NOT fire at the end of each agentic loop. The caller must explicitly call
     * `fireSessionEndHooks()` when the session is done (e.g., on interactive mode shutdown).
     *
     * This is intended for interactive sessions where multiple `send()` calls share
     * one logical session lifetime.
     */
    deferSessionEnd(): void;
    /**
     * Fire `sessionEnd` hooks exactly once. Subsequent calls await the same in-flight
     * promise, ensuring hooks complete before the process exits even when shutdown()
     * starts them fire-and-forget and a pre-shutdown callback later awaits.
     *
     * @param reason - Why the session ended
     * @param error - Optional error that caused the session to end
     */
    fireSessionEndHooks(reason?: SessionEndHookInput["reason"], error?: Error): Promise<void>;
    /**
     * 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 (coreServices: CoreServices, _options: O) => S, events: SessionEvent[], coreServices: CoreServices, options?: O): Promise<S>;
    /**
     * Returns the current authentication information for this session, if set.
     */
    getAuthInfo(): AuthInfo | undefined;
    /** Returns a snapshot of the current sub-agent concurrency state. */
    getSubAgentLimiterInfo(): SubAgentLimiterInfo | undefined;
    /**
     * 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;
    /**
     * Adds ad-hoc hooks that are dynamically registered at runtime (e.g., from SDK extension connections).
     * These are merged with config-based hooks (`this.hooks`) at execution time via `getEffectiveHooks()`.
     * @param ownerId - Unique key for this hook set (e.g., connection ID). Replaces any existing hooks for this owner.
     */
    addAdHocHooks(ownerId: string, hooks: QueryHooks): void;
    /**
     * Removes ad-hoc hooks previously registered with `addAdHocHooks`.
     */
    removeAdHocHooks(ownerId: string): void;
    /**
     * Returns the effective hooks: config-based hooks merged with all ad-hoc hooks.
     * This is the single source of truth for hook execution.
     */
    protected getEffectiveHooks(): QueryHooks | undefined;
    /**
     * 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: DisposableTelemetrySender | undefined): void;
    setTelemetryFeatureOverrides(overrides: Record<string, string>): void;
    /** Set the resolver for OTel trace context propagation on MCP tool calls. */
    setMcpTraceContextResolver(resolver: TraceContextResolver | 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;
    protected emitUserMessageSentimentTelemetry(userMessage: string, source: string | undefined, interactionId: string, parentAgentTaskId: string): Promise<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 available models for agent validation (model warnings).
     * Returns undefined by default; overridden in LocalSession to fetch from API.
     */
    protected getAvailableModelsForAgentValidation(): Promise<Model[] | undefined>;
    /**
     * 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[];
    /**
     * Registers a callback that is invoked whenever the set of available tools changes.
     * The callback receives the current tool definitions and the model they were resolved for.
     *
     * @param callback - Called with the current tools and model on each update
     * @returns A function that unsubscribes the callback
     */
    onToolsUpdate(callback: (tools: Array<{
        name: string;
        description: string;
        input_schema?: unknown;
    }>, model: string) => void): () => void;
    private getToolCallSummary;
    private formatBackgroundToolActivity;
    /**
     * 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). Non-ephemeral events
     * are added to the session history; ephemeral events are dispatched to handlers but
     * never stored in `this.events`.
     *
     * @param eventType - The type of event to emit
     * @param data - The event data payload
     * @param ephemeral - Whether this event is ephemeral (not stored in events array, default: false)
     * @returns The generated event ID
     */
    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>): string;
    /**
     * 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>): string;
    /** Adapter that bridges session emit to the HookEventEmitter interface for executeHooks. */
    protected readonly hookEventEmitter: HookEventEmitter;
    /** Returns the loaded hooks configuration, if any. */
    getHooks(): QueryHooks | undefined;
    /** Returns the hook event emitter for hook telemetry. */
    getHookEventEmitter(): 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 additional directories to search for custom instruction files.
     *
     * @returns Array of directory paths, or undefined if not set
     */
    getInstructionDirectories(): string[] | undefined;
    /**
     * 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 batched transform callback for system prompt sections.
     * Called by the SDK server layer to bind a connection-specific callback
     * that forwards transform requests to the SDK client via JSON-RPC.
     */
    setSectionTransformFn(fn: SectionTransformFn | undefined): void;
    /**
     * 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 working directory (user's repo/project directory) for this session. */
    getWorkingDirectory(): string;
    /**
     * 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.
     *
     * @param model - The model identifier to switch to
     * @param reasoningEffort - Optional reasoning effort level for the new model
     * @param modelCapabilitiesOverrides - Optional capability overrides; cleared if omitted
     */
    setSelectedModel(model: string, reasoningEffort?: ReasoningEffortOption, modelCapabilitiesOverrides?: ModelCapabilitiesOverride): Promise<void>;
    protected applyModelChange(model: string, reasoningEffort?: ReasoningEffortOption, modelCapabilitiesOverrides?: ModelCapabilitiesOverride): 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>;
    /**
     * 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;
    /**
     * Reload custom agents. Clears the current list, re-runs discovery, and emits
     * a `session.custom_agents_updated` event. If the previously selected agent is
     * still available after reload, the selection is preserved.
     */
    reloadCustomAgents(): Promise<void>;
    /**
     * Clears compaction checkpoint state. Called after compaction completes (success or failure)
     * and when cancelling a background compaction to avoid retaining stale references.
     */
    protected resetCompactionCheckpoint(): void;
    /**
     * 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>;
            modelCapabilities: ZodOptional<ZodObject<    {
            supports: ZodOptional<ZodOptional<ZodObject<    {
            vision: ZodOptional<ZodOptional<ZodBoolean>>;
            reasoningEffort: ZodOptional<ZodOptional<ZodBoolean>>;
            }, "strip", ZodTypeAny, {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            }, {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            }>>>;
            limits: ZodOptional<ZodOptional<ZodObject<    {
            max_prompt_tokens: ZodOptional<ZodOptional<ZodNumber>>;
            max_output_tokens: ZodOptional<ZodOptional<ZodNumber>>;
            max_context_window_tokens: ZodOptional<ZodOptional<ZodNumber>>;
            vision: ZodOptional<ZodOptional<ZodObject<    {
            supported_media_types: ZodOptional<ZodArray<ZodString, "many">>;
            max_prompt_images: ZodOptional<ZodNumber>;
            max_prompt_image_size: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            }, {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            }>>>;
            }, "strip", ZodTypeAny, {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            }, {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            }>>>;
            }, "strip", ZodTypeAny, {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            }, {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            }>>;
            }, "strip", ZodTypeAny, {
            modelId: string;
            reasoningEffort?: string | undefined;
            modelCapabilities?: {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            } | undefined;
            }, {
            modelId: string;
            reasoningEffort?: string | undefined;
            modelCapabilities?: {
            limits?: {
            max_output_tokens?: number | undefined;
            vision?: {
            max_prompt_image_size?: number | undefined;
            max_prompt_images?: number | undefined;
            supported_media_types?: string[] | undefined;
            } | undefined;
            max_prompt_tokens?: number | undefined;
            max_context_window_tokens?: number | undefined;
            } | undefined;
            supports?: {
            vision?: boolean | undefined;
            reasoningEffort?: boolean | undefined;
            } | undefined;
            } | undefined;
            }>;
            result: ZodObject<    {
            modelId: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            modelId?: string | undefined;
            }, {
            modelId?: string | undefined;
            }>;
        };
    };
    mode: {
        get: {
            result: ZodEnum<["interactive", "plan", "autopilot"]>;
        };
        set: {
            params: ZodObject<    {
            mode: ZodEnum<["interactive", "plan", "autopilot"]>;
            }, "strip", ZodTypeAny, {
            mode: "interactive" | "autopilot" | "plan";
            }, {
            mode: "interactive" | "autopilot" | "plan";
            }>;
        };
    };
    name: {
        get: {
            result: ZodObject<    {
            name: ZodNullable<ZodString>;
            }, "strip", ZodTypeAny, {
            name: string | null;
            }, {
            name: string | null;
            }>;
        };
        set: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
        };
    };
    plan: {
        read: {
            result: ZodObject<    {
            exists: ZodBoolean;
            content: ZodNullable<ZodString>;
            path: ZodNullable<ZodString>;
            }, "strip", ZodTypeAny, {
            path: string | null;
            content: string | null;
            exists: boolean;
            }, {
            path: string | null;
            content: string | null;
            exists: boolean;
            }>;
        };
        update: {
            params: ZodObject<    {
            content: ZodString;
            }, "strip", ZodTypeAny, {
            content: string;
            }, {
            content: string;
            }>;
        };
        delete: {};
    };
    workspaces: {
        getWorkspace: {
            result: ZodObject<    {
            workspace: ZodNullable<ZodObject<    {
            id: ZodString;
            cwd: ZodOptional<ZodString>;
            git_root: ZodOptional<ZodString>;
            repository: ZodOptional<ZodString>;
            host_type: ZodOptional<ZodEnum<["github", "ado"]>>;
            branch: ZodOptional<ZodString>;
            summary: ZodOptional<ZodString>;
            name: ZodOptional<ZodString>;
            summary_count: ZodDefault<ZodNumber>;
            created_at: ZodOptional<ZodString>;
            updated_at: ZodOptional<ZodString>;
            mc_task_id: ZodOptional<ZodString>;
            mc_session_id: ZodOptional<ZodString>;
            mc_last_event_id: ZodOptional<ZodString>;
            session_sync_level: ZodOptional<ZodNativeEnum<MissionControlIndexingLevel>>;
            pr_create_sync_dismissed: ZodOptional<ZodBoolean>;
            chronicle_sync_dismissed: ZodOptional<ZodBoolean>;
            }, "strip", ZodTypeAny, {
            id: string;
            summary_count: number;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            }, {
            id: string;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            }>>;
            }, "strip", ZodTypeAny, {
            workspace: {
            id: string;
            summary_count: number;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            } | null;
            }, {
            workspace: {
            id: string;
            cwd?: string | undefined;
            name?: string | undefined;
            branch?: string | undefined;
            summary?: 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;
            session_sync_level?: MissionControlIndexingLevel | undefined;
            pr_create_sync_dismissed?: boolean | undefined;
            chronicle_sync_dismissed?: boolean | undefined;
            } | null;
            }>;
        };
        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, {
            path: string;
            content: string;
            }, {
            path: string;
            content: string;
            }>;
        };
    };
    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: {};
        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, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }, {
            skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
        };
        disable: {
            params: ZodObject<    {
            name: ZodString;
            }, "strip", ZodTypeAny, {
            name: string;
            }, {
            name: string;
            }>;
        };
        reload: {};
    };
    mcp: {
        list: {
            result: ZodObject<    {
            servers: ZodArray<ZodObject<    {
            name: ZodString;
            status: ZodEnum<["connected", "failed", "needs-auth", "pending", "disabled", "not_configured"]>;
            source: ZodOptional<ZodEnum<["user", "workspace", "plugin", "builtin"]>>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }[];
            }, {
            servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "user" | "workspace" | "plugin" | "builtin" | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
        };
        disable: {
            params: ZodObject<    {
            serverName: ZodString;
            }, "strip", ZodTypeAny, {
            serverName: string;
            }, {
            serverName: string;
            }>;
        };
        reload: {};
    };
    plugins: {
        list: {
            result: ZodObject<    {
            plugins: ZodArray<ZodObject<    {
            name: ZodString;
            marketplace: ZodString;
            version: ZodOptional<ZodString>;
            enabled: ZodBoolean;
            }, "strip", ZodTypeAny, {
            enabled: boolean;
            name: string;
            marketplace: string;
            version?: string | undefined;
            }, {
            enabled: boolean;
            name: string;
            marketplace: string;
            version?: string | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            plugins: {
            enabled: boolean;
            name: string;
            marketplace: string;
            version?: string | undefined;
            }[];
            }, {
            plugins: {
            enabled: boolean;
            name: string;
            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, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }[];
            }, {
            extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
            pid?: number | undefined;
            }[];
            }>;
        };
        enable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
        };
        disable: {
            params: ZodObject<    {
            id: ZodString;
            }, "strip", ZodTypeAny, {
            id: string;
            }, {
            id: string;
            }>;
        };
        reload: {};
    };
    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;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            }, {
            textResultForLlm: string;
            error?: string | undefined;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            }>]>>;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            } | undefined;
            }, {
            requestId: string;
            error?: string | undefined;
            result?: string | {
            textResultForLlm: string;
            error?: string | undefined;
            resultType?: string | undefined;
            toolTelemetry?: Record<string, unknown> | undefined;
            } | undefined;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    };
    commands: {
        handlePendingCommand: {
            params: ZodObject<    {
            requestId: ZodString;
            error: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
            }, {
            requestId: string;
            error?: string | undefined;
            }>;
            result: ZodObject<    {
            success: ZodBoolean;
            }, "strip", ZodTypeAny, {
            success: boolean;
            }, {
            success: boolean;
            }>;
        };
    };
    sendTelemetry: {
        params: ZodObject<    {
        kind: ZodString;
        properties: ZodOptional<ZodRecord<ZodString, ZodString>>;
        restrictedProperties: ZodOptional<ZodRecord<ZodString, ZodString>>;
        metrics: ZodOptional<ZodRecord<ZodString, ZodNumber>>;
        }, "strip", ZodTypeAny, {
        kind: string;
        properties?: Record<string, string> | undefined;
        restrictedProperties?: Record<string, string> | undefined;
        metrics?: Record<string, number> | undefined;
        }, {
        kind: string;
        properties?: Record<string, string> | undefined;
        restrictedProperties?: Record<string, string> | undefined;
        metrics?: Record<string, number> | undefined;
        }>;
    };
    ui: {
        elicitation: {
            params: ZodObject<    {
            message: ZodString;
            requestedSchema: ZodObject<    {
            type: ZodLiteral<"object">;
            properties: ZodRecord<ZodString, ZodUnion<[ZodObject<    {
            type: ZodLiteral<"string">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            enum: ZodArray<ZodString, "many">;
            enumNames: ZodOptional<ZodArray<ZodString, "many">>;
            default: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            }, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"string">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            oneOf: ZodArray<ZodObject<    {
            const: ZodString;
            title: ZodString;
            }, "strip", ZodTypeAny, {
            title: string;
            const: string;
            }, {
            title: string;
            const: string;
            }>, "many">;
            default: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }, {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"array">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minItems: ZodOptional<ZodNumber>;
            maxItems: ZodOptional<ZodNumber>;
            items: ZodObject<    {
            type: ZodLiteral<"string">;
            enum: ZodArray<ZodString, "many">;
            }, "strip", ZodTypeAny, {
            type: "string";
            enum: string[];
            }, {
            type: "string";
            enum: string[];
            }>;
            default: ZodOptional<ZodArray<ZodString, "many">>;
            }, "strip", ZodTypeAny, {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }, {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"array">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minItems: ZodOptional<ZodNumber>;
            maxItems: ZodOptional<ZodNumber>;
            items: ZodObject<    {
            anyOf: ZodArray<ZodObject<    {
            const: ZodString;
            title: ZodString;
            }, "strip", ZodTypeAny, {
            title: string;
            const: string;
            }, {
            title: string;
            const: string;
            }>, "many">;
            }, "strip", ZodTypeAny, {
            anyOf: {
            title: string;
            const: string;
            }[];
            }, {
            anyOf: {
            title: string;
            const: string;
            }[];
            }>;
            default: ZodOptional<ZodArray<ZodString, "many">>;
            }, "strip", ZodTypeAny, {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }, {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"boolean">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            default: ZodOptional<ZodBoolean>;
            }, "strip", ZodTypeAny, {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }, {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>, ZodObject<    {
            type: ZodLiteral<"string">;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minLength: ZodOptional<ZodNumber>;
            maxLength: ZodOptional<ZodNumber>;
            format: ZodOptional<ZodEnum<["email", "uri", "date", "date-time"]>>;
            default: ZodOptional<ZodString>;
            }, "strip", ZodTypeAny, {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            }, {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            }>, ZodObject<    {
            type: ZodEnum<["number", "integer"]>;
            title: ZodOptional<ZodString>;
            description: ZodOptional<ZodString>;
            minimum: ZodOptional<ZodNumber>;
            maximum: ZodOptional<ZodNumber>;
            default: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }, {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>]>>;
            required: ZodOptional<ZodArray<ZodString, "many">>;
            }, "strip", ZodTypeAny, {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            }, {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            }>;
            }, "strip", ZodTypeAny, {
            message: string;
            requestedSchema: {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            };
            }, {
            message: string;
            requestedSchema: {
            type: "object";
            properties: Record<string, {
            type: "string";
            enum: string[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            enumNames?: string[] | undefined;
            } | {
            type: "string";
            oneOf: {
            title: string;
            const: string;
            }[];
            default?: string | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "array";
            items: {
            type: "string";
            enum: string[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "array";
            items: {
            anyOf: {
            title: string;
            const: string;
            }[];
            };
            default?: string[] | undefined;
            description?: string | undefined;
            title?: string | undefined;
            minItems?: number | undefined;
            maxItems?: number | undefined;
            } | {
            type: "boolean";
            default?: boolean | undefined;
            description?: string | undefined;
            title?: string | undefined;
            } | {
            type: "string";
            default?: string | undefined;
            minLength?: number | undefined;
            maxLength?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            format?: "date" | "email" | "uri" | "date-time" | undefined;
            } | {
            type: "number" | "integer";
            default?: number | undefined;
            minimum?: number | undefined;
            maximum?: number | undefined;
            description?: string | undefined;
            title?: string | undefined;
            }>;
            required?: string[] | undefined;
            };
            }>;
            result: ZodObject<    {
            action: ZodEnum<["accept", "decline", "cancel"]>;
            content: ZodOptional<ZodRecord<ZodString, ZodUnion<[ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString, "many">]>>>;
            }, "strip", ZodTypeAny, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }>;
        };
        handlePendingElicitation: {
            params: ZodObject<    {
            requestId: ZodString;
            result: ZodObject<    {
            action: ZodEnum<["accept", "decline", "cancel"]>;
            content: ZodOptional<ZodRecord<ZodString, ZodUnion<[ZodString, ZodNumber, ZodBoolean, ZodArray<ZodString, "many">]>>>;
            }, "strip", ZodTypeAny, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }, {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            }>;
            }, "strip", ZodTypeAny, {
            result: {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            };
            requestId: string;
            }, {
            result: {
            action: "accept" | "cancel" | "decline";
            content?: Record<string, string | number | boolean | string[]> | undefined;
            };
            requestId: string;
            }>;
            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;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            }, {
            message: string;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            }>, ZodObject<    {
            kind: ZodLiteral<"denied-by-permission-request-hook">;
            message: ZodOptional<ZodString>;
            interrupt: ZodOptional<ZodBoolean>;
            }, "strip", ZodTypeAny, {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            }, {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            }>]>;
            }, "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;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            };
            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;
            path: string;
            kind: "denied-by-content-exclusion-policy";
            } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
            };
            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" | "warning" | "info" | undefined;
        }, {
        message: string;
        url?: string | undefined;
        ephemeral?: boolean | undefined;
        level?: "error" | "warning" | "info" | 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;
            }>;
        };
    };
    history: {
        compact: {
            result: ZodObject<    {
            success: ZodBoolean;
            tokensRemoved: ZodNumber;
            messagesRemoved: ZodNumber;
            contextWindow: ZodOptional<ZodObject<    {
            tokenLimit: ZodNumber;
            currentTokens: ZodNumber;
            messagesLength: ZodNumber;
            systemTokens: ZodOptional<ZodNumber>;
            conversationTokens: ZodOptional<ZodNumber>;
            toolDefinitionsTokens: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            }, {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            }>>;
            }, "strip", ZodTypeAny, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            contextWindow?: {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            } | undefined;
            }, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            contextWindow?: {
            tokenLimit: number;
            currentTokens: number;
            messagesLength: number;
            systemTokens?: number | undefined;
            conversationTokens?: number | undefined;
            toolDefinitionsTokens?: number | undefined;
            } | undefined;
            }>;
        };
        truncate: {
            params: ZodObject<    {
            eventId: ZodString;
            }, "strip", ZodTypeAny, {
            eventId: string;
            }, {
            eventId: string;
            }>;
            result: ZodObject<    {
            eventsRemoved: ZodNumber;
            }, "strip", ZodTypeAny, {
            eventsRemoved: number;
            }, {
            eventsRemoved: number;
            }>;
        };
    };
    usage: {
        getMetrics: {
            result: ZodObject<    {
            totalPremiumRequestCost: ZodNumber;
            totalUserRequests: ZodNumber;
            totalApiDurationMs: ZodNumber;
            sessionStartTime: ZodNumber;
            codeChanges: ZodObject<    {
            linesAdded: ZodNumber;
            linesRemoved: ZodNumber;
            filesModifiedCount: ZodNumber;
            }, "strip", ZodTypeAny, {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            }, {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            }>;
            modelMetrics: ZodRecord<ZodString, ZodObject<    {
            requests: ZodObject<    {
            count: ZodNumber;
            cost: ZodNumber;
            }, "strip", ZodTypeAny, {
            count: number;
            cost: number;
            }, {
            count: number;
            cost: number;
            }>;
            usage: ZodObject<    {
            inputTokens: ZodNumber;
            outputTokens: ZodNumber;
            cacheReadTokens: ZodNumber;
            cacheWriteTokens: ZodNumber;
            reasoningTokens: ZodOptional<ZodNumber>;
            }, "strip", ZodTypeAny, {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            }, {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            }>;
            }, "strip", ZodTypeAny, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }>>;
            currentModel: ZodOptional<ZodString>;
            lastCallInputTokens: ZodNumber;
            lastCallOutputTokens: ZodNumber;
            }, "strip", ZodTypeAny, {
            totalApiDurationMs: number;
            sessionStartTime: number;
            codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            };
            modelMetrics: Record<string, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }>;
            totalPremiumRequestCost: number;
            totalUserRequests: number;
            lastCallInputTokens: number;
            lastCallOutputTokens: number;
            currentModel?: string | undefined;
            }, {
            totalApiDurationMs: number;
            sessionStartTime: number;
            codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModifiedCount: number;
            };
            modelMetrics: Record<string, {
            usage: {
            outputTokens: number;
            inputTokens: number;
            cacheReadTokens: number;
            cacheWriteTokens: number;
            reasoningTokens?: number | undefined;
            };
            requests: {
            count: number;
            cost: number;
            };
            }>;
            totalPremiumRequestCost: number;
            totalUserRequests: number;
            lastCallInputTokens: number;
            lastCallOutputTokens: number;
            currentModel?: string | undefined;
            }>;
        };
    };
};

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: {};
    type: "session.background_tasks_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {};
    type: "session.background_tasks_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * # 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" | "elicitation";

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;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | 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;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | 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;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    type: "session.compaction_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    type: "session.compaction_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.compaction_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    type: "session.compaction_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    }, {
        cwd: string;
        branch?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        cwd: string;
        branch?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    };
    type: "session.context_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        cwd: string;
        branch?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    };
    type: "session.context_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionCustomAgentsUpdatedEvent = z.infer<typeof SessionCustomAgentsUpdatedEventSchema>;

/**
 * Emitted when custom agents have been loaded or reloaded.
 * This is an ephemeral event fired after loadCustomAgents() or reloadCustomAgents() completes.
 * Subscribers should use the event data for UI display; the full SweCustomAgent objects
 * (including prompt closures) are available via session.getAvailableCustomAgents().
 */
declare const SessionCustomAgentsUpdatedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.custom_agents_updated">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        agents: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            displayName: z.ZodString;
            description: z.ZodString;
            source: z.ZodString;
            tools: z.ZodArray<z.ZodString, "many">;
            userInvocable: z.ZodBoolean;
            model: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }, {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }>, "many">;
        warnings: z.ZodArray<z.ZodString, "many">;
        errors: z.ZodArray<z.ZodString, "many">;
    }, "strip", z.ZodTypeAny, {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    }, {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    };
    type: "session.custom_agents_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    };
    type: "session.custom_agents_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "session.error";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    };
    type: "session.error";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }, {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.resume";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.resume";
    id: string;
    parentId: string | null;
    timestamp: string;
    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.remote_steerable_changed">;
    data: z.ZodObject<{
        remoteSteerable: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        remoteSteerable: boolean;
    }, {
        remoteSteerable: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        remoteSteerable: boolean;
    };
    type: "session.remote_steerable_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        remoteSteerable: boolean;
    };
    type: "session.remote_steerable_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.error";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
    };
    type: "session.error";
    id: string;
    parentId: string | null;
    timestamp: string;
    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<{
        aborted: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        aborted?: boolean | undefined;
    }, {
        aborted?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        aborted?: boolean | undefined;
    };
    type: "session.idle";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        aborted?: boolean | undefined;
    };
    type: "session.idle";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "session.title_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        title: string;
    };
    type: "session.title_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "session.info";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
    };
    type: "session.info";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.warning";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    type: "session.warning";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }, {
        newModel: string;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        newModel: string;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    type: "session.model_change";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        newModel: string;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    type: "session.model_change";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.mode_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        previousMode: string;
        newMode: string;
    };
    type: "session.mode_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: "delete" | "update" | "create";
    }, {
        operation: "delete" | "update" | "create";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        operation: "delete" | "update" | "create";
    };
    type: "session.plan_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        operation: "delete" | "update" | "create";
    };
    type: "session.plan_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: "update" | "create";
    }, {
        path: string;
        operation: "update" | "create";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        path: string;
        operation: "update" | "create";
    };
    type: "session.workspace_file_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        path: string;
        operation: "update" | "create";
    };
    type: "session.workspace_file_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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, {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    }, {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    file: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                }, {
                    file: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: 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, {
                    type: "refusal";
                    refusal: string;
                }, {
                    type: "refusal";
                    refusal: string;
                }>]>, "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;
                    };
                    type: "function";
                    id: string;
                }, {
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                }>, 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, {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                }, {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                }>]>, "many">>;
            }, "strip", z.ZodTypeAny, {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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>;
                mcpServerName: z.ZodOptional<z.ZodString>;
                intentionSummary: z.ZodNullable<z.ZodString>;
                arguments: 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, {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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>;
                mcpServerName: 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, {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }, {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"failure">;
                    log: z.ZodString;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                }, {
                    type: "failure";
                    log: string;
                    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, {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                }, {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                }>]>;
                arguments: z.ZodUnknown;
                isHidden: z.ZodOptional<z.ZodBoolean>;
                isAlwaysExpanded: z.ZodOptional<z.ZodBoolean>;
                showNoContent: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.7", "claude-opus-4.6", "claude-opus-4.6-fast", "claude-opus-4.6-1m", "claude-opus-4.5", "claude-sonnet-4", "goldeneye", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5.2", "gpt-5.1", "gpt-5.4-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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    type: "session.import_legacy";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    type: "session.import_legacy";
    id: string;
    parentId: string | null;
    timestamp: string;
    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>;
        host: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }, {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    type: "session.handoff";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    type: "session.handoff";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }, {
        tokenLimit: number;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tokenLimit: number;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    type: "session.truncation";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tokenLimit: number;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    type: "session.truncation";
    id: string;
    parentId: string | null;
    timestamp: string;
    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 (this event and all events after it were removed) */
        upToEventId: z.ZodString;
        /** Number of events that were removed */
        eventsRemoved: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        eventsRemoved: number;
        upToEventId: string;
    }, {
        eventsRemoved: number;
        upToEventId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    type: "session.snapshot_rewind";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    type: "session.snapshot_rewind";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
                reasoningTokens: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }, {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }>;
        }, "strip", z.ZodTypeAny, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            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: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
    }, {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: 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: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
    };
    type: "session.shutdown";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
    };
    type: "session.shutdown";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    }, {
        cwd: string;
        branch?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        cwd: string;
        branch?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    };
    type: "session.context_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        cwd: string;
        branch?: string | undefined;
        repository?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        gitRoot?: string | undefined;
        baseCommit?: string | undefined;
        headCommit?: string | undefined;
    };
    type: "session.context_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.usage_info";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    type: "session.usage_info";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "session.compaction_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    type: "session.compaction_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | 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;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | 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;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    type: "session.compaction_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        error?: string | undefined;
        requestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        checkpointNumber?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        summaryContent?: string | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            input: number;
            output: number;
            cachedInput: number;
        } | undefined;
    };
    type: "session.compaction_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    }, {
        success?: boolean | undefined;
        summary?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        summary: string;
        success?: boolean | undefined;
    };
    type: "session.task_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success?: boolean | undefined;
        summary?: string | undefined;
    };
    type: "session.task_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    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";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        }, {
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        }>, 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;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        }, {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        }>, 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;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    }, {
        content: string;
        source?: string | undefined;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        source?: string | undefined;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    };
    type: "user.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        source?: string | undefined;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    };
    type: "user.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: {};
    type: "pending_messages.modified";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {};
    type: "pending_messages.modified";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "assistant.turn_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    type: "assistant.turn_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "assistant.intent";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        intent: string;
    };
    type: "assistant.intent";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "assistant.reasoning";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        reasoningId: string;
    };
    type: "assistant.reasoning";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "assistant.reasoning_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    type: "assistant.reasoning_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "assistant.streaming_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        totalResponseSizeBytes: number;
    };
    type: "assistant.streaming_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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>;
            /** Name of the MCP server hosting this tool */
            mcpServerName: 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;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            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>;
        requestId: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        messageId: string;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        content: string;
        messageId: string;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            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;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "assistant.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        messageId: string;
        requestId?: string | undefined;
        phase?: string | undefined;
        outputTokens?: number | undefined;
        interactionId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            arguments?: unknown;
            mcpServerName?: string | undefined;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "assistant.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "assistant.message_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    type: "assistant.message_delta";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "assistant.turn_end";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        turnId: string;
    };
    type: "assistant.turn_end";
    id: string;
    parentId: string | null;
    timestamp: string;
    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>;
        reasoningTokens: z.ZodOptional<z.ZodNumber>;
        cost: z.ZodOptional<z.ZodNumber>;
        duration: z.ZodOptional<z.ZodNumber>;
        ttftMs: z.ZodOptional<z.ZodNumber>;
        interTokenLatencyMs: 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, {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }, {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }>, "many">;
            totalNanoAiu: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }, {
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        }>>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }, {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    type: "assistant.usage";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        model: string;
        duration?: number | undefined;
        outputTokens?: number | undefined;
        inputTokens?: number | undefined;
        ttftMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        cost?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        parentToolCallId?: 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: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
            totalNanoAiu: number;
        } | undefined;
    };
    type: "assistant.usage";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "abort";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        reason: string;
    };
    type: "abort";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "tool.user_requested";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    type: "tool.user_requested";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "tool.execution_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "tool.execution_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "tool.execution_partial_result";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    type: "tool.execution_partial_result";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "tool.execution_progress";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    type: "tool.execution_progress";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            }, {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | 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;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }, {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | 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, {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            }, {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | 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, {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                }, {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                }>]>;
            }, "strip", z.ZodTypeAny, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            }, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            }>]>, "many">>;
        }, "strip", z.ZodTypeAny, {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        }, {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | 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, {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    }, {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    };
    type: "tool.execution_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    };
    type: "tool.execution_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    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>;
        /** Description of what the skill does (from frontmatter) */
        description: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    }, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    };
    type: "skill.invoked";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    };
    type: "skill.invoked";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "subagent.started";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    };
    type: "subagent.started";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        model: z.ZodOptional<z.ZodString>;
        totalToolCalls: z.ZodOptional<z.ZodNumber>;
        totalTokens: z.ZodOptional<z.ZodNumber>;
        durationMs: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.completed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.completed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        model: z.ZodOptional<z.ZodString>;
        totalToolCalls: z.ZodOptional<z.ZodNumber>;
        totalTokens: z.ZodOptional<z.ZodNumber>;
        durationMs: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.failed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.failed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "subagent.selected";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    type: "subagent.selected";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: {};
    type: "subagent.deselected";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {};
    type: "subagent.deselected";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "hook.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    type: "hook.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "hook.end";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    type: "hook.end";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "system.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    type: "system.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    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, {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: string | undefined;
        }, {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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;
    };
    type: "system.notification";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        kind: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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;
    };
    type: "system.notification";
    id: string;
    parentId: string | null;
    timestamp: string;
    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";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: 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>;
            canOfferSessionApproval: z.ZodBoolean;
        }, "strip", z.ZodTypeAny, {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: 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, {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        }, {
            path: string;
            kind: "read";
            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;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        }, {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            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>;
            action: z.ZodDefault<z.ZodEnum<["store", "vote"]>>;
            subject: z.ZodOptional<z.ZodString>;
            fact: z.ZodString;
            citations: z.ZodOptional<z.ZodString>;
            direction: z.ZodOptional<z.ZodEnum<["upvote", "downvote"]>>;
            reason: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: string | undefined;
        }, {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        }>]>;
        resolvedByHook: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    }, {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    };
    type: "permission.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        permissionRequest: {
            kind: "shell";
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            intention: string;
            fullCommandText: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            diff: string;
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "mcp";
            serverName: string;
            toolName: string;
            readOnly: boolean;
            toolTitle: string;
            toolCallId?: string | undefined;
            args?: any;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
            citations?: string | undefined;
            subject?: 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;
        resolvedByHook?: boolean | undefined;
    };
    type: "permission.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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", "denied-by-permission-request-hook"]>;
        }, "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" | "denied-by-permission-request-hook";
        }, {
            kind: "approved" | "denied-by-rules" | "denied-no-approval-rule-and-could-not-request-from-user" | "denied-interactively-by-user" | "denied-by-content-exclusion-policy" | "denied-by-permission-request-hook";
        }>;
    }, "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" | "denied-by-permission-request-hook";
        };
        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" | "denied-by-permission-request-hook";
        };
        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" | "denied-by-permission-request-hook";
        };
        requestId: string;
    };
    type: "permission.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    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" | "denied-by-permission-request-hook";
        };
        requestId: string;
    };
    type: "permission.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "user_input.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    type: "user_input.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
        answer: z.ZodOptional<z.ZodString>;
        wasFreeform: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    }, {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    type: "user_input.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    type: "user_input.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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, {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        }, {
            type: "object";
            properties: Record<string, unknown>;
            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, {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        }, {
            type: "object";
            properties: Record<string, unknown>;
            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, {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        }, {
            type: "object";
            properties: Record<string, unknown>;
            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;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
        elicitationSource?: string | undefined;
    } & {
        [k: string]: unknown;
    };
    type: "elicitation.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
        elicitationSource?: string | undefined;
    } & {
        [k: string]: unknown;
    };
    type: "elicitation.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
        action: z.ZodOptional<z.ZodEnum<["accept", "decline", "cancel"]>>;
        content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodString, "many">]>>>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    }, {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    };
    type: "elicitation.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        action?: "accept" | "cancel" | "decline" | undefined;
        content?: Record<string, string | number | boolean | string[]> | undefined;
    };
    type: "elicitation.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"sampling.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        mcpRequestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        mcpRequestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        requestId: z.ZodString;
        serverName: z.ZodString;
        mcpRequestId: z.ZodUnion<[z.ZodString, z.ZodNumber]>;
    }, z.ZodTypeAny, "passthrough">>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    type: "sampling.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    type: "sampling.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"sampling.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
    };
    type: "sampling.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "sampling.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "mcp.oauth_required";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
        } | undefined;
    };
    type: "mcp.oauth_required";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "mcp.oauth_completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "mcp.oauth_completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "external_tool.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    type: "external_tool.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "external_tool.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "external_tool.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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, {
        command: string;
        requestId: string;
    }, {
        command: string;
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        command: string;
        requestId: string;
    };
    type: "command.queued";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        command: string;
        requestId: string;
    };
    type: "command.queued";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"command.execute">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        command: z.ZodString;
        commandName: z.ZodString;
        args: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    }, {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    };
    type: "command.execute";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        command: string;
        requestId: string;
        args: string;
        commandName: string;
    };
    type: "command.execute";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "command.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
    };
    type: "command.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"commands.changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        commands: z.ZodArray<z.ZodObject<{
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description?: string | undefined;
        }, {
            name: string;
            description?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    }, {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    type: "commands.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    type: "commands.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"capabilities.changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        ui: z.ZodOptional<z.ZodObject<{
            elicitation: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            elicitation?: boolean | undefined;
        }, {
            elicitation?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    }, {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    };
    type: "capabilities.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        ui?: {
            elicitation?: boolean | undefined;
        } | undefined;
    };
    type: "capabilities.changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    }, {
        requestId: string;
        summary: string;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        summary: string;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    };
    type: "exit_plan_mode.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        summary: string;
        actions: string[];
        recommendedAction: string;
        planContent: string;
    };
    type: "exit_plan_mode.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
        approved: z.ZodOptional<z.ZodBoolean>;
        selectedAction: z.ZodOptional<z.ZodString>;
        autoApproveEdits: z.ZodOptional<z.ZodBoolean>;
        feedback: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    }, {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    };
    type: "exit_plan_mode.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        approved?: boolean | undefined;
        selectedAction?: string | undefined;
        autoApproveEdits?: boolean | undefined;
        feedback?: string | undefined;
    };
    type: "exit_plan_mode.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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;
    };
    type: "session.tools_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        model: string;
    };
    type: "session.tools_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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: {};
    type: "session.background_tasks_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {};
    type: "session.background_tasks_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }, {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    type: "session.skills_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    type: "session.skills_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.custom_agents_updated">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        agents: z.ZodArray<z.ZodObject<{
            id: z.ZodString;
            name: z.ZodString;
            displayName: z.ZodString;
            description: z.ZodString;
            source: z.ZodString;
            tools: z.ZodArray<z.ZodString, "many">;
            userInvocable: z.ZodBoolean;
            model: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }, {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }>, "many">;
        warnings: z.ZodArray<z.ZodString, "many">;
        errors: z.ZodArray<z.ZodString, "many">;
    }, "strip", z.ZodTypeAny, {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    }, {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    };
    type: "session.custom_agents_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        agents: {
            tools: string[];
            source: string;
            name: string;
            id: string;
            description: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        warnings: string[];
        errors: string[];
    };
    type: "session.custom_agents_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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", "needs-auth", "pending", "disabled", "not_configured"]>;
            source: z.ZodOptional<z.ZodString>;
            error: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }, {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    type: "session.mcp_servers_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    type: "session.mcp_servers_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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", "needs-auth", "pending", "disabled", "not_configured"]>;
    }, "strip", z.ZodTypeAny, {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    }, {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    };
    type: "session.mcp_server_status_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    };
    type: "session.mcp_server_status_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>, 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, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    }, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    };
    type: "session.extensions_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    };
    type: "session.extensions_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>]>;

/**
 * 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, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }, {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    }, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    };
    type: "session.extensions_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            source: "user" | "project";
            name: string;
            id: string;
        }[];
    };
    type: "session.extensions_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

/**
 * Abstract filesystem for session-scoped storage.
 *
 * Every {@link Session} has a `sessionFs` property that all session-scoped
 * file I/O (events, workspace, temp files, etc.) goes through. This decouples
 * the runtime from the host filesystem and enables SDK clients to supply their
 * own storage backend via JSON-RPC.
 *
 * The default implementation is {@link LocalSessionFs} which wraps `node:fs`.
 *
 * SDK clients can register as the session filesystem provider via
 * `sessionFs.setProvider`, which causes the server to create
 * {@link RpcSessionFs} instances rooted under the provider's session-state home
 * and route all I/O back to the client.
 *
 * Callers should construct paths using this instance's `sessionStatePath`,
 * `tmpdir`, and `join()` helpers. Methods treat the resulting string as a
 * SessionFs-native path and do not reinterpret it.
 */
declare abstract class SessionFs {
    /**
     * The initial working directory for the session.
     * This is the user's project directory. The runtime may change its own
     * mutable cwd later; this records the value at session creation time.
     */
    getInitialCwd(): string | undefined;
    /**
     * Root directory for session-scoped files (events, workspace,
     * checkpoints, temp files, etc.). May be undefined when the session
     * doesn't have a dedicated storage area (e.g., CCA runtime).
     */
    abstract readonly sessionStatePath: string | undefined;
    /**
     * Path convention used by this filesystem.
     * Consumers use this to construct paths with the correct separator
     * without calling back into the abstraction.
     */
    abstract readonly conventions: "windows" | "posix";
    /**
     * Absolute path for temporary files within this filesystem.
     * Large output handler and other temp-file consumers use this as their base directory.
     */
    abstract readonly tmpdir: string;
    /** Path separator for this filesystem's convention. */
    get sep(): string;
    /** Join path segments using this filesystem's convention separator. */
    join(...segments: string[]): string;
    /** Read a file's content as a UTF-8 string. */
    abstract readFile(path: string): Promise<string>;
    /** Stream a file's content. */
    abstract readFileStream(path: string, options: {
        split: "lines";
    }): AsyncIterable<string>;
    /** Write a string to a file, creating it if it doesn't exist, replacing if it does. */
    abstract writeFile(path: string, content: string, options?: {
        mode?: number;
    }): Promise<void>;
    /** Append a string to a file, creating it if it doesn't exist. */
    abstract appendFile(path: string, content: string, options?: {
        mode?: number;
    }): Promise<void>;
    /** Check whether a path exists. */
    abstract exists(path: string): Promise<boolean>;
    /** Get metadata for a file or directory. */
    abstract stat(path: string): Promise<SessionFsStat>;
    /** Create a directory. */
    abstract mkdir(path: string, options?: {
        recursive?: boolean;
        mode?: number;
    }): Promise<void>;
    /** List entries in a directory (names only, not full paths). */
    abstract readdir(path: string): Promise<string[]>;
    /** List entries in a directory with type information. */
    abstract readdirWithTypes(path: string): Promise<SessionFsDirEntry[]>;
    /** Remove a file or directory. */
    abstract rm(path: string, options?: {
        recursive?: boolean;
        force?: boolean;
    }): Promise<void>;
    /** Rename/move a file or directory. Used for atomic writes. */
    abstract rename(src: string, dest: string): Promise<void>;
}

/**
 * Directory entry with type information, returned by {@link SessionFs.readdirWithTypes}.
 */
declare interface SessionFsDirEntry {
    name: string;
    type: "file" | "directory";
}

/**
 * Stat result for a file or directory in the session filesystem.
 */
declare interface SessionFsStat {
    isFile: boolean;
    isDirectory: boolean;
    size: number;
    mtime: Date;
    birthtime: Date;
}

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>;
        host: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }, {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    type: "session.handoff";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        sourceType: "local" | "remote";
        handoffTime: string;
        host?: string | undefined;
        summary?: string | undefined;
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        context?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    type: "session.handoff";
    id: string;
    parentId: string | null;
    timestamp: string;
    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<{
        aborted: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        aborted?: boolean | undefined;
    }, {
        aborted?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        aborted?: boolean | undefined;
    };
    type: "session.idle";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        aborted?: boolean | undefined;
    };
    type: "session.idle";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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, {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    }, {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    }>;
                }, "strip", z.ZodTypeAny, {
                    file: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                }, {
                    file: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: 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, {
                    type: "refusal";
                    refusal: string;
                }, {
                    type: "refusal";
                    refusal: string;
                }>]>, "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;
                    };
                    type: "function";
                    id: string;
                }, {
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                }>, 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, {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                }, {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                }>]>, "many">>;
            }, "strip", z.ZodTypeAny, {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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>;
                mcpServerName: z.ZodOptional<z.ZodString>;
                intentionSummary: z.ZodNullable<z.ZodString>;
                arguments: 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, {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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>;
                mcpServerName: 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, {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }, {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                }>, z.ZodObject<{
                    type: z.ZodLiteral<"failure">;
                    log: z.ZodString;
                    markdown: z.ZodOptional<z.ZodBoolean>;
                }, "strip", z.ZodTypeAny, {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                }, {
                    type: "failure";
                    log: string;
                    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, {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                }, {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                }>]>;
                arguments: z.ZodUnknown;
                isHidden: z.ZodOptional<z.ZodBoolean>;
                isAlwaysExpanded: z.ZodOptional<z.ZodBoolean>;
                showNoContent: z.ZodOptional<z.ZodBoolean>;
            }, "strip", z.ZodTypeAny, {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            }, {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.7", "claude-opus-4.6", "claude-opus-4.6-fast", "claude-opus-4.6-1m", "claude-opus-4.5", "claude-sonnet-4", "goldeneye", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5.2", "gpt-5.1", "gpt-5.4-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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | 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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    type: "session.import_legacy";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: {
                        filename?: string | undefined;
                        file_date?: string | undefined;
                        file_id?: string | undefined;
                    };
                    type: "file";
                })[];
                name?: string | undefined;
            } | {
                role: "assistant";
                name?: string | undefined;
                tool_calls?: ({
                    function: {
                        name: string;
                        arguments: string;
                    };
                    type: "function";
                    id: string;
                } | {
                    type: "custom";
                    custom: {
                        input: string;
                        name: string;
                    };
                    id: string;
                })[] | undefined;
                audio?: {
                    id: string;
                } | null | undefined;
                content?: string | ({
                    text: string;
                    type: "text";
                } | {
                    type: "refusal";
                    refusal: string;
                })[] | 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";
            } | {
                type: "tool_call_requested";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                toolTitle?: string | undefined;
                partialOutput?: string | undefined;
                isHidden?: boolean | undefined;
                isAlwaysExpanded?: boolean | undefined;
                showNoContent?: boolean | undefined;
            } | {
                result: {
                    type: "success";
                    log: string;
                    markdown?: boolean | undefined;
                    detailedLog?: string | undefined;
                } | {
                    type: "failure";
                    log: string;
                    markdown?: boolean | undefined;
                } | {
                    type: "rejected";
                    markdown?: boolean | undefined;
                } | {
                    type: "denied";
                    log: string;
                    markdown?: boolean | undefined;
                };
                type: "tool_call_completed";
                name: string;
                callId: string;
                intentionSummary: string | null;
                arguments?: unknown;
                mcpServerName?: string | undefined;
                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.5" | "claude-opus-4.5" | "claude-opus-4.6" | "claude-opus-4.6-1m" | "claude-opus-4.6-fast" | "claude-sonnet-4.6" | "claude-opus-4.7" | "claude-haiku-4.5" | "claude-sonnet-4" | "gpt-5.2" | "gpt-5.3-codex" | "gpt-5.4" | "gpt-5.4-mini" | "gpt-5.1" | "gpt-5.2-codex" | "goldeneye" | undefined;
        };
        importTime: string;
        sourceFile: string;
    };
    type: "session.import_legacy";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.info";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
    };
    type: "session.info";
    id: string;
    parentId: string | null;
    timestamp: string;
    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", "needs-auth", "pending", "disabled", "not_configured"]>;
            source: z.ZodOptional<z.ZodString>;
            error: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }, {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }, {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    type: "session.mcp_servers_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        servers: {
            status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: string | undefined;
        }[];
    };
    type: "session.mcp_servers_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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", "needs-auth", "pending", "disabled", "not_configured"]>;
    }, "strip", z.ZodTypeAny, {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    }, {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    };
    type: "session.mcp_server_status_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        status: "disabled" | "pending" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
    };
    type: "session.mcp_server_status_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

export declare interface SessionMetadata {
    readonly sessionId: string;
    readonly startTime: Date;
    readonly modifiedTime: Date;
    readonly summary?: string;
    /** Optional human-friendly name (set via rename). */
    readonly name?: 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;
    };
    type: "session.mode_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        previousMode: string;
        newMode: string;
    };
    type: "session.mode_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }, {
        newModel: string;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        newModel: string;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    type: "session.model_change";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        newModel: string;
        previousModel?: string | undefined;
        reasoningEffort?: string | undefined;
        previousReasoningEffort?: string | undefined;
    };
    type: "session.model_change";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    /**
     * Explicit override for whether OpenAI reasoning summaries should be requested.
     * When omitted, the client falls back to its default or feature-flag-controlled behavior.
     */
    enableReasoningSummaries?: boolean;
    /**
     * Custom API provider configuration (BYOK - Bring Your Own Key).
     * When set, bypasses Copilot API authentication and uses this provider instead.
     */
    provider?: ProviderConfig;
    /** SDK-supplied overrides for model capabilities, deep-merged over runtime defaults. */
    modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
    featureFlags?: FeatureFlags;
    isExperimentalMode?: boolean;
    /** Whether this session supports remote steering via Mission Control. */
    remoteSteerable?: boolean;
    availableTools?: string[];
    excludedTools?: string[];
    /**
     * List of tool names to exclude from the default agent (the built-in agent
     * that handles turns when no custom agent is selected). These tools remain
     * available to custom sub-agents that reference them.
     */
    defaultAgentExcludedTools?: 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[];
    /** Sandbox configuration for shell commands. */
    sandboxConfig?: SandboxConfig;
    /** Whether to log raw interactive shell PTY data to the session state directory. */
    logInteractiveShells?: boolean;
    skillDirectories?: string[];
    /** Whether ambient repo/user config discovery is enabled for skills, commands, and custom agents. */
    enableConfigDiscovery?: boolean;
    disabledSkills?: Set<string>;
    installedPlugins?: InstalledPlugin[];
    mcpServers?: Record<string, MCPServerConfig>;
    envValueMode?: EnvValueMode;
    disabledMcpServers?: string[];
    customAgents?: SweCustomAgent[];
    selectedCustomAgent?: SweCustomAgent;
    /** When true, only load custom agents from local sources (skip remote org/enterprise agents). */
    customAgentsLocalOnly?: boolean;
    instructionDirectories?: string[];
    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;
    /** Optional pre-created session filesystem. When omitted, a LocalSessionFs backed by the local disk is used. */
    sessionFs?: SessionFs;
    workingDirectory?: string;
    /**
     * Pre-resolved working directory context (git root, branch, HEAD, remote, merge-base).
     * When provided, createSession skips its own getWorkingDirectoryContext call,
     * using this value instead. Callers can start resolution early
     * to overlap with other async work (auth, terminal detection).
     */
    workingDirectoryContext?: Promise<WorkingDirectoryContext> | WorkingDirectoryContext;
    /**
     * 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: "delete" | "update" | "create";
    }, {
        operation: "delete" | "update" | "create";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        operation: "delete" | "update" | "create";
    };
    type: "session.plan_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        operation: "delete" | "update" | "create";
    };
    type: "session.plan_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}>;

export declare type SessionRemoteSteerableChangedEvent = z.infer<typeof SessionRemoteSteerableChangedEventSchema>;

/**
 * Remote steering state changed mid-session (e.g., after `/remote` enables steering)
 */
declare const SessionRemoteSteerableChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
} & {
    type: z.ZodLiteral<"session.remote_steerable_changed">;
    data: z.ZodObject<{
        remoteSteerable: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        remoteSteerable: boolean;
    }, {
        remoteSteerable: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        remoteSteerable: boolean;
    };
    type: "session.remote_steerable_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        remoteSteerable: boolean;
    };
    type: "session.remote_steerable_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }, {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.resume";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        resumeTime: string;
        eventCount: number;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.resume";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
                reasoningTokens: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }, {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }>;
        }, "strip", z.ZodTypeAny, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            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: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
    }, {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: 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: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
    };
    type: "session.shutdown";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        shutdownType: "error" | "routine";
        totalPremiumRequests: number;
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                outputTokens: number;
                inputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count: number;
                cost: number;
            };
        }>;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        errorReason?: string | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
    };
    type: "session.shutdown";
    id: string;
    parentId: string | null;
    timestamp: string;
    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, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }, {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }, {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    type: "session.skills_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        skills: {
            enabled: boolean;
            source: string;
            name: string;
            description: string;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    type: "session.skills_loaded";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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 (this event and all events after it were removed) */
        upToEventId: z.ZodString;
        /** Number of events that were removed */
        eventsRemoved: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        eventsRemoved: number;
        upToEventId: string;
    }, {
        eventsRemoved: number;
        upToEventId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    type: "session.snapshot_rewind";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    type: "session.snapshot_rewind";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }, {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        context?: {
            cwd: string;
            branch?: string | undefined;
            repository?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            gitRoot?: string | undefined;
            baseCommit?: string | undefined;
            headCommit?: string | undefined;
        } | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
    };
    type: "session.start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    }, {
        success?: boolean | undefined;
        summary?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        summary: string;
        success?: boolean | undefined;
    };
    type: "session.task_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success?: boolean | undefined;
        summary?: string | undefined;
    };
    type: "session.task_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}>;

/**
 * Per-session telemetry service that subscribes to session events and sends telemetry.
 * Each session gets its own SessionTelemetry instance.
 */
declare class SessionTelemetry implements DisposableTelemetrySender {
    private readonly telemetryService;
    private readonly session;
    private readonly unsubscribeEvents;
    private readonly unsubscribeTools;
    private readonly unsubscribeAuth?;
    private readonly legacyHandler;
    private readonly featureFlagService?;
    private lastToolsKey;
    /** Tool call tracking for tool_call_executed telemetry */
    private toolCallInfoMap;
    private tools;
    private currentApiCallId;
    /** Current CAPI interaction ID, applied to all emitted telemetry events */
    private currentInteractionId;
    /** Memory usage tracking */
    private assistantTurnCount;
    private maxRssBytes;
    private readonly enableRestrictedTelemetry;
    /** User config for tracking config-file feature toggles */
    private readonly config;
    /** First launch timestamp, from GlobalState */
    private readonly firstLaunchAt;
    private telemetryFeatureOverrides;
    constructor(telemetryService: TelemetryService, session: LocalSession, options?: SessionTelemetryOptions, featureFlagService?: IFeatureFlagService);
    dispose(): void;
    setExtraFeatures(features: Record<string, string>): void;
    /** Whether restricted telemetry should be emitted */
    private shouldEmitRestricted;
    /**
     * Send a telemetry event with a simplified interface.
     * This is the preferred way to send telemetry events.
     *
     * When the event has `awaitExpBeforeSend` set and a {@link IFeatureFlagService}
     * is available, sending is deferred until the ExP response arrives (or a 10 s
     * timeout elapses) so the event is enriched with experiment assignment context.
     *
     * @param event - The telemetry event to send
     */
    sendTelemetry(event: TelemetryEvent): void;
    /** Maximum time (ms) to wait for the ExP response before sending anyway. */
    static readonly EXP_AWAIT_TIMEOUT_MS = 10000;
    /**
     * Defers sending a telemetry event until the ExP response is available,
     * with a timeout to avoid blocking indefinitely. Falls back to immediate
     * send if no {@link IFeatureFlagService} is available.
     */
    private sendTelemetryAfterExp;
    /**
     * Sends a telemetry event immediately without waiting for ExP context.
     */
    private sendTelemetryImmediate;
    /**
     * Handle restricted tool call data from the CAPI client.
     * Emits a structured cli.restricted_tool_call event with arguments and results.
     */
    private handleRestrictedToolCallData;
    /** Options to pass through to the telemetry service with each hydro event */
    private get hydroOptions();
    /**
     * Send a cli.model_call hydro event with pre-filled session_id.
     * Note: copilot_tracking_id and client are added by the TelemetryService implementation.
     */
    sendHydroModelCallEvent(event: HydroModelCall): void;
    /**
     * Send a cli.tool_call hydro event with pre-filled session_id.
     * Note: copilot_tracking_id and client are added by the TelemetryService implementation.
     */
    private sendHydroToolCallEvent;
    /**
     * Send a cli.restricted_tool_call hydro event with tool arguments and results.
     * Only sent when restricted telemetry is enabled for an eligible user who has not opted out.
     */
    private sendHydroRestrictedToolCallEvent;
    private getPrefilledHydroFields;
    private handleEvent;
    private forwardEventToTelemetry;
    private handleSessionError;
    private maybeEmitMemoryUsage;
    private trackToolCallInfo;
    private handleToolCallExecuted;
}

declare interface SessionTelemetryOptions {
    /** When true, restricted telemetry (model calls, tool calls with PII) is emitted. Defaults to true. */
    enableRestrictedTelemetry?: boolean;
    /** User config file contents, used to track config-file feature toggles in telemetry */
    config?: DefaultConfig;
    /** First launch timestamp, from GlobalState */
    firstLaunchAt?: Date;
}

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;
    };
    type: "session.title_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        title: string;
    };
    type: "session.title_changed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "session.tools_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        model: string;
    };
    type: "session.tools_updated";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }, {
        tokenLimit: number;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        tokenLimit: number;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    type: "session.truncation";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tokenLimit: number;
        postTruncationMessagesLength: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    type: "session.truncation";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "session.usage_info";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    type: "session.usage_info";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "session.warning";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    type: "session.warning";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: "update" | "create";
    }, {
        path: string;
        operation: "update" | "create";
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        path: string;
        operation: "update" | "create";
    };
    type: "session.workspace_file_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        path: string;
        operation: "update" | "create";
    };
    type: "session.workspace_file_changed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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>;
    /**
     * Sandbox configuration for shell commands.
     */
    readonly sandbox: SandboxConfig;
    /**
     * 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>, 
    /**
     * Sandbox configuration for shell commands.
     */
    sandbox?: SandboxConfig, 
    /**
     * 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;
    withSandbox(sandbox: SandboxConfig): 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. Discriminated union of local and remote skills.
 * Use `skill.source === "remote"` to narrow to RemoteSkill.
 */
declare type Skill = LocalSkill | RemoteSkill;

/**
 * Shared properties between local and remote skills.
 */
declare interface SkillBase {
    /** Unique identifier for the skill (from frontmatter). */
    name: string;
    /** Description of what the skill does (from frontmatter). */
    description: string;
    /** Optional list of tools that are auto-allowed when skill is active. */
    allowedTools?: 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;
}

/**
 * Metadata about a skill invocation, used for event emission and compaction tracking.
 */
declare interface 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;
    /** Description of what the skill does (from frontmatter) */
    description?: string;
}

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>;
        /** Description of what the skill does (from frontmatter) */
        description: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    }, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    };
    type: "skill.invoked";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        allowedTools?: string[] | undefined;
    };
    type: "skill.invoked";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}>;

declare interface SSETransportConfig {
    type: "sse";
    url: string;
    headers?: Record<string, string>;
    authProvider?: OAuthClientProvider;
}

/**
 * The result of starting MCP servers via {@link McpHost.startServers}.
 */
declare interface StartServersResult {
    /** Servers that were removed by a config filter (e.g. allowlist enforcement). */
    filteredServers: McpFilteredServer[];
    /** Non-default servers that passed the config filter. */
    allowedServers?: McpAllowedServer[];
}

/**
 * Static override operation for a single system prompt section.
 * Used for declarative mutations that don't require reading the current content.
 */
declare interface StaticSectionOverride {
    /**
     * The operation to perform on this section.
     * - "replace": Replace section content entirely
     * - "remove": Remove the section
     * - "append": Append to existing section content
     * - "prepend": Prepend to existing section content
     */
    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;
}

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;
        model: z.ZodOptional<z.ZodString>;
        totalToolCalls: z.ZodOptional<z.ZodNumber>;
        totalTokens: z.ZodOptional<z.ZodNumber>;
        durationMs: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.completed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.completed";
    id: string;
    parentId: string | null;
    timestamp: string;
    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: {};
    type: "subagent.deselected";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {};
    type: "subagent.deselected";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
        model: z.ZodOptional<z.ZodString>;
        totalToolCalls: z.ZodOptional<z.ZodNumber>;
        totalTokens: z.ZodOptional<z.ZodNumber>;
        durationMs: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }, {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.failed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    type: "subagent.failed";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}>;

/**
 * Session-scoped limiter that atomically tracks sub-agent concurrency.
 * Shared by reference through ToolConfig across all nesting levels.
 */
declare class SubAgentLimiter {
    private _runningCount;
    private _maxConcurrent;
    constructor(maxConcurrent?: number);
    get maxConcurrent(): number;
    /**
     * Update the concurrency limit. Takes effect for future tryAcquire() calls.
     * Does not evict agents that are already running above the new limit.
     */
    updateMaxConcurrent(maxConcurrent: number): void;
    /**
     * Atomically check limits and acquire a slot. Returns rejection info if rejected, undefined on success.
     * @param reacquire If true, uses a different error message for resuming idle agents.
     */
    tryAcquire(reacquire?: boolean): SubAgentLimitRejection | undefined;
    /** Release a running slot. Must be called in a finally block. Underflow-safe. */
    release(): void;
    get runningCount(): number;
}

declare interface SubAgentLimiterInfo {
    runningCount: number;
    maxConcurrent: number;
}

declare interface SubAgentLimitRejection {
    error: string;
    limitType: "concurrent";
}

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;
    };
    type: "subagent.selected";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    type: "subagent.selected";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "subagent.started";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
    };
    type: "subagent.started";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
}

/**
 * Static list of all supported model IDs.
 * Use for type definitions, schema validation, and membership checks only.
 * For ordering (default selection, display), use `getSupportedModelOrder` in modelResolver.ts.
 *
 * When adding a new model here, consider whether it should be publicly visible.
 * If not (e.g. internal-only or pre-announcement), add it to {@link HIDDEN_MODELS}.
 * See {@link HIDDEN_MODELS} documentation for visibility and access control details.
 */
export declare const SUPPORTED_MODELS: readonly ["claude-sonnet-4.6", "claude-sonnet-4.5", "claude-haiku-4.5", "claude-opus-4.7", "claude-opus-4.6", "claude-opus-4.6-fast", "claude-opus-4.6-1m", "claude-opus-4.5", "claude-sonnet-4", "goldeneye", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5.2", "gpt-5.1", "gpt-5.4-mini", "gpt-5-mini", "gpt-4.1"];

export declare type SupportedModel = (typeof SUPPORTED_MODELS)[number];

/**
 * 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;
    };
    /** List of skill names to preload into this agent's context. When omitted, no skills are preloaded. */
    skills?: string[];
};

/**
 * 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;
    };
    type: "system.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        role: "developer" | "system";
        content: string;
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    type: "system.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    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, {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: string | undefined;
        }, {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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;
    };
    type: "system.notification";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        kind: {
            type: "agent_completed";
            status: "completed" | "failed";
            agentId: string;
            agentType: string;
            prompt?: string | undefined;
            description?: 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;
    };
    type: "system.notification";
    id: string;
    parentId: string | null;
    timestamp: string;
    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, {
    type: "agent_completed";
    status: "completed" | "failed";
    agentId: string;
    agentType: string;
    prompt?: string | undefined;
    description?: string | undefined;
}, {
    type: "agent_completed";
    status: "completed" | "failed";
    agentId: string;
    agentType: string;
    prompt?: string | undefined;
    description?: 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;
    /** Resolvers for waitForAgents() callers waiting on a task to leave the running state */
    private readonly statusWaiters;
    private onChangeCallback?;
    private onCompletionCallback?;
    private onAgentIdleCallback?;
    private subAgentLimiter?;
    /**
     * Set the sub-agent limiter for concurrent agent tracking.
     * The registry will acquire/release slots automatically during agent lifecycle.
     */
    setSubAgentLimiter(limiter: SubAgentLimiter): void;
    /** Returns a snapshot of the current sub-agent concurrency state. */
    getSubAgentLimiterInfo(): SubAgentLimiterInfo | undefined;
    /** Update the sub-agent concurrency limit (e.g., when auth/plan tier changes). */
    updateSubAgentMaxConcurrent(maxConcurrent: number): void;
    /**
     * 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;
    private _startAgentInner;
    /**
     * 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): true | string;
    /**
     * 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;
    /** Updates the lightweight progress snapshot for an agent identified by its parent tool call ID. */
    setAgentProgress(toolCallId: string, progress: AgentProgressInfo | undefined): void;
    /** Records the latest reported intent for an agent identified by its parent tool call ID. */
    setAgentIntent(toolCallId: string, latestIntent: string): void;
    /** Increments the completed tool call count for an agent identified by its parent tool call ID. */
    incrementAgentToolCalls(toolCallId: string): void;
    /** Sets the resolved model name for an agent identified by its parent tool call ID. */
    setAgentModel(toolCallId: string, model: string): void;
    /** Accumulates token usage for an agent identified by its parent tool call ID. */
    addAgentTokens(toolCallId: string, inputTokens: number, outputTokens: number): void;
    /** Returns the progress info for an agent identified by its parent tool call ID, or undefined if not found. */
    getAgentProgress(toolCallId: string): AgentProgressInfo | undefined;
    /** Returns the activeTimeMs for an agent identified by its parent tool call ID, or undefined if not found. */
    getAgentActiveTime(toolCallId: string): number | undefined;
    private updateAgentProgress;
    /** Flush any in-progress active period into the accumulated total. */
    private finalizeActiveTime;
    /** Resolve all waitForAgents() waiters blocked on a given task. */
    private resolveStatusWaiters;
    /**
     * 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 {
    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 for eligible users who have not opted out. */
    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;
};

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";
    cwd?: string | undefined;
    exitCode?: number | undefined;
}, {
    text: string;
    type: "terminal";
    cwd?: string | undefined;
    exitCode?: number | 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";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            }, {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | 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;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }, {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | 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, {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            }, {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | 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, {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                }, {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                }>]>;
            }, "strip", z.ZodTypeAny, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            }, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            }>]>, "many">>;
        }, "strip", z.ZodTypeAny, {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        }, {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | 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, {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    }, {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    };
    type: "tool.execution_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        success: boolean;
        toolCallId: string;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        result?: {
            content: string;
            contents?: ({
                text: string;
                type: "text";
            } | {
                text: string;
                type: "terminal";
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                data: string;
                type: "image";
                mimeType: string;
            } | {
                data: string;
                type: "audio";
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                size?: number | undefined;
                mimeType?: string | undefined;
                description?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "light" | "dark" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                title?: string | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    uri: string;
                    blob: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            detailedContent?: string | undefined;
        } | undefined;
        model?: string | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        interactionId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
    };
    type: "tool.execution_complete";
    id: string;
    parentId: string | null;
    timestamp: string;
    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;
    };
    type: "tool.execution_partial_result";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    type: "tool.execution_partial_result";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "tool.execution_progress";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    type: "tool.execution_progress";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "tool.execution_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    type: "tool.execution_start";
    id: string;
    parentId: string | null;
    timestamp: string;
    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[];
    /**
     * The execution outcome of the tool call.
     * - `success`: The tool executed successfully and produced a valid result.
     * - `failure`: The tool encountered an error or did not produce a valid result.
     * - `timeout`: The tool was aborted because it exceeded its time budget.
     * - `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" | "timeout" | "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?: SkillInvocation;
};

/**
 * 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" | "TIMEOUT";

/**
 * 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;
    };
    type: "tool.user_requested";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    type: "tool.user_requested";
    id: string;
    parentId: string | null;
    timestamp: string;
    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[];

/**
 * Resolves OTel trace context for an in-flight MCP tool call.
 * Returns W3C `traceparent`/`tracestate` headers.
 *
 * - **In-process** (`InProcMCPTransport`): injected directly into `callTool` `params._meta`.
 * - **Out-of-process** (`OutOfProcMCPTransport`): forwarded as `traceContext` in the HTTP
 *   request body to `MCPServer`, which then injects it into `params._meta`.
 */
declare type TraceContextResolver = (toolCallId: string) => {
    traceparent?: string;
    tracestate?: string;
} | undefined;

/**
 * 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";
};

/**
 * Transform override for a single system prompt section.
 * Calls back to the SDK client with the current rendered section content;
 * the client returns the new content. Used for regex, find-and-replace, or logging.
 */
declare interface TransformSectionOverride {
    action: "transform";
}

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;
        answer: z.ZodOptional<z.ZodString>;
        wasFreeform: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    }, {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    type: "user_input.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    type: "user_input.completed";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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;
    };
    type: "user_input.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}, {
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    type: "user_input.requested";
    id: string;
    ephemeral: true;
    parentId: string | null;
    timestamp: string;
}>;

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";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        }, {
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        }>, 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;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        }, {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        }>, 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;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    }, {
        content: string;
        source?: string | undefined;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    data: {
        content: string;
        source?: string | undefined;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    };
    type: "user.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    ephemeral?: boolean | undefined;
}, {
    data: {
        content: string;
        source?: string | undefined;
        interactionId?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            text: string;
            type: "selection";
            filePath: string;
            displayName: string;
            selection: {
                end: {
                    line: number;
                    character: number;
                };
                start: {
                    line: number;
                    character: number;
                };
            };
        } | {
            type: "file";
            path: string;
            displayName: string;
            lineRange?: {
                end: number;
                start: number;
            } | undefined;
        } | {
            type: "directory";
            path: string;
            displayName: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            data: string;
            type: "blob";
            mimeType: string;
            displayName?: string | undefined;
        })[] | undefined;
        agentMode?: "shell" | "interactive" | "autopilot" | "plan" | undefined;
    };
    type: "user.message";
    id: string;
    parentId: string | null;
    timestamp: string;
    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>;
    session_sync_level: z_2.ZodOptional<z_2.ZodNativeEnum<typeof MissionControlIndexingLevel>>;
    pr_create_sync_dismissed: z_2.ZodOptional<z_2.ZodBoolean>;
    chronicle_sync_dismissed: z_2.ZodOptional<z_2.ZodBoolean>;
}, "strip", z_2.ZodTypeAny, {
    id: string;
    summary_count: number;
    cwd?: string | undefined;
    name?: string | undefined;
    branch?: string | undefined;
    summary?: 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;
    session_sync_level?: MissionControlIndexingLevel | undefined;
    pr_create_sync_dismissed?: boolean | undefined;
    chronicle_sync_dismissed?: boolean | undefined;
}, {
    id: string;
    cwd?: string | undefined;
    name?: string | undefined;
    branch?: string | undefined;
    summary?: 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;
    session_sync_level?: MissionControlIndexingLevel | undefined;
    pr_create_sync_dismissed?: boolean | undefined;
    chronicle_sync_dismissed?: boolean | 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;
    /** Whether the UI can offer session-wide approval for file write operations */
    readonly canOfferSessionApproval: boolean;
    /** The new file contents (for IDE diff view) */
    readonly newFileContents?: string;
};

export { }
