import type { CallToolResult } from '@modelcontextprotocol/sdk/types.js';
import { ChatCompletion } from 'openai/resources';
import type { ChatCompletionAssistantMessageParam } from 'openai/resources/chat/completions';
import { ChatCompletionChunk } from 'openai/resources';
import type { ChatCompletionMessage } from 'openai/resources/chat/completions';
import { ChatCompletionMessageFunctionToolCall } from 'openai/resources/chat/completions/completions.mjs';
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 type { ClientOptions as ClientOptions_2 } 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 type { Implementation } 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 { objectOutputType } from 'zod';
import { OpenAI } from 'openai/index.mjs';
import type { default as OpenAI_2 } from 'openai';
import type { Responses } from 'openai/resources';
import type { SessionFsReverseCall } from '../sharedApi/runtime-generated';
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 { ZodEnum } from 'zod';
import { ZodLiteral } 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';

/**
 * Turn abort event - User aborted the current turn
 * Triggers completion of orphaned tool calls
 */
export declare const ABORT_REASONS: readonly ["user_initiated", "remote_command", "user_abort"];

export declare type AbortEvent = z.infer<typeof AbortEventSchema>;

declare const AbortEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"abort">;
    data: z.ZodObject<{
        reason: z.ZodEnum<["user_initiated", "remote_command", "user_abort"]>;
    }, "strip", z.ZodTypeAny, {
        reason: "user_initiated" | "remote_command" | "user_abort";
    }, {
        reason: "user_initiated" | "remote_command" | "user_abort";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "abort";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reason: "user_initiated" | "remote_command" | "user_abort";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "abort";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reason: "user_initiated" | "remote_command" | "user_abort";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type AbortReason = z.infer<typeof AbortReasonSchema>;

export declare const AbortReason: {
    readonly UserInitiated: "user_initiated";
    readonly RemoteCommand: "remote_command";
    readonly UserAbort: "user_abort";
};

export declare const AbortReasonSchema: z.ZodEnum<["user_initiated", "remote_command", "user_abort"]>;

declare type AcquireArgs = {
    authInfo: AuthInfo;
    integrationId: string;
    sessionId: string;
    logger: RunnerLogger;
};

/** Perform an initial `POST /models/session` acquire for auto-mode. */
export declare function acquireAutoModeSession(args: AcquireArgs): Promise<AutoModeSessionResult>;

declare type AgentAction = (typeof AgentActions)[number];

declare const AgentActions: readonly ["fix", "fix-pr-comment", "task"];

declare type AgentCallbackCheckQuotaEvent = Record<string, never>;

declare type AgentCallbackCheckQuotaResponse = {
    has_enough_quota: boolean;
};

declare type AgentCallbackCommentReplyEvent = {
    comment_id: number;
    message: string;
};

declare type AgentCallbackErrorEvent = {
    text: string;
    name?: string;
    message?: string;
    stack?: string;
    stdout?: string;
    stderr?: string;
    blockedRequests?: BlockedRequest[];
    request_id?: string;
    ghRequestId?: string;
    serviceRequestId?: string;
    cmd?: string;
    /** Service that originated the error (e.g., "capi", "git") */
    service?: string;
    /** Error code - either from the service (e.g., "429", "hook") or a process exit code */
    code?: number | string;
    signal?: string;
    skipReport?: boolean;
    isVisionFlow?: boolean;
};

declare type AgentCallbackPartialResultEvent = {
    branchName: string;
    message: string;
};

declare type AgentCallbackProgressEvent = (({
    kind: "log";
    message: string;
} | Event_2) & {
    /**
     * Progress events may have telemetry associated with them.
     */
    telemetry?: EventTelemetry;
}) | SubagentSessionBoundary | SessionLoggingDisabledEvent | TelemetryEvent_2 | StreamingDeltaEvent;

declare type AgentCallbackProgressOptions = {
    accepts_user_messages: boolean;
};

declare type AgentCallbackProgressResponse = {
    user_messages: UserMessage[];
};

declare type AgentCallbackResultEvent = {
    diff: string;
    branchName: string;
    prTitle: string;
    prDescription: string;
    blockedRequests?: BlockedRequest[];
};

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";

/**
 * Agent executor dependencies for the task tool.
 * Hides the routing between general-purpose, YAML-based, and user agents
 * behind a single `executeAgent` call.
 *
 * Production code uses {@link createSessionAgentExecutors} to get the real implementation.
 * Tests can provide a lightweight fake.
 */
declare interface AgentExecutors {
    /**
     * Executes an agent of the given type with the provided input.
     * Handles agent context caching, tool filtering, and model overrides internally.
     */
    executeAgent: (agentType: string, input: {
        description: string;
        prompt: string;
    }, modelOverride: string | undefined, options: ToolCallbackOptions | undefined, clientOptionOverrides?: ResolvedModel["clientOptionOverrides"]) => Promise<ToolResult | string>;
    /** Shuts down all cached agent contexts. */
    shutdown: () => Promise<void>;
}

declare type AgentHook = IPreCommitHook | IPreEditsHook | IPostEditHook | IPostResultHook | IPrePRDescriptionHook;

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 */
export 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;
    /** Executor-provided telemetry for the tool_call_executed event (set before multi-turn idle wait) */
    executorTelemetry?: {
        properties?: Record<string, string>;
        restrictedProperties?: Record<string, string>;
        metrics?: Record<string, number>;
    };
    /**
     * MCP-task-specific data when this agent represents an MCP task created
     * via `tools/call` with task augmentation. Absent for normal subagents.
     */
    mcpTask?: McpTaskInfo;
}

export declare type AgentStopHook = Hook<AgentStopHookInput, AgentStopHookOutput>;

/**
 * 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?: HookBlockDecision;
    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;
    /** Most recent prompt delivered to the agent. Updated whenever the agent receives a follow-up message. */
    prompt: string;
    result?: string;
    modelOverride?: string;
    /** Model resolved by the agent runtime once the first model call is observed */
    resolvedModel?: string;
    /** Whether the agent is currently running synchronously or in background mode. */
    executionMode?: AgentExecutionMode;
    /** Whether the agent can currently be promoted into background mode. */
    canPromoteToBackground?: boolean;
    /** 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[];
    /** Last turn index returned by read_agent's default incremental cursor */
    lastReadTurnIndex?: number;
    /** Lightweight progress information for the current run */
    progress?: AgentProgressInfo;
    /**
     * SEP-2669 steer callback for MCP tasks. When present, `sendMessage()` routes
     * through this callback instead of rejecting. The closure captures the MCP client
     * and server-assigned task ID.
     */
    steerCallback?: (message: string) => Promise<void>;
}

/**
 * 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;

/**
 * Aggregate `additionalContext` strings returned by successful-path postToolUse hooks.
 * Strings are joined with `\n\n` in registration order. The result is capped at
 * {@link MAX_POST_TOOL_USE_CONTEXT_LENGTH} characters; truncation is hard (slice + trimEnd).
 */
export declare function aggregatePostToolUseContexts(contexts: string[]): string;

/**
 * The source that triggered allow-all / yolo mode.
 */
declare type AllowAllSource = "cli_flag" | "slash_command" | "autopilot_confirmation" | "rpc";

declare const alwaysApproveRequestPermissionFn: RequestPermissionFn;

declare type AnalysisTelemetry = {
    analysisError?: Error;
    analysisSuccess: boolean;
    analysisTimeMs: number;
    analysisRuleIds: string[];
    querySuite?: string;
};

declare type ApiKeyAuthInfo = {
    readonly type: "api-key";
    readonly apiKey: string;
    readonly host: string;
    readonly copilotUser?: CopilotUserResponse;
};

declare type ApiMethodSchema = {
    /** Human-readable documentation for the RPC method. Emitted to the API JSON schema for SDK codegen. */
    description: string;
    params?: z_2.ZodTypeAny;
    result?: z_2.ZodTypeAny;
    stability?: ApiStability;
    visibility?: ApiVisibility;
    /**
     * If true, this method is omitted entirely from the emitted public API JSON
     * Schema (and therefore from all generated SDK clients). Use this for RPC
     * methods that exist on the wire but are deliberately not part of the SDK
     * surface (e.g. server-side telemetry sinks called via raw RPC). Distinct
     * from {@link visibility} = "internal", which still emits the method to the
     * schema and codegen so SDKs can call it but with an internal marker.
     */
    excludeFromSchema?: boolean;
    /**
     * Override the property name resolved on the implementation object when
     * the schema dispatcher invokes this method. Useful when the schema's wire
     * name (and therefore the SDK-facing key) needs to differ from the
     * implementation method's name on the impl class — e.g. when the impl
     * class already has a method of the same name with an incompatible
     * signature, or when the schema-shaped result requires a wrapping layer.
     *
     * The dispatcher resolves the impl method as `impl[implMethodName]` when
     * provided, falling back to the last segment of the schema path. The
     * {@link ApiSchemaToImplementation} mapped type uses this override to
     * compute the impl-class member that must satisfy the schema.
     */
    implMethodName?: string;
};

/** 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";

/**
 * Append a labelled block of `additionalContext` from postToolUse hooks onto the
 * tool's `textResultForLlm`. Mirrors {@link appendPostToolUseFailureContext} so the
 * LLM has a structural hint that the trailing text is hook-supplied guidance,
 * not part of the tool's own output.
 */
export declare function appendPostToolUseContext(baseContent: string, hookContext: string | undefined, toolName?: string): string;

export declare function appendPostToolUseFailureContext(baseContent: string, failureHookContext: string | undefined, toolName?: string): string;

/** Options for experimentation staff status overrides */
declare interface AppInsightsTelemetryOptions {
    /** Whether the persisted state 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 droppedPendingEvents;
    private droppedPendingRestrictedEvents;
    private readonly clientName;
    private readonly clientType;
    private clientInfo;
    /**
     * Optional host-editor attribution override for legacy `copilot_v0` usage
     * events. Set when the CLI is driven by another editor over ACP (e.g. a
     * JetBrains IDE) so usage is attributed to that editor rather than the CLI.
     */
    private usageMetricsAttribution?;
    private readonly configStaff;
    private readonly streamerMode;
    private queue?;
    private restrictedQueue?;
    private copilotUser?;
    private currentAuthHost?;
    private endpointUrl?;
    /** 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, options?: AppInsightsTelemetryOptions);
    /**
     * Override the host-editor attribution applied to legacy `copilot_v0` usage
     * events. Pass `undefined` to restore the default CLI attribution.
     */
    setUsageMetricsAttribution(attribution: UsageMetricsAttribution | undefined): void;
    /** Check if user is staff based on host and organization membership */
    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?: HydroTelemetryOptions): void;
    dispose(): Promise<void>;
    private updateCopilotUser;
    /** Creates new telemetry queues with the given endpoint URL and drains pending events. */
    private updateQueues;
    private bufferPendingEvent;
    private emitPendingBufferOverflowDiagnostic;
    private getTags;
    private getCommonProperties;
    private buildClientInfo;
}

declare type AskUserInput = {
    question: string;
    choices?: string[];
    allow_freeform?: boolean;
};

/**
 * Request to ask the user a question.
 */
declare type AskUserRequest = {
    /** The question to ask the user */
    question: string;
    /** Optional choices for multiple choice questions */
    choices?: string[];
    /** Whether to allow freeform text input (default: true) */
    allowFreeform?: boolean;
    /** The LLM-assigned tool call ID, threaded from the tool execution context */
    toolCallId?: string;
};

/**
 * Response from the user to an ask_user request.
 */
declare type AskUserResponse = {
    /** The user's answer (selected choice or freeform text) */
    answer: string;
    /** Whether the answer was freeform text vs a selected choice */
    wasFreeform: boolean;
    /** Whether the user dismissed the prompt without answering */
    dismissed?: boolean;
};

declare const AskUserToolName = "ask_user";

/**
 * 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>;
    agentId: z.ZodOptional<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, {
    type: "assistant.intent";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        intent: string;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.intent";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        intent: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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, {
    type: "assistant.message_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.message_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    agentId?: string | undefined;
}>;

export declare type AssistantMessageEvent = z.infer<typeof AssistantMessageEventSchema>;

/**
 * An event that is emitted by the `Client` for each message it receives from the LLM.
 *
 * When the model returns a multi-chunk response (e.g. gpt-5.5 with multiple
 * reasoning items), the client yields one event per chunk. All chunks of one
 * API call share the same `modelCall` and (consequently) the same
 * `modelCall.api_id`; consumers can group by that or by `chunkIndex` /
 * `chunkCount` to recover per-call semantics.
 *
 * Currently does not include telemetry.
 */
declare type AssistantMessageEvent_2 = {
    kind: "message";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    message: ChatCompletionMessageParamsWithToolCalls & ReasoningMessageParam;
    /**
     * Zero-based index of this chunk within its parent API call. Absent (or
     * `0` with `chunkCount === 1`) for single-chunk responses. Consumed by
     * `session.ts` to align the streaming display's chunk-handle array with
     * the per-chunk message-id assignment, and to detect "this is the last
     * chunk" for `outputTokens` attribution.
     */
    chunkIndex?: number;
    /**
     * Total chunks for the parent API call. Absent (or `1`) for single-chunk
     * responses.
     */
    chunkCount?: number;
};

/**
 * 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.message">;
    data: z.ZodObject<{
        messageId: z.ZodString;
        model: z.ZodOptional<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>;
            mcpToolName: 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;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }>, "many">>;
        reasoningOpaque: z.ZodOptional<z.ZodString>;
        reasoningText: z.ZodOptional<z.ZodString>;
        encryptedContent: z.ZodOptional<z.ZodString>;
        /** Phase of generation for phased-output models (e.g. gpt-5.3-codex). */
        phase: z.ZodOptional<z.ZodString>;
        /** Actual output token count from the API response (completion_tokens).
         *  Used for accurate token counting instead of estimation. Optional for
         *  backwards compatibility with existing sessions that don't have this field. */
        outputTokens: z.ZodOptional<z.ZodNumber>;
        /** The CAPI interaction ID for this message */
        interactionId: z.ZodOptional<z.ZodString>;
        requestId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        /** Provider's completion / response identifier. Shared across all chunks
         *  of a single API call when the model emits multi-chunk responses (e.g.
         *  gpt-5.5 with tool_search). Used to group multi-chunk assistant
         *  utterances for coalescing in telemetry, cross-transport normalization,
         *  and UI. */
        apiCallId: z.ZodOptional<z.ZodString>;
        /** Raw Anthropic content blocks containing advisor tool_use/result pairs.
         *  Stored so they can be round-tripped verbatim on subsequent turns. */
        anthropicAdvisorBlocks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
        /** Model ID of the advisor used for this message (e.g. "claude-opus-4-7"). */
        anthropicAdvisorModel: z.ZodOptional<z.ZodString>;
        /** Identifier for the agent loop turn this message was produced in. */
        turnId: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type AssistantMessageStartEvent = z.infer<typeof AssistantMessageStartEventSchema>;

/**
 * Assistant message streaming start (ephemeral, not persisted)
 * Sent before the first streaming delta for a message to provide stable message metadata.
 */
declare const AssistantMessageStartEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.message_start">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        messageId: z.ZodString;
        phase: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        messageId: string;
        phase?: string | undefined;
    }, {
        messageId: string;
        phase?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.message_start";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        messageId: string;
        phase?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.message_start";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        messageId: string;
        phase?: string | undefined;
    };
    agentId?: string | 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>;
    agentId: z.ZodOptional<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, {
    type: "assistant.reasoning_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.reasoning_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "assistant.reasoning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        reasoningId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.reasoning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        reasoningId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<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, {
    type: "assistant.streaming_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        totalResponseSizeBytes: number;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.streaming_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        totalResponseSizeBytes: number;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.turn_end">;
    data: z.ZodObject<{
        turnId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        turnId: string;
    }, {
        turnId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.turn_end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.turn_end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "assistant.turn_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.turn_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<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>;
        timeToFirstTokenMs: z.ZodOptional<z.ZodNumber>;
        interTokenLatencyMs: z.ZodOptional<z.ZodNumber>;
        initiator: z.ZodOptional<z.ZodString>;
        apiCallId: z.ZodOptional<z.ZodString>;
        providerCallId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        apiEndpoint: z.ZodOptional<z.ZodEnum<["/chat/completions", "/v1/messages", "/responses", "ws:/responses"]>>;
        /** @deprecated Use `agentId` on the event envelope instead. */
        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, {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        }, {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        }>>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    }, {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.usage";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.usage";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    };
    agentId?: string | undefined;
}>;

export declare type Attachment = z.infer<typeof AttachmentSchema>;

export 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, {
        start: number;
        end: number;
    }, {
        start: number;
        end: number;
    }>>;
}, "strip", z.ZodTypeAny, {
    path: string;
    type: "file";
    displayName: string;
    lineRange?: {
        start: number;
        end: number;
    } | undefined;
}, {
    path: string;
    type: "file";
    displayName: string;
    lineRange?: {
        start: number;
        end: number;
    } | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"directory">;
    path: z.ZodString;
    displayName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    path: string;
    type: "directory";
    displayName: string;
}, {
    path: string;
    type: "directory";
    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, {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    }, {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "selection";
    displayName: string;
    selection: {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    };
    filePath: string;
    text: string;
}, {
    type: "selection";
    displayName: string;
    selection: {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    };
    filePath: string;
    text: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"github_reference">;
    number: z.ZodNumber;
    title: z.ZodString;
    referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
    state: z.ZodString;
    url: z.ZodString;
}, "strip", z.ZodTypeAny, {
    number: number;
    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, {
    type: "blob";
    data: string;
    mimeType: string;
    displayName?: string | undefined;
}, {
    type: "blob";
    data: string;
    mimeType: string;
    displayName?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"extension_context">;
    extensionId: z.ZodString;
    canvasId: z.ZodOptional<z.ZodString>;
    instanceId: z.ZodOptional<z.ZodString>;
    title: z.ZodString;
    payload: z.ZodUnknown;
    capturedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "extension_context";
    title: string;
    extensionId: string;
    capturedAt: string;
    instanceId?: string | undefined;
    canvasId?: string | undefined;
    payload?: unknown;
}, {
    type: "extension_context";
    title: string;
    extensionId: string;
    capturedAt: string;
    instanceId?: string | undefined;
    canvasId?: string | undefined;
    payload?: unknown;
}>]>;

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, {
    type: "audio";
    data: string;
    mimeType: string;
}, {
    type: "audio";
    data: string;
    mimeType: string;
}>;

declare type AuthCallback = (authInfo: AuthInfo | null, token?: string) => void | Promise<void>;

/**
 * Minimal interface for subscribing to authentication state changes.
 * Satisfied by AuthManager — avoids coupling consumers to the full class.
 */
declare interface AuthChangeOptions {
    /** When false, skips the initial invocation with the current auth state. Defaults to true. */
    immediate?: boolean;
}

/**
 * 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 authInfoWithTokenPromise;
    private userSwitchAuthCachePromise;
    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.
     * By default the callback is invoked immediately with the current auth
     * state. Pass `{ immediate: false }` to only receive future changes.
     *
     * @param callback Function to call with auth info and token when auth state changes
     * @param options Options controlling subscription behavior
     */
    onAuthChange(callback: AuthCallback, options?: AuthChangeOptions): void;
    /**
     * Remove an authentication change callback
     * @param callback The callback to remove
     */
    removeAuthCallback(callback: AuthCallback): void;
    /**
     * Notify all registered callbacks of auth state change.
     * Callbacks are invoked fire-and-forget.
     * @param authInfo Current auth info (null for logged out)
     * @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[]>;
    /**
     * Returns the auth options used by the user switcher, sorted by description.
     * The result is cached and reused until the user-switch auth cache is invalidated.
     * @returns List of available auth options for the user switcher, along with the token if available.
     */
    getAllAuthAvailableForUserSwitch(): Promise<AuthInfoWithToken[]>;
    private invalidateUserSwitchAuthCache;
    private getPrioritizedAuthMethods;
    private loadAuthInfo;
    /**
     * Returns the current auth info, waiting for the initial load if needed.
     * @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;
}

/** Virtual model id representing CAPI auto-mode. Selecting this triggers `/models/session` resolution. */
export declare const AUTO_MODEL_ID = "auto";

/**
 * Stateful manager for auto-mode session resolution. One instance typically lives per
 * top-level entry point (CLI app, promptMode invocation, ACP server). Callers invoke
 * {@link resolve} each time they need to dispatch a request with the virtual `"auto"` model;
 * the manager caches the token and refreshes lazily when within {@link REFRESH_LEAD_TIME_MS}
 * of the `expires_at` claim.
 */
export declare class AutoModeSessionManager {
    private current?;
    private previousConcreteModel?;
    private inflight?;
    private listeners;
    /**
     * Record a concrete model the user was using before switching into auto-mode; used
     * as a fallback when {@link resolve} fails terminally (e.g., 404 unsupported).
     */
    recordPreviousConcreteModel(modelId: string | undefined): void;
    /** The most recently resolved concrete model id, if any. */
    getLastResolved(): string | undefined;
    /**
     * Derive the overall auto-mode discount percentage from the server's per-model
     * `discounted_costs` map. When a selected model entry is present, return that;
     * otherwise average all values. Returns a percentage (0–100) or `undefined`.
     */
    getDiscountPercent(): number | undefined;
    /** The previous concrete model id before auto was selected, for fallback purposes. */
    getPreviousConcreteModel(): string | undefined;
    /**
     * Subscribe to resolved-model changes. Called synchronously with the new value whenever
     * {@link resolve} updates, refreshes, or clears the cached session. Returns an unsubscribe.
     */
    subscribe(listener: (resolvedModel: string | undefined, discountPercent: number | undefined) => void): () => void;
    private notify;
    /**
     * Resolve the auto-mode model id + session token, using cache when valid.
     * Writes `capiSessionToken` into {@link settings} on success; returns `undefined`
     * when auto-mode is not supported or not available in the caller's environment.
     */
    resolve(args: {
        authInfo: AuthInfo;
        integrationId: string;
        sessionId: string;
        logger: RunnerLogger;
        settings?: RuntimeSettings;
    }): Promise<{
        modelId: string;
        sessionToken: string;
    } | undefined>;
    private doResolve;
    /** Drop the cached session and clear the token from {@link settings}. */
    clear(settings?: RuntimeSettings): void;
    /**
     * Update bookkeeping when the user switches models in the picker:
     * - Transitioning INTO auto: remember {@link prevModel} as the fallback concrete model.
     * - Transitioning AWAY from auto: drop the cached session token + resolved model.
     * No-op when the transition does not involve auto on either side.
     */
    handleModelChange(prevModel: string | undefined, nextModel: string, settings?: RuntimeSettings): void;
    private isFresh;
}

export declare type AutoModeSessionResult = {
    sessionToken: string;
    selectedModel: string;
    availableModels: string[];
    expiresAt?: number;
    discountedCosts?: Record<string, number>;
};

export declare type AutoModeSwitchCompletedEvent = z.infer<typeof AutoModeSwitchCompletedEventSchema>;

/**
 * Emitted when a pending auto mode switch request has been resolved by a client.
 */
declare const AutoModeSwitchCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"auto_mode_switch.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        response: z.ZodEnum<["yes", "yes_always", "no"]>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    }, {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "auto_mode_switch.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    };
    agentId?: string | undefined;
}, {
    type: "auto_mode_switch.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    };
    agentId?: string | undefined;
}>;

export declare type AutoModeSwitchRequestedEvent = z.infer<typeof AutoModeSwitchRequestedEventSchema>;

/**
 * Emitted when the session hits an eligible rate limit and wants to offer switching to auto mode.
 * The client should respond via session.respondToAutoModeSwitch(requestId, response).
 */
declare const AutoModeSwitchRequestedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"auto_mode_switch.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        errorCode: z.ZodOptional<z.ZodString>;
        retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    }, {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "auto_mode_switch.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "auto_mode_switch.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    };
    agentId?: string | undefined;
}>;

/** Response from the auto-mode switch dialog: switch once, switch and remember, or decline. */
declare type AutoModeSwitchResponse = "yes" | "yes_always" | "no";

/** Auto-mode is not available in this environment (HMAC-only auth, no CAPI URL, or BYOK). */
export declare class AutoModeUnavailableError extends Error {
    constructor(message: string);
}

/** CAPI indicated auto-mode is not supported (404 / API version / feature flag gate). */
export declare class AutoModeUnsupportedError extends Error {
    readonly cause?: unknown | undefined;
    constructor(message: string, cause?: unknown | undefined);
}

declare const AUTOPILOT_ASK_USER_RESPONSE = "The user is not available to respond and will review your work later. Work autonomously and make good decisions. If the request is genuinely ambiguous or unresolvable, stop and call task_complete summarizing the ambiguity rather than proceeding on an unfounded assumption.";

/**
 * Message sent to the agent when session goes idle without task completion.
 * Used by both interactive mode (app.tsx) and prompt mode (promptMode.ts).
 */
declare const AUTOPILOT_CONTINUATION_MESSAGE = "You have not yet marked the task as complete using the task_complete tool. If you were planning, stop planning and start implementing. You aren't done until you have fully completed the task.\n\nIMPORTANT: Do NOT call task_complete if:\n- You have open questions or ambiguities - make good decisions and keep working\n- You encountered an error - try to resolve it or find an alternative approach\n- There are remaining steps - complete them first\n\nKeep working autonomously until the task is truly finished, then call task_complete.";

declare type AutopilotObjectiveContinuationDecision = "continue" | "skip" | "stop";

declare interface AutopilotObjectiveContinuationProvider {
    getState(): AutopilotObjectiveState | undefined;
    isReady?(): boolean;
    shouldContinue(): AutopilotObjectiveContinuationDecision;
    buildContinuationPrompt(defaultPrompt: string): string;
    recordObjectiveTurnStarted(): void;
    recordObjectiveTurnFinished(): void;
    recordContinuation(): void;
}

declare interface AutopilotObjectiveMutationResult {
    readonly state: AutopilotObjectiveState;
    readonly previous?: AutopilotObjectiveState;
}

declare type AutopilotObjectiveOrigin = "objective" | "user" | null;

declare class AutopilotObjectiveRegistry implements AutopilotObjectiveContinuationProvider {
    private readonly session;
    private state;
    private nextId;
    private disposed;
    private readyResolved;
    private writeQueue;
    private readonly initialization;
    private readonly unsubscribeShutdown;
    private readonly unsubscribeTaskComplete;
    private readonly unsubscribeModeChanged;
    private readonly unsubscribeTurnStart;
    private readonly unsubscribeUsage;
    private completionEligibleObjectiveId;
    constructor(session: AutopilotObjectiveRegistrySession);
    ready(): Promise<void>;
    flushPendingWrites(): Promise<void>;
    isReady(): boolean;
    getState(): AutopilotObjectiveState | undefined;
    set(objectiveInput: string): Promise<AutopilotObjectiveMutationResult | {
        error: string;
    }>;
    pause(reason?: string): Promise<AutopilotObjectiveMutationResult | {
        error: string;
    }>;
    resume(): Promise<AutopilotObjectiveMutationResult | {
        error: string;
    }>;
    clear(): Promise<AutopilotObjectiveMutationResult | {
        error: string;
    }>;
    recordObjectiveTurnStarted(): void;
    recordObjectiveTurnFinished(): void;
    recordContinuation(): void;
    markCompleted(summary: string): AutopilotObjectiveState | undefined;
    shouldContinue(): AutopilotObjectiveContinuationDecision;
    buildContinuationPrompt(defaultPrompt: string): string;
    dispose(): void;
    private initialize;
    private handleTaskComplete;
    private recordAssistantTurnStarted;
    private recordUsage;
    private handleModeChanged;
    private restoreInteractiveModeIfObjectiveOwned;
    private getStorageUnavailableError;
    private hasStorage;
    private persistSnapshotSafely;
    private emitOutcomeTelemetry;
    private persistSnapshot;
    private assertActive;
}

declare type AutopilotObjectiveRegistrySession = Pick<Session, "currentMode" | "emit" | "getAutopilotObjectivePath" | "on" | "readAutopilotObjective" | "sendTelemetry" | "writeAutopilotObjective">;

declare interface AutopilotObjectiveState {
    readonly id: number;
    readonly objective: string;
    readonly status: AutopilotObjectiveStatus;
    readonly autopilotOrigin: AutopilotObjectiveOrigin;
    readonly continuationCount: number;
    readonly turnCount: number;
    readonly tokenCount: number;
    readonly createdAt: string;
    readonly updatedAt: string;
    readonly completionSummary?: string;
    readonly pauseReason?: string;
}

declare type AutopilotObjectiveStatus = "active" | "paused" | "completed";

/**
 * 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 tracked 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";

/**
 * 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;
    /** When true, tool output should always be displayed expanded in the CLI timeline. */
    displayVerbatim?: boolean;
    safeForTelemetry?: Tool_2["safeForTelemetry"] & Tool["safeForTelemetry"];
    filterMode?: ContentFilterMode;
    disableSecretMasking?: boolean;
    /** MCP Apps (SEP-1865) tool metadata propagated from the server's tools/list response. */
    _meta?: {
        ui?: McpUiToolMeta;
    };
    /** MCP task support level declared by the tool via `execution.taskSupport`. */
    taskSupport?: "required" | "optional" | "forbidden";
};

/**
 * This event is temporary until we extract vision support from being internal to getCompletionWithTools.
 */
declare type BinaryAttachmentRemovalEvent = {
    kind: "binary_attachments_removed";
    turn: number;
    largeImagesRemoved?: number;
    imagesRemoved: number;
    filesRemoved?: number;
};

export declare type BinaryResult = z.infer<typeof BinaryResultSchema>;

/**
 * Binary result returned by a tool for the model.
 */
export declare const BinaryResultSchema: z.ZodObject<{
    type: z.ZodEnum<["image", "resource"]>;
    data: z.ZodString;
    mimeType: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
    metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, "strip", z.ZodTypeAny, {
    type: "image" | "resource";
    data: string;
    mimeType: string;
    description?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
}, {
    type: "image" | "resource";
    data: string;
    mimeType: string;
    description?: string | undefined;
    metadata?: Record<string, unknown> | undefined;
}>;

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, {
    type: "blob";
    data: string;
    mimeType: string;
    displayName?: string | undefined;
}, {
    type: "blob";
    data: string;
    mimeType: string;
    displayName?: string | undefined;
}>;

/**
 * https://github.com/github/ebpf-padawan-egress-firewall/blob/c00dd1d15907585336fd154088a8eb7ee88c9841/pkg/logger/request.go#L71-L83
 */
declare interface BlockedRequest {
    because: string;
    blockedAt: string;
    cmd: string;
    domains: string;
    hasBeenRedirected: boolean;
    ip: string;
    originalIp: string;
    port: string;
    ruleSourceComment: string;
    url: string;
}

declare const BLUEBIRD_MCP_SERVER_NAME = "bluebird";

/**
 * Builds the `providerAndModel` string for BYOM (custom provider) sessions,
 * encoding reasoning options when set so that `splitAgentModelSetting` can
 * parse them into client options.
 */
export declare function buildByomProviderAndModel(model: string, reasoningEffort: string | undefined, reasoningSummary: ReasoningSummary | undefined): string;

/**
 * Build the model-facing input schema for code review / parallel validation.
 *
 * When trivial change awareness is enabled, `trivialChangeDeclaration` is
 * **required** so the model must always populate it — this eliminates flakiness
 * from the model omitting an optional field. When disabled, the field stays
 * optional since the model has no instructions about it.
 *
 * Note: the callback still parses with `codeReviewInputSchema` (always optional)
 * so it gracefully handles either case.
 */
declare function buildCodeReviewModelSchema(trivialEnabled: boolean): z_2.ZodObject<{
    trivialChangeDeclaration: z_2.ZodObject<{
        isTrivial: z_2.ZodBoolean;
        reason: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        reason: string;
        isTrivial: boolean;
    }, {
        reason: string;
        isTrivial: boolean;
    }> | z_2.ZodOptional<z_2.ZodObject<{
        isTrivial: z_2.ZodBoolean;
        reason: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        reason: string;
        isTrivial: boolean;
    }, {
        reason: string;
        isTrivial: boolean;
    }>>;
    prTitle: z_2.ZodString;
    prDescription: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    prDescription: string;
    prTitle: string;
    trivialChangeDeclaration?: {
        reason: string;
        isTrivial: boolean;
    } | undefined;
}, {
    prDescription: string;
    prTitle: string;
    trivialChangeDeclaration?: {
        reason: string;
        isTrivial: boolean;
    } | undefined;
}>;

/**
 * Builds LargeOutputOptions from an optional sessionFs and optional size settings.
 */
declare function buildLargeOutputOptions(sessionFs?: SessionFs, settings?: {
    maxSizeBytes?: number;
}, grepToolName?: string): LargeOutputOptions;

declare function buildToolCallbackOptions(client: Client_2, settings: RuntimeSettings, tools: readonly Pick<ToolMetadata, "name" | "description">[], abortSignal?: AbortSignal, sessionFs?: SessionFs): Promise<Omit<ToolCallbackOptions, "toolCallId">>;

/**
 * Zod schemas for the `canvas` client API group.
 *
 * These methods are called by the server on the SDK client to perform
 * canvas provider lifecycle operations. The proxy layer automatically
 * injects `sessionId` on the wire.
 */
declare const canvasClientApiSchema: {
    open: {
        description: string;
        params: z_2.ZodObject<{
            extensionId: z_2.ZodString;
            canvasId: z_2.ZodString;
            instanceId: z_2.ZodString;
            input: z_2.ZodOptional<z_2.ZodUnknown>;
            host: z_2.ZodOptional<z_2.ZodObject<{
                capabilities: z_2.ZodOptional<z_2.ZodObject<{
                    canvases: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    canvases?: boolean | undefined;
                }, {
                    canvases?: boolean | undefined;
                }>>;
            }, "strip", z_2.ZodTypeAny, {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            }, {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            }>>;
            session: z_2.ZodOptional<z_2.ZodObject<{
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                workingDirectory?: string | undefined;
            }, {
                workingDirectory?: string | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            instanceId: string;
            extensionId: string;
            canvasId: string;
            session?: {
                workingDirectory?: string | undefined;
            } | undefined;
            host?: {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            } | undefined;
            input?: unknown;
        }, {
            instanceId: string;
            extensionId: string;
            canvasId: string;
            session?: {
                workingDirectory?: string | undefined;
            } | undefined;
            host?: {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            } | undefined;
            input?: unknown;
        }>;
        result: z_2.ZodObject<{
            url: z_2.ZodOptional<z_2.ZodString>;
            title: z_2.ZodOptional<z_2.ZodString>;
            status: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            status?: string | undefined;
            url?: string | undefined;
            title?: string | undefined;
        }, {
            status?: string | undefined;
            url?: string | undefined;
            title?: string | undefined;
        }>;
    };
    close: {
        description: string;
        params: z_2.ZodObject<{
            extensionId: z_2.ZodString;
            canvasId: z_2.ZodString;
            instanceId: z_2.ZodString;
            host: z_2.ZodOptional<z_2.ZodObject<{
                capabilities: z_2.ZodOptional<z_2.ZodObject<{
                    canvases: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    canvases?: boolean | undefined;
                }, {
                    canvases?: boolean | undefined;
                }>>;
            }, "strip", z_2.ZodTypeAny, {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            }, {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            }>>;
            session: z_2.ZodOptional<z_2.ZodObject<{
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                workingDirectory?: string | undefined;
            }, {
                workingDirectory?: string | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            instanceId: string;
            extensionId: string;
            canvasId: string;
            session?: {
                workingDirectory?: string | undefined;
            } | undefined;
            host?: {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            } | undefined;
        }, {
            instanceId: string;
            extensionId: string;
            canvasId: string;
            session?: {
                workingDirectory?: string | undefined;
            } | undefined;
            host?: {
                capabilities?: {
                    canvases?: boolean | undefined;
                } | undefined;
            } | undefined;
        }>;
    };
    action: {
        invoke: {
            description: string;
            params: z_2.ZodObject<{
                extensionId: z_2.ZodString;
                canvasId: z_2.ZodString;
                instanceId: z_2.ZodString;
                actionName: z_2.ZodString;
                input: z_2.ZodOptional<z_2.ZodUnknown>;
                host: z_2.ZodOptional<z_2.ZodObject<{
                    capabilities: z_2.ZodOptional<z_2.ZodObject<{
                        canvases: z_2.ZodOptional<z_2.ZodBoolean>;
                    }, "strip", z_2.ZodTypeAny, {
                        canvases?: boolean | undefined;
                    }, {
                        canvases?: boolean | undefined;
                    }>>;
                }, "strip", z_2.ZodTypeAny, {
                    capabilities?: {
                        canvases?: boolean | undefined;
                    } | undefined;
                }, {
                    capabilities?: {
                        canvases?: boolean | undefined;
                    } | undefined;
                }>>;
                session: z_2.ZodOptional<z_2.ZodObject<{
                    workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    workingDirectory?: string | undefined;
                }, {
                    workingDirectory?: string | undefined;
                }>>;
            }, "strip", z_2.ZodTypeAny, {
                instanceId: string;
                extensionId: string;
                canvasId: string;
                actionName: string;
                session?: {
                    workingDirectory?: string | undefined;
                } | undefined;
                host?: {
                    capabilities?: {
                        canvases?: boolean | undefined;
                    } | undefined;
                } | undefined;
                input?: unknown;
            }, {
                instanceId: string;
                extensionId: string;
                canvasId: string;
                actionName: string;
                session?: {
                    workingDirectory?: string | undefined;
                } | undefined;
                host?: {
                    capabilities?: {
                        canvases?: boolean | undefined;
                    } | undefined;
                } | undefined;
                input?: unknown;
            }>;
            result: z_2.ZodUnknown;
        };
    };
};

declare type CanvasContribution = z_2.infer<typeof canvasContributionSchema>;

declare const canvasContributionSchema: z_2.ZodObject<{
    id: z_2.ZodString;
    displayName: z_2.ZodString;
    description: z_2.ZodString;
    inputSchema: z_2.ZodOptional<z_2.ZodType<Record<string, unknown>, z_2.ZodTypeDef, Record<string, unknown>>>;
    actions: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
        name: z_2.ZodString;
        description: z_2.ZodOptional<z_2.ZodString>;
        inputSchema: z_2.ZodOptional<z_2.ZodType<Record<string, unknown>, z_2.ZodTypeDef, Record<string, unknown>>>;
    }, "strip", z_2.ZodTypeAny, {
        name: string;
        description?: string | undefined;
        inputSchema?: Record<string, unknown> | undefined;
    }, {
        name: string;
        description?: string | undefined;
        inputSchema?: Record<string, unknown> | undefined;
    }>, "many">>;
}, "strip", z_2.ZodTypeAny, {
    description: string;
    id: string;
    displayName: string;
    inputSchema?: Record<string, unknown> | undefined;
    actions?: {
        name: string;
        description?: string | undefined;
        inputSchema?: Record<string, unknown> | undefined;
    }[] | undefined;
}, {
    description: string;
    id: string;
    displayName: string;
    inputSchema?: Record<string, unknown> | undefined;
    actions?: {
        name: string;
        description?: string | undefined;
        inputSchema?: Record<string, unknown> | undefined;
    }[] | undefined;
}>;

declare type CanvasProviderClientApi = ApiSchemaToInterface<typeof canvasClientApiSchema>;

declare interface CanvasProviderConnection {
    open: CanvasProviderClientApi["open"];
    close: CanvasProviderClientApi["close"];
    invokeAction(params: Parameters<CanvasProviderInvokeAction>[0]): ReturnType<CanvasProviderInvokeAction>;
}

declare interface CanvasProviderInfo {
    extensionId: string;
    extensionName?: string;
}

declare type CanvasProviderInvokeAction = CanvasProviderClientApi["action"]["invoke"];

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"capabilities.changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        ui: z.ZodOptional<z.ZodObject<{
            elicitation: z.ZodOptional<z.ZodBoolean>;
            mcpApps: z.ZodOptional<z.ZodBoolean>;
            canvases: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        }, {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    }, {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "capabilities.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "capabilities.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}>;

/**
 * Typed context for CAPI-specific request headers.
 * Set at client creation time; mapped to HTTP headers in {@link CopilotOpenAIClient.prepareOptions}.
 */
declare type CAPIRequestContext = {
    /** The type of interaction — agent, subagent, sampling, background, compaction, 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;
};

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;
};

/**
 * Core callback logic for checking dependencies against the GitHub advisory database.
 * Shared by both the in-process Tool and the MCP tool wrapper.
 */
declare function checkDependencies(input: DependencyCheckerInput, settings?: RuntimeSettings): Promise<ToolResult>;

/**
 * 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;
}

/**
 * A compaction checkpoint broken into sections.
 */
declare interface CheckpointRow {
    session_id: string;
    checkpoint_number: number;
    title?: string;
    overview?: string;
    history?: string;
    work_done?: string;
    technical_details?: string;
    important_files?: string;
    next_steps?: string;
    created_at?: string;
}

/**
 * Returns true when the Claude model variant supports tool search.
 * Supported: Mythos Preview, Sonnet 4.0+, Opus 4.0+ (no Haiku).
 */
declare function claudeModelSupportsToolSearch(model: string): boolean;

/**
 * Cleans up all temp files created by this module.
 * Errors are logged but not thrown to avoid disrupting shutdown flows.
 *
 * Set COPILOT_KEEP_TEMP_FILES=true to skip cleanup (useful for debugging).
 */
declare function cleanupTempFiles(): Promise<void>;

/** Clears the cached model list so the next retrieval hits the server. */
export declare function clearCachedModels(): void;

/**
 * Clears `deferLoading` on tools that a custom agent listed in its `tools`
 * array. When a custom agent specifies tools by name (not wildcard `"*"`),
 * those tools are made fully visible to the model by default — deferring
 * them behind tool_search is counterproductive because the model doesn't
 * know to search for tools the agent already said it needs.
 *
 * Supports exact names, namespaced names (`ado/wit_get_work_item`), and
 * wildcard namespace patterns (`ado/*`).
 *
 * Agents can opt back into deferral by setting `deferredToolLoading: true`
 * (YAML) / `deferred-tool-loading: true` (Markdown frontmatter), in which
 * case this function is a no-op and `markToolsAsDeferred`'s decisions stand.
 *
 * @param tools - The mutable array of tools (modified in place)
 * @param customAgent - The custom agent whose tool list and opt-in flag are checked
 */
declare function clearDeferralForAgentTools(tools: Tool_2[], customAgent: {
    tools?: string[] | null;
    deferredToolLoading?: boolean;
} | undefined): void;

export declare const CLI_CLIENT_NAME = "github/cli";

declare interface Client_2 {
    readonly model: string;
    supportsNativeFileAttachmentMimeType(mimeType: string): Promise<boolean>;
    getPreferredImageAttachmentFormat?(): ImageAttachmentRequestFormat;
    getCompletionWithTools(systemMessage: SystemMessageContent, initialMessages: ChatCompletionMessageParam[], tools: Tool_2[], options?: GetCompletionWithToolsOptions): AsyncGenerator<Event_2>;
}

declare interface ClientFactory {
    createClient(options: Implementation, capabilities: ClientOptions_2): 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;
    /**
     * Whether this server declared the `tasks.requests.tools.call` capability,
     * indicating it supports task-augmented tool calls.
     */
    serverSupportsTaskTools?: boolean;
    /**
     * Optional list of tool names to exclude, applied after the `tools` include filter.
     * A tool in this list is hidden even when `tools` is `["*"]`.
     */
    excludeTools?: string[];
};

/**
 * 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;
    /**
     * The default reasoning summary mode for model clients that support it.
     * Use "none" to suppress summary output regardless of whether reasoning is enabled.
     * Providers that do not support summary verbosity may ignore it.
     */
    defaultReasoningSummary?: ReasoningSummary;
    /**
     * Deprecated compatibility alias for requesting reasoning summaries by default.
     * Use `defaultReasoningSummary: "detailed"` instead.
     */
    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 HTTP request,
     * or in the per-message header envelope for WebSocket requests (synchronously, never blocks).
     */
    featureFlagService?: IFeatureFlagService;
    /**
     * When true, disables WebSocket Responses routing even if the feature flag is
     * enabled and the model advertises `ws:/responses` support.
     */
    disableWebSocketResponses?: boolean;
    /** SDK-supplied overrides for model capabilities, deep-merged over runtime defaults. */
    modelCapabilitiesOverride?: ModelCapabilitiesOverride;
    /** OpenAI Responses API prompt cache key. */
    promptCacheKey?: string;
    /**
     * When set, enables the Anthropic advisor tool, allowing the executor model to
     * consult a higher-intelligence advisor model mid-generation for strategic guidance.
     * The value is the advisor model ID (e.g. "claude-opus-4-7").
     * Only applicable to Anthropic models.
     */
    advisorModel?: string;
    /**
     * When true, uses Anthropic's built-in server-side tool search
     * (`tool_search_tool_regex_20251119`) instead of the client-side
     * `tool_search_tool_regex` implementation. The API handles search
     * execution and tool reference expansion automatically.
     * Only applicable to Anthropic models.
     */
    builtinToolSearch?: boolean;
};

/**
 * 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;
        /**
         * Extra wait time added to the base `defaultRetryAfterSeconds` for 429
         * responses that lack a usable `retry-after` header (or when the header
         * exceeds the cap). Combined with the base, the first retry delay is
         * `defaultRetryAfterSeconds + initialRetryAfterBackoffExtraSeconds`, and
         * subsequent attempts grow by {@link retryAfterBackoffExtraGrowth}.
         */
        initialRetryAfterBackoffExtraSeconds?: number;
        /**
         * The growth factor for the exponential backoff extra time added
         * to rate-limit and transient-error retry delays (e.g. 2x doubles each attempt).
         */
        retryAfterBackoffExtraGrowth?: number;
        /**
         * The maximum wait time in between retries.
         */
        maxRetryAfterSeconds?: number;
    };
};

declare type CloudSessionStoreSqlInput = {
    description: string;
    query: string;
};

/** Diagnostic stats exposed by {@link CoalescingWriteQueue.stats}. */
declare interface CoalescingWriteQueueStats {
    writeCount: number;
    pendingLength: number;
    drainScheduled: boolean;
}

/** Feature flag name for explicitly disabling the code review tool */
declare const CODE_REVIEW_DISABLE_FF_NAME = "copilot_swe_agent_code_review_disabled";

/** Feature flag name for enabling the code review tool */
declare const CODE_REVIEW_FF_NAME = "copilot_swe_agent_code_review";

/** Tool name constant for the code review tool */
declare const CODE_REVIEW_TOOL_NAME = "code_review";

declare const CODE_REVIEW_TOOL_TITLE = "Code Review";

/**
 * Code change metrics tracked during a session
 */
export declare interface CodeChangeMetrics {
    linesAdded: number;
    linesRemoved: number;
    filesModified: Set<string>;
}

declare class CodeQLCheckerTool {
    private readonly config;
    private readonly git;
    private readonly baseCommit;
    private readonly settings;
    private readonly logger;
    static readonly DEFAULT_MAX_REPO_SIZE_BYTES = 10000000;
    static readonly DEFAULT_TIMEOUT_MS: number;
    static TOOL_NAME: string;
    static TOOL_TITLE: string;
    static CODEQL_CHECKER_ENABLED_FF: string;
    static CODEQL_CHECKER_DISABLED_FF: string;
    static isEnabled(settings: RuntimeSettings): boolean;
    private readonly budgeter;
    private executor;
    private codeQLScratchDir;
    private lastRepoChangeSet;
    constructor(config: ToolConfig, git: GitHandler, baseCommit: string, settings: RuntimeSettings, logger: RunnerLogger);
    getCodeQLCheckerTool(): Promise<ValidationTool | undefined>;
    /**
     * Callback function for the CodeQL Checker tool.
     *
     * This function will ensure that codeql is available. It will first check the
     * toolcache and then check the scratch directory. If codeql is not in either location,
     * the latest version will be downloaded and unzipped into the scratch directory.
     *
     * It will then determine which languages have changed files. For each of these languages,
     * a codeql database will be created and analyzed.
     */
    private callback;
    private generateAnalysisReport;
    private countTotalAlerts;
    /**
     * This function is used to log progress back to the controlling agent.
     * Even though it is marked as async, most of the time we do not need to wait for
     * its completion and a failure should not block the main execution. Therefore,
     * this function is typically called with `void`.
     *
     * @param message The message to log.
     * @param logLevel The log level to use. Defaults to LogLevel.Info.
     * @param group An optional group name. If provided, the log will be grouped under this name.
     */
    private logProgress;
    /**
     * Returns a fixed scratch dir under os.tmpdir() derived from the repository
     * root path. Using a stable name means a previously-downloaded CodeQL bundle
     * and databases are found on subsequent runs, avoiding redundant downloads.
     */
    private createCodeQLScratchDir;
    /**
     * Sends telemetry data for each programming language processed. One telemetry event
     * for each language.
     * @param languageTelemetry A record of telemetry data for each language processed.
     */
    createTelemetryByLanguage(languageTelemetry: Record<string, LanguageTelemetry>, version: string): CodeQLCompletionTelemetry[];
    /**
     * Returns the reason a language should be skipped, or `undefined` if it should be analyzed.
     */
    private shouldAnalyzeLanguage;
    private skipReasonMessage;
}

/**
 * Telemetry event sent when CodeQL Checker completes a language analysis run.
 *
 * We expect exactly one `CodeQLCompletionTelemetry` event per language.
 */
declare type CodeQLCompletionTelemetry = CodeQLLanguageCompletionTelemetry | CodeQLSkippedTelemetry;

/**
 * Telemetry event sent when CodeQL Checker tool completes analysis for
 * a specific language.
 */
declare type CodeQLLanguageCompletionTelemetry = EventTelemetry<"codeql-checker-completion", {
    properties: {
        "codeql.language": string;
        "codeql.version": string;
        "codeql.databaseCreationSuccess": "true" | "false";
        "codeql.analysisSuccess"?: "true" | "false";
        "codeql.analysisRuleIds": string;
        "codeql.querySuite"?: string;
        "codeql.aborted"?: "true" | "false";
        "codeql.databaseOverlayStatus"?: DatabaseOverlayStatus;
        "codeql.databaseOverlayBaseDatabaseNotAvailableBecause"?: string;
    };
    metrics: {
        "codeql.databaseCreationTimeMs": number;
        "codeql.analysisTimeMs"?: number;
        "codeql.alertCount": number;
        "codeql.databaseOverlayDownloadTimeMs"?: number;
    };
    restrictedProperties: {
        "codeql.databaseCreationError"?: string;
        "codeql.databaseCreationStack"?: string;
        "codeql.analysisError"?: string;
        "codeql.analysisStack"?: string;
        "codeql.databaseOverlayError"?: string;
    };
}>;

/**
 * Telemetry event sent when CodeQL Checker tool is skipped.
 */
declare type CodeQLSkippedTelemetry = EventTelemetry<"codeql-checker-completion", {
    properties: {
        "codeql.skipped": "true";
        "codeql.skippedReason": SkipReason;
        "codeql.language": string;
        "codeql.version": string;
    };
    metrics: Record<string, never>;
    restrictedProperties: Record<string, never>;
}>;

/**
 * Input parameters required for the code review tool.
 * The agent must provide these parameters when calling the tool.
 */
declare type CodeReviewInput = z_2.infer<typeof codeReviewInputSchema>;

/**
 * Zod schema for code review tool input (parsing — always optional trivialChangeDeclaration).
 */
declare const codeReviewInputSchema: z_2.ZodObject<{
    trivialChangeDeclaration: z_2.ZodOptional<z_2.ZodObject<{
        isTrivial: z_2.ZodBoolean;
        reason: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        reason: string;
        isTrivial: boolean;
    }, {
        reason: string;
        isTrivial: boolean;
    }>>;
    prTitle: z_2.ZodString;
    prDescription: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    prDescription: string;
    prTitle: string;
    trivialChangeDeclaration?: {
        reason: string;
        isTrivial: boolean;
    } | undefined;
}, {
    prDescription: string;
    prTitle: string;
    trivialChangeDeclaration?: {
        reason: string;
        isTrivial: boolean;
    } | undefined;
}>;

/**
 * Builder for the `code_review` tool.
 *
 * Mirrors the shape of {@link CodeQLCheckerTool}: static metadata + feature
 * flag gating live on the class, and a public `getCodeReviewTool()` method
 * returns the {@link ValidationTool} definition the agent registers.
 *
 * The constructor takes an optional `model` override so callers (e.g. CCA)
 * can experiment with models other than {@link DEFAULT_CODE_REVIEW_MODEL}.
 */
declare class CodeReviewTool {
    private readonly config;
    private readonly logger;
    private readonly exec;
    private readonly settings;
    private readonly baseCommit;
    private readonly git;
    static readonly TOOL_NAME = "code_review";
    static readonly TOOL_TITLE = "Code Review";
    static readonly FF_NAME = "copilot_swe_agent_code_review";
    static readonly DISABLE_FF_NAME = "copilot_swe_agent_code_review_disabled";
    static readonly MAX_FILE_COUNT = 100;
    static readonly DEFAULT_MODEL: string;
    static isEnabled(settings: RuntimeSettings): boolean;
    private readonly budgeter;
    private readonly model;
    private lastRepoChangeSet;
    constructor(config: ToolConfig, logger: RunnerLogger, exec: RunnerExec, settings: RuntimeSettings, baseCommit: string, git: GitHandler, options?: CodeReviewToolOptions);
    /**
     * Builds the {@link ValidationTool} definition for `code_review`.
     *
     * Run lazily so feature flags and trivial-change instructions reflect the
     * settings snapshot in effect at tool-list construction time.
     */
    getCodeReviewTool(): Promise<ValidationTool>;
    private callback;
}

/**
 * Options accepted by the {@link CodeReviewTool} constructor.
 */
declare type CodeReviewToolOptions = {
    /**
     * Override the model used by the autofind CLI.
     *
     * Resolution order when constructing a `CodeReviewTool`: this option, then
     * `settings.tools.validation.codeReview.model`, then
     * {@link DEFAULT_CODE_REVIEW_MODEL}. Leave undefined to defer to the
     * settings override or, failing that, the default.
     */
    model?: ModelName;
};

/** Column number in a source file (1-based) */
declare type ColumnNumber = number;

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>;
    agentId: z.ZodOptional<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, {
    type: "command.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "command.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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;
        args: string;
        requestId: string;
        commandName: string;
    }, {
        command: string;
        args: string;
        requestId: string;
        commandName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "command.execute";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        args: string;
        requestId: string;
        commandName: string;
    };
    agentId?: string | undefined;
}, {
    type: "command.execute";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        args: string;
        requestId: string;
        commandName: string;
    };
    agentId?: string | undefined;
}>;

/** 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>;
    agentId: z.ZodOptional<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, {
    type: "command.queued";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "command.queued";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        requestId: string;
    };
    agentId?: string | undefined;
}>;

declare type CommonHookContext = {
    /**
     * The session identifier for correlating hook events.
     */
    sessionId: string;
    /**
     * The commit hash before the agent made any changes.
     */
    initialCommitHash: string;
    /**
     * The location where the agent is currently making changes.
     */
    location: string;
    callback?: IAgentCallback;
    settings: RuntimeSettings;
    logger: RunnerLogger;
    /**
     * A git handler to use for any git operations.
     */
    gitHandler: GitHandler;
};

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;
    requestId?: string;
    serviceRequestId?: string;
    compactionTokensUsed?: {
        inputTokens: number;
        outputTokens: number;
        cacheReadTokens: number;
        cacheWriteTokens: number;
        copilotUsage?: NormalizedCopilotUsage;
        duration?: number;
        model?: string;
    };
};

/**
 * 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;
    shouldLog(level: LogLevel): 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;
}

/**
 * Authorized-readers lattice following the FIDES paper (§4.1):
 *   A ⊑ B  iff  B ⊆ A  (fewer readers = more confidential = higher in lattice)
 *   join (LUB) = intersection  (combining data restricts to common readers)
 *   meet (GLB) = union          (relaxes to all readers of either operand)
 *
 * The "public" sentinel represents the universe of readers (bottom element / least restrictive).
 */
declare class ConfidentialityLabel implements Lattice<ConfidentialityLabel> {
    readonly level: "public" | "private";
    readonly readers: ReadonlySet<string>;
    static public(): ConfidentialityLabel;
    static private(readers: ReadonlySet<string>): ConfidentialityLabel;
    private constructor();
    get isPrivate(): boolean;
    get isPublic(): boolean;
    /** A ⊑ B if B ⊆ A (reverse subset — fewer readers means higher/more restrictive). */
    leq(other: ConfidentialityLabel): boolean;
    /** intersection of readers (combining data restricts audience). */
    join(other: ConfidentialityLabel): ConfidentialityLabel;
    /** union of readers (relaxes to either operand's audience). */
    meet(other: ConfidentialityLabel): ConfidentialityLabel;
    equals(other: ConfidentialityLabel): boolean;
    toString(): string;
    /**
     * Round-trip-friendly serialization that distinguishes ⊥ from ⊤:
     *   - public() → `["public"]`
     *   - private(∅) → `[]`
     *   - private([alice, bob]) → `["alice", "bob"]`
     *
     * The `["public"]` sentinel matches the legacy wire format accepted by
     * {@link parseIfcLabel}.
     */
    toJSON(): string[];
}

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;
}

/**
 * Optional per-session context used to populate the consolidation
 * (rem-agent) system prompt with a fresh snapshot of the parent's
 * board, conversation turns, and latest checkpoint.
 */
declare type ConsolidationContext = {
    store: SessionStore;
    sessionId: string;
    /**
     * When set, identifies a parent session whose trajectory the rem-agent
     * should consolidate (e.g., when this session is a detached headless
     * child spawned on the parent's interactive shutdown). Turns and
     * checkpoints are read under `detachedFromSpawningParentSessionId` instead of `sessionId`
     * so the child consolidates the parent's work, not its own empty
     * trajectory. The board lookup is repo/branch-keyed and unaffected.
     */
    detachedFromSpawningParentSessionId?: string;
    repository: string;
    branch: string;
};

export declare type ContentBlock = z.infer<typeof ContentBlockSchema>;

/**
 * Content block union type
 */
export declare const ContentBlockSchema: z.ZodUnion<[z.ZodObject<{
    type: z.ZodLiteral<"text">;
    text: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "text";
    text: string;
}, {
    type: "text";
    text: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"terminal">;
    text: z.ZodString;
    exitCode: z.ZodOptional<z.ZodNumber>;
    cwd: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    type: "terminal";
    text: string;
    cwd?: string | undefined;
    exitCode?: number | undefined;
}, {
    type: "terminal";
    text: string;
    cwd?: string | undefined;
    exitCode?: number | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"image">;
    data: z.ZodString;
    mimeType: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "image";
    data: string;
    mimeType: string;
}, {
    type: "image";
    data: string;
    mimeType: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"audio">;
    data: z.ZodString;
    mimeType: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "audio";
    data: string;
    mimeType: string;
}, {
    type: "audio";
    data: string;
    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?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }, {
        src: string;
        theme?: "dark" | "light" | 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;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    size?: number | undefined;
}, {
    type: "resource_link";
    name: string;
    uri: string;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    size?: number | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"resource">;
    resource: z.ZodUnion<[z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }>, z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        blob: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }>]>;
}, "strip", z.ZodTypeAny, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}>]>;

/**
 * Response from the content exclusion API for a single repository.
 */
declare type ContentExclusionApiResponse = z_2.infer<typeof contentExclusionApiResponseSchema>;

/**
 * Zod schema for a single entry in the content exclusion API response array.
 */
declare const contentExclusionApiResponseSchema: z_2.ZodObject<{
    rules: z_2.ZodArray<z_2.ZodObject<{
        paths: z_2.ZodArray<z_2.ZodString, "many">;
        ifAnyMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        ifNoneMatch: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        source: z_2.ZodObject<{
            name: z_2.ZodString;
            type: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            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;
    private disposed;
    private retainCount;
    private readonly finalizerToken;
    /** 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;
    /** Handle to the native ContentExclusionRuntime instance. */
    private readonly runtimeHandle;
    /** 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[]);
    retain(): void;
    dispose(): void;
    isUnavailable(): boolean;
    private getUnavailableResult;
    /**
     * 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 logIgnoredRepoScopedInjectedPolicies;
    private logCachedRules;
    private fetchedRulesToJson;
    private cacheFetchedRules;
    private cacheWildcardRules;
    /**
     * 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;
    /**
     * Gets the git root for a file path, using cache.
     */
    private getGitRootForPath;
    /**
     * Core exclusion check logic.
     */
    private checkExclusion;
    /**
     * 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"
}

/**
 * Well-known context tiers for models with tiered context pricing.
 * The wire protocol leaves `contextTier` open as a string for forward
 * compatibility; the runtime validates against this list at the wire boundary.
 */
declare const CONTEXT_TIER_LEVELS: readonly ["default", "long_context"];

declare type ContextTier = (typeof CONTEXT_TIER_LEVELS)[number];

declare type CopilotAPIEndpoint = "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses";

/** 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" | "usage"> & {
    choices: CopilotChatCompletionChunkChoices;
    usage?: CopilotCompletionUsage | null;
    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 & {
    responses_message_status?: ResponsesMessageStatus;
    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;

declare type CopilotCompletionUsage = Omit<NonNullable<ChatCompletion["usage"]>, "prompt_tokens_details"> & {
    prompt_tokens_details?: CopilotPromptTokensDetails;
    /** Reasoning tokens reported by CAPI for models like Gemini. */
    reasoning_tokens?: number;
};

declare type CopilotExpAssignmentResponse = z.infer<typeof CopilotExpAssignmentResponseSchema>;

/**
 * CopilotExpAssignmentResponse represents the response structure from the ExP API for feature assignments.
 */
declare const CopilotExpAssignmentResponseSchema: z.ZodObject<{
    Features: z.ZodArray<z.ZodString, "many">;
    Flights: z.ZodRecord<z.ZodString, z.ZodString>;
    Configs: z.ZodArray<z.ZodObject<{
        Id: z.ZodString;
        Parameters: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>>;
    }, "strip", z.ZodTypeAny, {
        Id: string;
        Parameters: Record<string, string | number | boolean | null>;
    }, {
        Id: string;
        Parameters: Record<string, string | number | boolean | null>;
    }>, "many">;
    ParameterGroups: z.ZodType<unknown, z.ZodTypeDef, unknown>;
    FlightingVersion: z.ZodNumber;
    ImpressionId: z.ZodString;
    AssignmentContext: z.ZodString;
}, "strip", z.ZodTypeAny, {
    Features: string[];
    Flights: Record<string, string>;
    Configs: {
        Id: string;
        Parameters: Record<string, string | number | boolean | null>;
    }[];
    FlightingVersion: number;
    ImpressionId: string;
    AssignmentContext: string;
    ParameterGroups?: unknown;
}, {
    Features: string[];
    Flights: Record<string, string>;
    Configs: {
        Id: string;
        Parameters: Record<string, string | number | boolean | null>;
    }[];
    FlightingVersion: number;
    ImpressionId: string;
    AssignmentContext: string;
    ParameterGroups?: unknown;
}>;

declare type CopilotPromptTokensDetails = NonNullable<NonNullable<ChatCompletion["usage"]>["prompt_tokens_details"]> & {
    /** Tokens written to the prompt cache (e.g. Anthropic's `cache_creation_input_tokens`). */
    cache_creation_tokens?: number;
};

declare interface CopilotSessionsClient {
    sessionId(): string;
    error(error: Error): Promise<void>;
    log(logs: SessionLogsContent): Promise<void>;
    logNonCompletionContent(content: string): Promise<void>;
    createOrUpdateMCPStartupToolCall(params: {
        content?: string;
        serverName: string;
        toolNamesToDisplayNames?: Record<string, string>;
    }): Promise<void>;
    createOrUpdateCloneToolCall(params: {
        content?: string;
        repo: string;
    }): Promise<void>;
    logTitleAndBody(title: string, body: string, agentId?: string): Promise<void>;
    getLogs(sessionId: string): Promise<SessionLogsContents | string | undefined>;
}

/** Per-request cost/usage data returned by CAPI as a peer of `usage`. */
declare interface CopilotUsage {
    token_details: CopilotUsageTokenDetail[];
    total_nano_aiu: number;
}

/** A single token-type cost entry returned by CAPI in `copilot_usage.token_details`. */
declare interface CopilotUsageTokenDetail {
    batch_size: number;
    cost_per_batch: number;
    token_count: number;
    token_type: string;
}

declare type CopilotUserResponse = z.infer<typeof copilotUserResponseSchema>;

declare const copilotUserResponseSchema: z.ZodObject<{
    login: z.ZodOptional<z.ZodString>;
    access_type_sku: z.ZodOptional<z.ZodString>;
    analytics_tracking_id: z.ZodOptional<z.ZodString>;
    assigned_date: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    can_signup_for_limited: z.ZodOptional<z.ZodBoolean>;
    chat_enabled: z.ZodOptional<z.ZodBoolean>;
    copilot_plan: z.ZodOptional<z.ZodString>;
    copilotignore_enabled: z.ZodOptional<z.ZodBoolean>;
    endpoints: z.ZodOptional<z.ZodObject<{
        api: z.ZodOptional<z.ZodString>;
        "origin-tracker": z.ZodOptional<z.ZodString>;
        proxy: z.ZodOptional<z.ZodString>;
        telemetry: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        api?: string | undefined;
        telemetry?: string | undefined;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
    }, {
        api?: string | undefined;
        telemetry?: string | undefined;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
    }>>;
    organization_login_list: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    organization_list: z.ZodNullable<z.ZodOptional<z.ZodArray<z.ZodNullable<z.ZodObject<{
        login: z.ZodNullable<z.ZodOptional<z.ZodString>>;
        name: z.ZodNullable<z.ZodOptional<z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        name?: string | null | undefined;
        login?: string | null | undefined;
    }, {
        name?: string | null | undefined;
        login?: string | null | undefined;
    }>>, "many">>>;
    codex_agent_enabled: z.ZodOptional<z.ZodBoolean>;
    is_mcp_enabled: z.ZodNullable<z.ZodOptional<z.ZodBoolean>>;
    quota_reset_date: z.ZodOptional<z.ZodString>;
    quota_snapshots: z.ZodOptional<z.ZodObject<{
        chat: z.ZodOptional<z.ZodObject<{
            entitlement: z.ZodOptional<z.ZodNumber>;
            overage_count: z.ZodOptional<z.ZodNumber>;
            overage_permitted: z.ZodOptional<z.ZodBoolean>;
            percent_remaining: z.ZodOptional<z.ZodNumber>;
            quota_id: z.ZodOptional<z.ZodString>;
            quota_remaining: z.ZodOptional<z.ZodNumber>;
            remaining: z.ZodOptional<z.ZodNumber>;
            unlimited: z.ZodOptional<z.ZodBoolean>;
            timestamp_utc: z.ZodOptional<z.ZodString>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | undefined;
        }>>;
    }, "strip", z.ZodNullable<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>;
        has_quota: z.ZodOptional<z.ZodBoolean>;
        quota_reset_at: z.ZodOptional<z.ZodNumber>;
        token_based_billing: z.ZodOptional<z.ZodBoolean>;
    }, "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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | 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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | undefined;
    }>>, z.objectOutputType<{
        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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | undefined;
        }>>;
    }, z.ZodNullable<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>;
        has_quota: z.ZodOptional<z.ZodBoolean>;
        quota_reset_at: z.ZodOptional<z.ZodNumber>;
        token_based_billing: z.ZodOptional<z.ZodBoolean>;
    }, "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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | 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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | undefined;
    }>>, "strip">, z.objectInputType<{
        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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | undefined;
        }>>;
    }, z.ZodNullable<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>;
        has_quota: z.ZodOptional<z.ZodBoolean>;
        quota_reset_at: z.ZodOptional<z.ZodNumber>;
        token_based_billing: z.ZodOptional<z.ZodBoolean>;
    }, "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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | 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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | undefined;
    }>>, "strip">>>;
    restricted_telemetry: z.ZodOptional<z.ZodBoolean>;
    token_based_billing: 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>>;
    cloud_session_storage_enabled: z.ZodOptional<z.ZodBoolean>;
    cli_remote_control_enabled: z.ZodOptional<z.ZodBoolean>;
}, "strip", z.ZodTypeAny, {
    login?: string | undefined;
    token_based_billing?: boolean | undefined;
    access_type_sku?: string | undefined;
    analytics_tracking_id?: string | undefined;
    assigned_date?: string | null | undefined;
    can_signup_for_limited?: boolean | undefined;
    chat_enabled?: boolean | undefined;
    copilot_plan?: string | undefined;
    copilotignore_enabled?: boolean | undefined;
    endpoints?: {
        api?: string | undefined;
        telemetry?: string | undefined;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
    } | undefined;
    organization_login_list?: string[] | undefined;
    organization_list?: ({
        name?: string | null | undefined;
        login?: string | null | undefined;
    } | null)[] | null | undefined;
    codex_agent_enabled?: boolean | undefined;
    is_mcp_enabled?: boolean | null | undefined;
    quota_reset_date?: string | undefined;
    quota_snapshots?: z.objectOutputType<{
        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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | undefined;
        }>>;
    }, z.ZodNullable<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>;
        has_quota: z.ZodOptional<z.ZodBoolean>;
        quota_reset_at: z.ZodOptional<z.ZodNumber>;
        token_based_billing: z.ZodOptional<z.ZodBoolean>;
    }, "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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | 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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | undefined;
    }>>, "strip"> | 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;
    cloud_session_storage_enabled?: boolean | undefined;
    cli_remote_control_enabled?: boolean | undefined;
}, {
    login?: string | undefined;
    token_based_billing?: boolean | undefined;
    access_type_sku?: string | undefined;
    analytics_tracking_id?: string | undefined;
    assigned_date?: string | null | undefined;
    can_signup_for_limited?: boolean | undefined;
    chat_enabled?: boolean | undefined;
    copilot_plan?: string | undefined;
    copilotignore_enabled?: boolean | undefined;
    endpoints?: {
        api?: string | undefined;
        telemetry?: string | undefined;
        "origin-tracker"?: string | undefined;
        proxy?: string | undefined;
    } | undefined;
    organization_login_list?: string[] | undefined;
    organization_list?: ({
        name?: string | null | undefined;
        login?: string | null | undefined;
    } | null)[] | null | undefined;
    codex_agent_enabled?: boolean | undefined;
    is_mcp_enabled?: boolean | null | undefined;
    quota_reset_date?: string | undefined;
    quota_snapshots?: z.objectInputType<{
        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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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>;
            has_quota: z.ZodOptional<z.ZodBoolean>;
            quota_reset_at: z.ZodOptional<z.ZodNumber>;
            token_based_billing: z.ZodOptional<z.ZodBoolean>;
        }, "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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | 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;
            has_quota?: boolean | undefined;
            quota_reset_at?: number | undefined;
            token_based_billing?: boolean | undefined;
        }>>;
    }, z.ZodNullable<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>;
        has_quota: z.ZodOptional<z.ZodBoolean>;
        quota_reset_at: z.ZodOptional<z.ZodNumber>;
        token_based_billing: z.ZodOptional<z.ZodBoolean>;
    }, "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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | 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;
        has_quota?: boolean | undefined;
        quota_reset_at?: number | undefined;
        token_based_billing?: boolean | undefined;
    }>>, "strip"> | 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;
    cloud_session_storage_enabled?: boolean | undefined;
    cli_remote_control_enabled?: boolean | undefined;
}>;

export declare interface CoreServices {
    telemetryService: TelemetryService;
    createFeatureFlagService: CreateFeatureFlagService;
    /** Shared auto-mode session manager that resolves the virtual `"auto"` model id to a concrete model. */
    autoModeManager: AutoModeSessionManager;
}

declare type CoreServicesInput = {
    telemetryService: TelemetryService;
    createFeatureFlagService: CreateFeatureFlagService;
    autoModeManager: AutoModeSessionManager;
};

/**
 * Counts the total number of hooks in a QueryHooks object.
 */
export declare function countHooks(hooks: QueryHooks | undefined): number;

declare const CREATE_PULL_REQUEST_TOOL_NAME = "create_pull_request";

declare type CreateArgs = z_2.infer<typeof createArgsSchema>;

declare const createArgsSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    file_text: z_2.ZodString;
} & {
    command: z_2.ZodLiteral<"create">;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "create";
    file_text: string;
}, {
    path: string;
    command: "create";
    file_text: string;
}>;

/**
 * Creates the ask_user tool with the provided request function.
 * The request function is provided by the CLI to handle the UI interaction.
 */
declare function createAskUserTool(requestUserInput: RequestUserInputFn): Tool_2;

declare function createCanvasTools(canvas: SessionCanvasApi, permissions: PermissionsConfig): Tool_2[];

/**
 * Creates the cloud session store SQL tool for querying cross-session history
 * via DuckDB. Queries target only the current user's sessions (personal scope).
 *
 * This tool registers under the same name as the local session store tool
 * (`session_store_sql`) — only one should be registered at a time, with cloud
 * taking precedence when CLOUD_SESSION_STORE is enabled.
 *
 * @param _config - Tool configuration
 * @param options - Settings and current repo context
 */
declare const createCloudSessionStoreSqlTool: (_config: ToolConfig, options: {
    settings: RuntimeSettings;
    /** Whether the local session store is also available for supplementary queries */
    localEnabled?: boolean;
}) => Tool_2;

export declare function createCoreServices({ telemetryService, createFeatureFlagService, autoModeManager, }: CoreServicesInput): CoreServices;

/**
 * Factory for creating a deferred FeatureFlagService. CLI callers use this so
 * ExP-backed accessors wait until the CLI-owned ExP coordinator injects a
 * fetched or empty assignment response.
 */
export declare function createDeferredFeatureFlagService(options: FeatureFlagInitOptions): FeatureFlagService;

/**
 * Create an empty metrics object.
 */
export declare function createEmptyMetrics(sessionStartTime?: number): UsageMetrics;

export declare type CreateFeatureFlagService = (options: {
    readonly sessionId: string;
    /** Initial ExP assignment response for this feature flag service instance. */
    expAssignments?: CopilotExpAssignmentResponse;
    /** Whether ExP-backed accessors should wait for an assignment response. */
    deferExpResponse?: boolean;
}) => SessionFeatureFlagService;

declare type CreateInput = z_2.infer<typeof createInputSchema>;

/**
 * Zod schema for create command input (without command field, as it's added by the tool).
 */
declare const createInputSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    file_text: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    file_text: string;
}, {
    path: string;
    file_text: string;
}>;

/**
 * Factory for creating a LocalFeatureFlagService.
 * Convenience wrapper for `new LocalFeatureFlagService(options)`.
 */
export declare function createLocalFeatureFlagService(options?: Partial<FeatureFlagInitOptions>): LocalFeatureFlagService;

export declare function createLocalFeatureFlagServiceCreator(options?: Partial<FeatureFlagInitOptions>): CreateFeatureFlagService;

/**
 * Create the LSP code intelligence tool.
 * Returns an empty array if no language servers are configured.
 */
declare function createLSPRefactorTools(config: ToolConfig, logger: RunnerLogger): Tool_2[];

declare function createLSPTool(config: ToolConfig, logger: RunnerLogger): Tool_2;

declare type CreatePullRequestInput = z_2.infer<typeof createPullRequestInputSchema>;

declare const createPullRequestInputSchema: z_2.ZodObject<{
    title: z_2.ZodString;
    description: z_2.ZodOptional<z_2.ZodString>;
    draft: z_2.ZodOptional<z_2.ZodBoolean>;
}, "strip", z_2.ZodTypeAny, {
    title: string;
    description?: string | undefined;
    draft?: boolean | undefined;
}, {
    title: string;
    description?: string | undefined;
    draft?: boolean | undefined;
}>;

declare const createPullRequestTool: (settings: RuntimeSettings, logger: RunnerLogger, agentAction?: AgentAction) => Tool_2 | undefined;

declare const createPullRequestToolDescription = "Create a pull request for the current branch. Call this tool when the task is complete and the changes are ready for review. If a pull request already exists for the branch, this tool will return successfully and indicate that. Only call this tool when the user explicitly asks for a pull request to be created.";

declare const createPullRequestToolInstructions = "## Examples\n\n### Create a standard pull request\n```json\n{\n  \"title\": \"Fix null pointer exception in user authentication\",\n  \"description\": \"## Summary\\nFixed a null pointer exception that occurred when...\\n\\n## Changes\\n- Added null check in auth middleware\\n- Updated tests\",\n  \"draft\": false\n}\n```\n\n### Create a draft pull request\n```json\n{\n  \"title\": \"WIP: Refactor database connection pooling\",\n  \"description\": \"## Summary\\nRefactoring the connection pool to support...\\n\\n## TODO\\n- [ ] Add integration tests\\n- [ ] Update docs\",\n  \"draft\": true\n}\n```\n\n## Notes\n* Always provide a clear, descriptive title\n* The description should summarize the changes made and any context needed for reviewers\n* Use `draft: true` if the work is still in progress\n* It is safe to call this tool even if a pull request may already exist for the branch\n* Before calling this tool, check for a pull request template in the repository (e.g. `.github/pull_request_template.md` or `.github/PULL_REQUEST_TEMPLATE/`). If a template exists, read it and follow its structure when writing the description. Keep all section headings, maintain their order, and fill in the relevant sections with your changes.";

/**
 * Creates a secret scanning tool instance bound to a specific repo location.
 */
declare const createSecretScanningTool: (settings: RuntimeSettings, logger: RunnerLogger, repoLocation: string) => Tool_2;

/**
 * Creates the SQL tool for executing queries against the session database.
 *
 * This tool provides a structured data primitive for agent workflows:
 * - Task tracking with dependencies
 * - TDD test case tracking
 * - PR comment review batching
 * - State machine / workstream tracking
 * - Any custom schema the agent needs
 *
 * The database is per-session and isolated - agent mistakes are contained.
 * When sessionStoreEnabled is true, the tool also exposes a read-only
 * global session store for cross-session history queries.
 *
 * @param workspacePath - Path to the workspace directory containing session.db
 * @param _config - Tool configuration
 * @param options - Optional settings for session store access
 */
declare const createSqlTool: (workspacePath: string, _config: ToolConfig, options?: {
    settings?: RuntimeSettings;
    sessionStoreEnabled?: boolean;
    sessionFs?: SessionFs;
}) => Tool_2 | undefined;

/**
 * Creates the task_complete tool.
 * The session emits the `session.task_complete` event when this tool is executed.
 */
declare function createTaskCompleteTool(): Tool_2;

/**
 * Creates the tool_search tool that allows the model to discover deferred tools.
 *
 * The tool search tool is a custom tool search implementation for the CAPI endpoint.
 * It searches through all available tools (including deferred ones) using a regex pattern,
 * and returns matching tool names as `tool_reference` content blocks.
 *
 * Deferred tools are sent to the model with `copilot_defer_loading: true` and are not
 * loaded into context until the model discovers them via this tool.
 *
 * See: https://platform.claude.com/docs/en/agents-and-tools/tool-use/tool-search-tool#custom-tool-search-implementation
 */
declare function createToolSearchTool(options: ToolSearchToolOptions): Tool_2;

declare const createToolSet: (tools: Tool_2[]) => Record<string, Tool_2>;

/**
 * Names of tools that use custom (grammar-based) format instead of standard function format.
 * These tools accept freeform input (like patch text) rather than structured JSON arguments.
 *
 * IMPORTANT: When adding a new custom tool (type: "custom"), add its name here.
 * This list is used for tool call format conversion when switching between models
 * that do/don't support custom tools.
 */
declare const CUSTOM_TOOL_NAMES: readonly ["apply_patch"];

/**
 * Identifies the custom agent that owns an MCP server configuration.
 * Passed separately from the server config to avoid mixing agent context with server settings.
 */
declare interface CustomAgentInfo {
    name: string;
    version?: string;
}

declare type CustomModelMetadata = {
    key_name: string;
    owner_name: string;
    owner_type: "organization" | "enterprise";
    provider: string;
};

export declare type CustomNotificationData = z.infer<typeof CustomNotificationDataSchema>;

declare const CustomNotificationDataSchema: z.ZodObject<{
    source: z.ZodString;
    name: z.ZodString;
    version: z.ZodOptional<z.ZodNumber>;
    subject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    payload: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>, string | number | boolean | unknown[] | Record<string, unknown> | null, string | number | boolean | unknown[] | Record<string, unknown> | null>;
}, "strip", z.ZodTypeAny, {
    name: string;
    source: string;
    payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
    version?: number | undefined;
    subject?: Record<string, string> | undefined;
}, {
    name: string;
    source: string;
    payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
    version?: number | undefined;
    subject?: Record<string, string> | undefined;
}>;

export declare type CustomNotificationEvent = z.infer<typeof CustomNotificationEventSchema>;

/**
 * Live-only event for source-defined JSON payloads.
 * Custom payloads are intentionally ephemeral: SDK listeners can observe them live,
 * but they are not persisted in the session event log or retained for querying.
 */
declare const CustomNotificationEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.custom_notification">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        source: z.ZodString;
        name: z.ZodString;
        version: z.ZodOptional<z.ZodNumber>;
        subject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        payload: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>, string | number | boolean | unknown[] | Record<string, unknown> | null, string | number | boolean | unknown[] | Record<string, unknown> | null>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    }, {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.custom_notification";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.custom_notification";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    };
    agentId?: string | undefined;
}>;

/**
 * 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;
    /** When true, the tool declared skipPermission — auto-approve unless deny rules block it. */
    readonly skipPermission?: boolean;
};

declare type DatabaseCreationBaseTelemetry = {
    databaseCreationError?: Error;
    databaseCreationSuccess: boolean;
    databaseCreationTimeMs: number;
};

declare type DatabaseCreationTelemetry = DatabaseCreationBaseTelemetry & DatabaseOverlayTelemetry;

declare type DatabaseOverlayStatus = "disabled" | "base-database-not-available" | "error" | "success";

declare interface DatabaseOverlayTelemetry {
    databaseOverlayBaseDatabaseNotAvailableBecause?: string;
    databaseOverlayError?: Error;
    databaseOverlayStatus?: DatabaseOverlayStatus;
    databaseOverlayDownloadTimeMs?: number;
}

/** 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];
};

/** Default model the code review tool uses when the caller does not override it. */
declare const DEFAULT_CODE_REVIEW_MODEL: ModelName;

export declare const DEFAULT_INTEGRATION_ID = "copilot-developer-cli";

declare const DEFAULT_LARGE_OUTPUT_THRESHOLD: number;

/** @deprecated Use {@link UserSettings} instead. */
declare type DefaultConfig = UserSettings;

/**
 * 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: Readonly<Record<"copilot-feature-agentic-memory" | "copilot-feature-agentic-memory-disabled" | "SQL_INTENT_TRACKING" | "copilot_feature_agentic_memory_user_scoped" | "FEATURE_FLAG_TEST" | "QUEUED_COMMANDS" | "AUTOPILOT_OBJECTIVES" | "DISABLE_WEB_TOOLS" | "CONTENT_EXCLUSION" | "TUIKIT_COMMAND" | "CHILD_CUSTOM_INSTRUCTIONS" | "ON_DEMAND_INSTRUCTIONS" | "FORGE_AGENT_ENABLED" | "CLOUD_SESSION_STORE" | "COPILOT_GITHUB_TABS" | "COPILOT_GITHUB_THEME" | "DIAGNOSE" | "DOWNGRADE" | "COLLECT_DEBUG_LOGS" | "WEBSOCKET_RESPONSES" | "MCP_ENTERPRISE_ALLOWLIST" | "ASK_USER_ELICITATION" | "MULTI_TURN_AGENTS" | "EXTENSIONS" | "TOOL_SEARCH" | "TOOL_SEARCH_ANTHROPIC" | "TOOL_SEARCH_OPENAI" | "TOOL_SEARCH_BUILTIN_ANTHROPIC" | "DYNAMIC_INSTRUCTIONS_RETRIEVAL" | "COPILOT_SUBCONSCIOUS" | "GPT_5_4_MINI_FOR_EXPLORE" | "BACKGROUND_SESSIONS" | "SANDBOX" | "EVERY_AND_AFTER" | "VOICE" | "RUBBER_DUCK_AGENT" | "COMPUTER_USE" | "MCP_REGISTRY_INSTALL" | "SESSION_INDEXING" | "CLI_CLOUD_SESSIONS" | "SESSION_INDEXING_REPO" | "REMOTE_JSON_RPC" | "SUBAGENT_PARALLELISM_PROMPTS" | "CHILD_GIT_REPO_SCAN" | "COPILOT_ASSOCIATE_COMPUTE" | "GITHUB_CONTEXT_SIDEKICK_AGENT" | "PROMPT_FRAME" | "REMOTE_KICKSTART" | "READ_AGENT_INCREMENTAL_READS" | "FOCUSED_TOOLS" | "TGREP" | "MCP_TASKS" | "MCP_TASKS_SEP2669" | "MCP_TASKS_SEP2694" | "SHELL_ERROR_CLASSIFICATION" | "MCP_APPS" | "FIDES_IFC" | "SHELL_SPAWN_BACKEND" | "ANTHROPIC_ADVISOR" | "SECURITY_REVIEW" | "WORKTREE" | "COPILOT_AGENTS_TAB" | "TARGETED_VALIDATION_PROMPT" | "REMOTE_EXPORT_MAX_EVENTS_PER_FLUSH" | "REMOTE_EXPORT_SAFETY_INTERVAL_MS" | "FAILBOT_ERROR_REPORTING" | "SPLIT_SYSTEM_MESSAGE_CACHE", boolean>>;

/**
 * When the total tool count exceeds this threshold, MCP and external
 * tools are automatically marked as deferred (`deferLoading: true`). The model
 * discovers them at runtime via the tool_search tool instead of loading all
 * definitions up front.
 */
declare const DEFERRED_TOOLS_THRESHOLD = 30;

declare enum DefinedExpFlags {
    COPILOT_CI = "copilot_ci",
    COPILOT_CLI = "copilot_cli",
    GPT_DEFAULT_MODEL = "copilot_cli_gpt_default_model",
    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",
    WEBSOCKET_RESPONSES = "copilot_cli_websocket_responses",
    /** When true, enables tool search with deferred loading for MCP and external tools (Anthropic models) */
    TOOL_SEARCH_ANTHROPIC = "copilot_cli_tool_search_anthropic",
    /** When true, enables tool search with deferred loading for MCP and external tools (OpenAI models) */
    TOOL_SEARCH_OPENAI = "copilot_cli_tool_search_openai",
    /** When true, uses Anthropic's built-in server-side tool search instead of client-side regex tool */
    TOOL_SEARCH_BUILTIN_ANTHROPIC = "copilot_cli_tool_search_builtin_anthropic",
    /** When true, uses fingerprint-based enterprise allowlist evaluation instead of per-server registry lookups */
    MCP_ENTERPRISE_ALLOWLIST = "copilot_cli_mcp_enterprise_allowlist",
    /** When true, enables the rubber-duck subagent for adversarial feedback */
    RUBBER_DUCK_AGENT = "copilot_cli_rubber_duck_gpt_claude",
    /** When true, enables the GitHub Context sidekick agent that publishes context to the session inbox */
    GITHUB_CONTEXT_SIDEKICK_AGENT = "copilot_cli_github_context_sidekick_agent",
    /** When true, enables SQL-backed intent tracking */
    SQL_INTENT_TRACKING = "copilot_cli_sql_intent_tracking",
    /** When true, makes repeated read_agent calls default to unread turns since the previous read */
    READ_AGENT_INCREMENTAL_READS = "copilot_cli_read_agent_incremental_reads",
    /** When true, enables focused grep/glob/view tool instructions */
    FOCUSED_TOOLS = "copilot_cli_focused_tools",
    /** When true, enables tgrep indexed search for large repositories */
    TGREP = "copilot_cli_tgrep",
    /**
     * When true, enables classified shell error messages and telemetry for read_bash
     * and write_bash instead of generic "Invalid shell ID". stop_bash telemetry is
     * emitted unconditionally and is not gated by this flag.
     */
    SHELL_ERROR_CLASSIFICATION = "copilot_cli_shell_error_classification",
    /** When true, uses child_process.spawn with pipes instead of node-pty for shell command execution */
    SHELL_SPAWN_BACKEND = "copilot_cli_shell_spawn_backend",
    /** When true, enables multi-turn subagents with message passing via write_agent tool */
    MULTI_TURN_AGENTS = "copilot_cli_multi_turn_agents",
    /**
     * When true, enables MCP Apps (SEP-1865) UI extension passthrough — io.modelcontextprotocol/ui
     * capability negotiation, _meta.ui forwarding, ui:// resource auto-fetch, app-only tool
     * visibility filtering, and /mcp-app/* proxy endpoints. Local override: COPILOT_MCP_APPS=true.
     */
    MCP_APPS = "copilot_cli_mcp_apps",
    /** When true, enables improved subagent parallelism prompts to encourage direct action and real parallel work */
    SUBAGENT_PARALLELISM_PROMPTS = "copilot_cli_subagent_parallelism_prompts",
    /** When true, surfaces MCP `CallToolResult._meta` (incl. `_meta.ifc`) on `ToolResultExpanded.mcpMeta` for the FIDES labelling engine */
    FIDES_IFC = "copilot_cli_fides_ifc",
    /** When true, uses targeted validation/install prompt guidance */
    TARGETED_VALIDATION_PROMPT = "copilot_cli_targeted_validation_prompt",
    /** When true, enables Copilot Subconscious for cross-session context sharing (A/B via ExP) */
    COPILOT_SUBCONSCIOUS = "copilot_cli_subconscious",
    /** Numeric override for the max events per flush batch in the remote session exporter */
    REMOTE_EXPORT_MAX_EVENTS_PER_FLUSH = "copilot_cli_remote_export_max_events_per_flush",
    /** Numeric override for the non-steerable safety flush interval (ms) in the remote session exporter */
    REMOTE_EXPORT_SAFETY_INTERVAL_MS = "copilot_cli_remote_export_safety_interval_ms",
    /** When true, splits the system message into static and per-user blocks for improved prompt cache hit rates */
    SPLIT_SYSTEM_MESSAGE_CACHE = "copilot_cli_split_system_message_cache"
}

declare class DelegatingShellNotificationSender implements ShellNotificationSender {
    private delegate?;
    constructor(delegate?: ShellNotificationSender);
    configure(delegate: ShellNotificationSender | undefined): void;
    sendOutput(notification: ShellOutputNotification): void;
    sendExit(notification: ShellExitNotification): void;
}

declare type DeniedToolResult = ToolResultExpanded & {
    resultType: "denied";
};

declare type DeniedToolResult_2 = ToolResultExpanded & {
    resultType: "denied";
};

declare const DEPENDENCY_CHECKER_FF_NAME = "copilot_swe_agent_validation_agent_dependencies";

declare const DEPENDENCY_CHECKER_TOOL_NAME = "gh-advisory-database";

declare type DependencyCheckerInput = z_2.infer<typeof dependencyCheckerInputSchema>;

declare const dependencyCheckerInputSchema: z_2.ZodObject<{
    dependencies: z_2.ZodArray<z_2.ZodObject<{
        version: z_2.ZodString;
        name: z_2.ZodString;
        ecosystem: z_2.ZodEnum<[string, ...string[]]>;
    }, "strip", z_2.ZodTypeAny, {
        name: string;
        version: string;
        ecosystem: string;
    }, {
        name: string;
        version: string;
        ecosystem: string;
    }>, "many">;
}, "strip", z_2.ZodTypeAny, {
    dependencies: {
        name: string;
        version: string;
        ecosystem: string;
    }[];
}, {
    dependencies: {
        name: string;
        version: string;
        ecosystem: string;
    }[];
}>;

declare const dependencyCheckerTool: Tool_2;

/**
 * Zod schema for dependency-checker tool input.
 */
declare const dependencySchema: z_2.ZodObject<{
    version: z_2.ZodString;
    name: z_2.ZodString;
    ecosystem: z_2.ZodEnum<[string, ...string[]]>;
}, "strip", z_2.ZodTypeAny, {
    name: string;
    version: string;
    ecosystem: string;
}, {
    name: string;
    version: string;
    ecosystem: string;
}>;

export declare function describeDiscoveredInstructionSource(source: InstructionSource): string;

/**
 * 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;

/**
 * Represents a detected result from code analysis with location information.
 * Used to describe issues, warnings, or suggestions found in the code.
 */
declare type DetectedResult = {
    /** Human-readable message describing the detected issue or suggestion */
    message: string;
    /** Location in the code where the issue was detected */
    location: Location_2;
    /** Optional metadata for the alert */
    meta?: Partial<{
        /** Unique identifier for the query that produced this alert */
        queryId: string;
        /** Human-readable name of the query that produced this alert */
        queryName: string;
        /** Detailed background information for the alert */
        longDescription: string;
        /** Name of the detector that originally produced this alert */
        detector: string;
        /** Reason for excluding this alert. Empty string means the alert should not be excluded */
        exclusionReason: string;
        /** Severity level of the detected issue */
        severity: "nit" | "moderate" | "critical";
    }>;
};

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, {
    path: string;
    type: "directory";
    displayName: string;
}, {
    path: string;
    type: "directory";
    displayName: string;
}>;

declare type DirectoryListingResult = {
    lines: string[];
    entryCount: number;
    entryCountIsComplete: boolean;
    exceededLimit: "soft" | "hard" | undefined;
    sizeBytes: number;
};

declare interface Disposable_2 {
    dispose(): void | Promise<void>;
}

declare interface DisposableTelemetrySender extends TelemetrySender {
    dispose(): void;
    setExtraFeatures(features: Record<string, string>): void;
    setInternalCorrelationIds?(internalCorrelationIds: SessionCorrelationIds | undefined): void;
    /**
     * Optional accessor for the current engagement id. Implemented by
     * `SessionTelemetry`; forwarded by the parent CLI when spawning a
     * detached child so engagement-scoped analytics roll up correctly.
     */
    getEngagementId?(): string;
}

declare function doesStrReplaceEditorArgsWriteContentInclude(args: StrReplaceEditorArgs, content: string): boolean;

/**
 * A dynamic context board entry (projection without content).
 */
declare interface DynamicContextBoardEntry {
    src: string;
    name: string;
    description: string;
    read_count: number;
    count: number;
}

/**
 * A dynamic context item row (full content, for read-back).
 */
declare interface DynamicContextItemRow {
    repository: string;
    branch: string;
    src: string;
    name: string;
    description: string;
    content: string;
    read_count: number;
    count: number;
}

/** Tracks instruction sources discovered at runtime by on-demand file access */
declare interface DynamicInstructionState {
    /** Instruction sources discovered at runtime, keyed by resolved absolute file path */
    sources: Map<string, InstructionSource>;
    /** Directories already scanned (to avoid re-scanning) */
    discoveredDirs: Set<string>;
    /** Source IDs already delivered to the agent (to avoid re-injecting) */
    deliveredSourceIds: Set<string>;
    /** Promise chain that serializes concurrent discovery walks to protect dedupe invariants */
    pendingDiscovery: Promise<void>;
}

declare const editingTools: (config: ToolConfig, logger: RunnerLogger, settings?: RuntimeSettings) => Tool_2[];

declare type EditInput = z_2.infer<typeof editInputSchema>;

/**
 * Zod schema for edit/str_replace command input (without command field, as it's added by the tool).
 */
declare const editInputSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    old_str: z_2.ZodOptional<z_2.ZodString>;
    new_str: z_2.ZodOptional<z_2.ZodString>;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    old_str?: string | undefined;
    new_str?: string | undefined;
}, {
    path: string;
    old_str?: string | undefined;
    new_str?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    }, {
        requestId: string;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "elicitation.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "elicitation.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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, {
    type: "elicitation.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}, {
    type: "elicitation.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}>;

/**
 * Extends the MCP SDK's ElicitRequestFormParams with an optional toolCallId
 * so the runtime can correlate elicitation prompts with the tool call visible
 * to remote UIs.
 */
declare type ElicitRequestWithToolCallId = ElicitRequestFormParams & {
    toolCallId?: string;
};

export declare type EmbeddedResource = z.infer<typeof EmbeddedResourceSchema>;

/**
 * Embedded resource content block
 */
declare const EmbeddedResourceSchema: z.ZodObject<{
    type: z.ZodLiteral<"resource">;
    resource: z.ZodUnion<[z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    }>, z.ZodObject<{
        uri: z.ZodString;
        mimeType: z.ZodOptional<z.ZodString>;
        blob: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    }>]>;
}, "strip", z.ZodTypeAny, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}, {
    type: "resource";
    resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
    } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
    };
}>;

/**
 * Emitted once per direct user (or autopilot) turn when the embedding retrieval
 * system folds dynamically-retrieved instructions (MCP server instructions,
 * skill instructions) into the user message's model-facing payload.
 *
 * The injected content lives inside the user message itself; this event exists
 * for observability/telemetry/benchmarking only — it does not add a separate
 * message to the conversation.
 */
declare type EmbeddingRetrievalInjectionEvent = {
    kind: "embedding_retrieval_injection";
    turn?: number;
    /** Per-source counts (e.g., { "mcp-server": 2, "skill": 1 }). */
    counts: Record<string, number>;
    /** Per-source result names. */
    names: Record<string, string[]>;
    /** Total number of instructions injected across all sources. */
    total: number;
    /** Raw injected content block (XML). Useful for debugging and benchmarks. */
    content: string;
};

/**
 * 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 = Hook<ErrorOccurredHookInput, ErrorOccurredHookOutput>;

/**
 * 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 | BinaryAttachmentRemovalEvent | ModelCallSuccessEvent | ToolExecutionEvent | TelemetryEvent_2 | MessagesSnapshotEvent | EmbeddingRetrievalInjectionEvent;

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: Hook<TInput, TOutput>[] | undefined, input: TInput, logger: RunnerLogger, hookType?: keyof QueryHooks, emitter?: HookEventEmitter): Promise<void | TOutput>;

/**
 * Executes preMcpToolCall hooks while threading the current `_meta` through each hook.
 *
 * Unlike generic hook output merging, each hook sees the metadata produced by
 * earlier hooks. This keeps multiple metadata providers composable while
 * preserving the public `metaToUse` output contract.
 */
export declare function executePreMcpToolCallHooks(hooks: PreMcpToolCallHook[] | undefined, input: PreMcpToolCallHookInput, logger: RunnerLogger, emitter?: HookEventEmitter): Promise<PreMcpToolCallHookOutput | void>;

declare type ExitPlanModeAction = (typeof ExitPlanModeActionValues)[number];

declare const ExitPlanModeActionValues: readonly ["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>;
    agentId: z.ZodOptional<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.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>>;
        autoApproveEdits: z.ZodOptional<z.ZodBoolean>;
        feedback: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    }, {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "exit_plan_mode.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "exit_plan_mode.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    };
    agentId?: string | undefined;
}>;

/**
 * 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>;
    agentId: z.ZodOptional<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.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>, "many">;
        recommendedAction: z.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>;
    }, "strip", z.ZodTypeAny, {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    }, {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "exit_plan_mode.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    };
    agentId?: string | undefined;
}, {
    type: "exit_plan_mode.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    };
    agentId?: string | undefined;
}>;

/**
 * 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;
};

/**
 * 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;
};

/** 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>;

declare type ExpFlagValue = z.infer<typeof ExpFlagValueSchema>;

/** Value type for ExP (Experiment Platform) flags */
declare const ExpFlagValueSchema: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull]>;

export declare type ExtensionContextAttachment = z.infer<typeof ExtensionContextAttachmentSchema>;

export declare const ExtensionContextAttachmentSchema: z.ZodObject<{
    type: z.ZodLiteral<"extension_context">;
    extensionId: z.ZodString;
    canvasId: z.ZodOptional<z.ZodString>;
    instanceId: z.ZodOptional<z.ZodString>;
    title: z.ZodString;
    payload: z.ZodUnknown;
    capturedAt: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "extension_context";
    title: string;
    extensionId: string;
    capturedAt: string;
    instanceId?: string | undefined;
    canvasId?: string | undefined;
    payload?: unknown;
}, {
    type: "extension_context";
    title: string;
    extensionId: string;
    capturedAt: string;
    instanceId?: string | undefined;
    canvasId?: string | undefined;
    payload?: unknown;
}>;

/**
 * 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>;
}

/**
 * A permission request for a dangerous extension management operation (scaffold, reload).
 */
declare type ExtensionManagementPermissionRequest = {
    readonly kind: "extension-management";
    /** The operation being performed */
    readonly operation: string;
    /** The extension name (for scaffold) */
    readonly extensionName?: string;
};

/**
 * A permission request for an extension that wants to influence the permission system.
 * Fired at registration time when an extension declares skipPermission tools,
 * opts into permission request handling, or registers hooks.
 */
declare type ExtensionPermissionAccessRequest = {
    readonly kind: "extension-permission-access";
    /** The name of the extension */
    readonly extensionName: string;
    /** Which capabilities the extension is requesting */
    readonly capabilities: string[];
};

export declare type ExternalToolCompletedEvent = z.infer<typeof ExternalToolCompletedEventSchema>;

/**
 * Emitted when a pending external tool request has been resolved by a client.
 * Other clients should dismiss any UI for this requestId.
 *
 * The tool result itself is intentionally not persisted here. If a client needs
 * to resume a suspended session, it must re-supply the in-memory result to the
 * resumed session via respondToExternalTool()/rejectExternalTool().
 *
 * `ephemeral` is optional here for backward compatibility with historical logs
 * from earlier builds that emitted this event as ephemeral (and therefore did
 * not persist it). New emissions are persistent so the on-disk record reflects
 * that the call has been resolved, even when the result was supplied late via
 * the resume RPC.
 */
declare const ExternalToolCompletedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.completed">;
    ephemeral: z.ZodOptional<z.ZodLiteral<true>>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "external_tool.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    ephemeral?: true | undefined;
    agentId?: string | undefined;
}, {
    type: "external_tool.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    ephemeral?: true | undefined;
    agentId?: string | undefined;
}>;

export declare type ExternalToolCompletion = z.infer<typeof ExternalToolCompletionSchema>;

/** Shared terminal outcome for an externally executed tool request. */
export declare const ExternalToolCompletionSchema: z.ZodDiscriminatedUnion<"status", [z.ZodObject<{
    status: z.ZodLiteral<"success">;
    result: z.ZodUnion<[z.ZodString, z.ZodObject<{
        textResultForLlm: z.ZodString;
        resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
        error: z.ZodOptional<z.ZodString>;
        sessionLog: z.ZodOptional<z.ZodString>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<["image", "resource"]>;
            data: z.ZodString;
            mimeType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }>, "many">>;
        contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
            type: z.ZodLiteral<"text">;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "text";
            text: string;
        }, {
            type: "text";
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"terminal">;
            text: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            cwd: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "image";
            data: string;
            mimeType: string;
        }, {
            type: "image";
            data: string;
            mimeType: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"audio">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "audio";
            data: string;
            mimeType: string;
        }, {
            type: "audio";
            data: string;
            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?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }, {
                src: string;
                theme?: "dark" | "light" | 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;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }, {
            type: "resource_link";
            name: string;
            uri: string;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"resource">;
            resource: z.ZodUnion<[z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }>, z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                blob: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }>]>;
        }, "strip", z.ZodTypeAny, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }>]>, "many">>;
    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
        textResultForLlm: z.ZodString;
        resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
        error: z.ZodOptional<z.ZodString>;
        sessionLog: z.ZodOptional<z.ZodString>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<["image", "resource"]>;
            data: z.ZodString;
            mimeType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }>, "many">>;
        contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
            type: z.ZodLiteral<"text">;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "text";
            text: string;
        }, {
            type: "text";
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"terminal">;
            text: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            cwd: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "image";
            data: string;
            mimeType: string;
        }, {
            type: "image";
            data: string;
            mimeType: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"audio">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "audio";
            data: string;
            mimeType: string;
        }, {
            type: "audio";
            data: string;
            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?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }, {
                src: string;
                theme?: "dark" | "light" | 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;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }, {
            type: "resource_link";
            name: string;
            uri: string;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"resource">;
            resource: z.ZodUnion<[z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }>, z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                blob: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }>]>;
        }, "strip", z.ZodTypeAny, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
        textResultForLlm: z.ZodString;
        resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
        error: z.ZodOptional<z.ZodString>;
        sessionLog: z.ZodOptional<z.ZodString>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<["image", "resource"]>;
            data: z.ZodString;
            mimeType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }>, "many">>;
        contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
            type: z.ZodLiteral<"text">;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "text";
            text: string;
        }, {
            type: "text";
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"terminal">;
            text: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            cwd: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "image";
            data: string;
            mimeType: string;
        }, {
            type: "image";
            data: string;
            mimeType: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"audio">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "audio";
            data: string;
            mimeType: string;
        }, {
            type: "audio";
            data: string;
            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?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }, {
                src: string;
                theme?: "dark" | "light" | 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;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }, {
            type: "resource_link";
            name: string;
            uri: string;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"resource">;
            resource: z.ZodUnion<[z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }>, z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                blob: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }>]>;
        }, "strip", z.ZodTypeAny, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">>]>;
}, "strip", z.ZodTypeAny, {
    status: "success";
    result: string | z.objectOutputType<{
        textResultForLlm: z.ZodString;
        resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
        error: z.ZodOptional<z.ZodString>;
        sessionLog: z.ZodOptional<z.ZodString>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<["image", "resource"]>;
            data: z.ZodString;
            mimeType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }>, "many">>;
        contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
            type: z.ZodLiteral<"text">;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "text";
            text: string;
        }, {
            type: "text";
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"terminal">;
            text: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            cwd: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "image";
            data: string;
            mimeType: string;
        }, {
            type: "image";
            data: string;
            mimeType: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"audio">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "audio";
            data: string;
            mimeType: string;
        }, {
            type: "audio";
            data: string;
            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?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }, {
                src: string;
                theme?: "dark" | "light" | 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;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }, {
            type: "resource_link";
            name: string;
            uri: string;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"resource">;
            resource: z.ZodUnion<[z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }>, z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                blob: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }>]>;
        }, "strip", z.ZodTypeAny, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">;
}, {
    status: "success";
    result: string | z.objectInputType<{
        textResultForLlm: z.ZodString;
        resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
        error: z.ZodOptional<z.ZodString>;
        sessionLog: z.ZodOptional<z.ZodString>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
            type: z.ZodEnum<["image", "resource"]>;
            data: z.ZodString;
            mimeType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, "strip", z.ZodTypeAny, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }, {
            type: "image" | "resource";
            data: string;
            mimeType: string;
            description?: string | undefined;
            metadata?: Record<string, unknown> | undefined;
        }>, "many">>;
        contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
            type: z.ZodLiteral<"text">;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "text";
            text: string;
        }, {
            type: "text";
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"terminal">;
            text: z.ZodString;
            exitCode: z.ZodOptional<z.ZodNumber>;
            cwd: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "terminal";
            text: string;
            cwd?: string | undefined;
            exitCode?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"image">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "image";
            data: string;
            mimeType: string;
        }, {
            type: "image";
            data: string;
            mimeType: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"audio">;
            data: z.ZodString;
            mimeType: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "audio";
            data: string;
            mimeType: string;
        }, {
            type: "audio";
            data: string;
            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?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }, {
                src: string;
                theme?: "dark" | "light" | 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;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }, {
            type: "resource_link";
            name: string;
            uri: string;
            description?: string | undefined;
            title?: string | undefined;
            mimeType?: string | undefined;
            icons?: {
                src: string;
                theme?: "dark" | "light" | undefined;
                mimeType?: string | undefined;
                sizes?: string[] | undefined;
            }[] | undefined;
            size?: number | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"resource">;
            resource: z.ZodUnion<[z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                text: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            }>, z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodOptional<z.ZodString>;
                blob: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }, {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            }>]>;
        }, "strip", z.ZodTypeAny, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }, {
            type: "resource";
            resource: {
                text: string;
                uri: string;
                mimeType?: string | undefined;
            } | {
                blob: string;
                uri: string;
                mimeType?: string | undefined;
            };
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">;
}>, z.ZodObject<{
    status: z.ZodLiteral<"failure">;
    error: z.ZodString;
}, "strip", z.ZodTypeAny, {
    status: "failure";
    error: string;
}, {
    status: "failure";
    error: string;
}>, z.ZodObject<{
    status: z.ZodLiteral<"cancelled">;
    message: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    status: "cancelled";
    message?: string | undefined;
}, {
    status: "cancelled";
    message?: string | undefined;
}>]>;

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;
    /**
     * Controls whether this tool is eligible for automatic deferral when the
     * tool-search mechanism is active.
     * - `"auto"` (default): the tool may be deferred when the total tool count
     *   exceeds the deferral threshold.
     * - `"never"`: the tool is always included in the initial tool list sent to
     *   the model, even when tool search is enabled. Use this for tools that the
     *   host system prompt mandates the model call.
     */
    defer?: "auto" | "never";
}

/** 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>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.requested">;
    data: z.ZodObject<{
        requestId: z.ZodString;
        sessionId: z.ZodString;
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        workingDirectory: z.ZodOptional<z.ZodString>;
        traceparent: z.ZodOptional<z.ZodString>;
        tracestate: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "external_tool.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "external_tool.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type ExternalToolResult = z.infer<typeof ExternalToolResultSchema>;

/**
 * Shared external tool result shape used by the SDK API and by the in-memory
 * resume mailbox when a client supplies a late result after reconnect.
 */
export declare const ExternalToolResultSchema: z.ZodUnion<[z.ZodString, z.ZodObject<{
    textResultForLlm: z.ZodString;
    resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
    error: z.ZodOptional<z.ZodString>;
    sessionLog: z.ZodOptional<z.ZodString>;
    toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<["image", "resource"]>;
        data: z.ZodString;
        mimeType: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, "strip", z.ZodTypeAny, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
    }, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
    }>, "many">>;
    contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
        type: z.ZodLiteral<"text">;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "text";
        text: string;
    }, {
        type: "text";
        text: string;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"terminal">;
        text: z.ZodString;
        exitCode: z.ZodOptional<z.ZodNumber>;
        cwd: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
    }, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"image">;
        data: z.ZodString;
        mimeType: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "image";
        data: string;
        mimeType: string;
    }, {
        type: "image";
        data: string;
        mimeType: string;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"audio">;
        data: z.ZodString;
        mimeType: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "audio";
        data: string;
        mimeType: string;
    }, {
        type: "audio";
        data: string;
        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?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }, {
            src: string;
            theme?: "dark" | "light" | 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;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
            src: string;
            theme?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
    }, {
        type: "resource_link";
        name: string;
        uri: string;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
            src: string;
            theme?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"resource">;
        resource: z.ZodUnion<[z.ZodObject<{
            uri: z.ZodString;
            mimeType: z.ZodOptional<z.ZodString>;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        }, {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        }>, z.ZodObject<{
            uri: z.ZodString;
            mimeType: z.ZodOptional<z.ZodString>;
            blob: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        }, {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        type: "resource";
        resource: {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        } | {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        };
    }, {
        type: "resource";
        resource: {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        } | {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        };
    }>]>, "many">>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
    textResultForLlm: z.ZodString;
    resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
    error: z.ZodOptional<z.ZodString>;
    sessionLog: z.ZodOptional<z.ZodString>;
    toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<["image", "resource"]>;
        data: z.ZodString;
        mimeType: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, "strip", z.ZodTypeAny, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
    }, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
    }>, "many">>;
    contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
        type: z.ZodLiteral<"text">;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "text";
        text: string;
    }, {
        type: "text";
        text: string;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"terminal">;
        text: z.ZodString;
        exitCode: z.ZodOptional<z.ZodNumber>;
        cwd: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
    }, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"image">;
        data: z.ZodString;
        mimeType: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "image";
        data: string;
        mimeType: string;
    }, {
        type: "image";
        data: string;
        mimeType: string;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"audio">;
        data: z.ZodString;
        mimeType: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "audio";
        data: string;
        mimeType: string;
    }, {
        type: "audio";
        data: string;
        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?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }, {
            src: string;
            theme?: "dark" | "light" | 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;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
            src: string;
            theme?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
    }, {
        type: "resource_link";
        name: string;
        uri: string;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
            src: string;
            theme?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"resource">;
        resource: z.ZodUnion<[z.ZodObject<{
            uri: z.ZodString;
            mimeType: z.ZodOptional<z.ZodString>;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        }, {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        }>, z.ZodObject<{
            uri: z.ZodString;
            mimeType: z.ZodOptional<z.ZodString>;
            blob: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        }, {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        type: "resource";
        resource: {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        } | {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        };
    }, {
        type: "resource";
        resource: {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        } | {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        };
    }>]>, "many">>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
    textResultForLlm: z.ZodString;
    resultType: z.ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
    error: z.ZodOptional<z.ZodString>;
    sessionLog: z.ZodOptional<z.ZodString>;
    toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    binaryResultsForLlm: z.ZodOptional<z.ZodArray<z.ZodObject<{
        type: z.ZodEnum<["image", "resource"]>;
        data: z.ZodString;
        mimeType: z.ZodString;
        description: z.ZodOptional<z.ZodString>;
        metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    }, "strip", z.ZodTypeAny, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
    }, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
    }>, "many">>;
    contents: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodObject<{
        type: z.ZodLiteral<"text">;
        text: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "text";
        text: string;
    }, {
        type: "text";
        text: string;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"terminal">;
        text: z.ZodString;
        exitCode: z.ZodOptional<z.ZodNumber>;
        cwd: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
    }, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"image">;
        data: z.ZodString;
        mimeType: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "image";
        data: string;
        mimeType: string;
    }, {
        type: "image";
        data: string;
        mimeType: string;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"audio">;
        data: z.ZodString;
        mimeType: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        type: "audio";
        data: string;
        mimeType: string;
    }, {
        type: "audio";
        data: string;
        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?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }, {
            src: string;
            theme?: "dark" | "light" | 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;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
            src: string;
            theme?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
    }, {
        type: "resource_link";
        name: string;
        uri: string;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
            src: string;
            theme?: "dark" | "light" | undefined;
            mimeType?: string | undefined;
            sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
    }>, z.ZodObject<{
        type: z.ZodLiteral<"resource">;
        resource: z.ZodUnion<[z.ZodObject<{
            uri: z.ZodString;
            mimeType: z.ZodOptional<z.ZodString>;
            text: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        }, {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        }>, z.ZodObject<{
            uri: z.ZodString;
            mimeType: z.ZodOptional<z.ZodString>;
            blob: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        }, {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        type: "resource";
        resource: {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        } | {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        };
    }, {
        type: "resource";
        resource: {
            text: string;
            uri: string;
            mimeType?: string | undefined;
        } | {
            blob: string;
            uri: string;
            mimeType?: string | undefined;
        };
    }>]>, "many">>;
}, z.ZodTypeAny, "passthrough">>]>;

export declare function extractExpFlagsFromResponse(response: CopilotExpAssignmentResponse): ExpFlags;

declare type FailedToolResult = ToolResultExpanded & {
    resultType: "failure";
};

export declare type FeatureFlag = keyof FeatureFlagAvailabilityMap;

export declare interface FeatureFlagAssignmentSink {
    /** Applies the latest CLI-fetched assignments to services owned by this sink. */
    setExpAssignments(assignments?: CopilotExpAssignmentResponse): void;
}

/**
 * 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: {
    readonly FEATURE_FLAG_TEST: "staff";
    readonly "copilot-feature-agentic-memory": "on";
    readonly "copilot-feature-agentic-memory-disabled": "off";
    readonly copilot_feature_agentic_memory_user_scoped: "on";
    readonly QUEUED_COMMANDS: "staff";
    readonly SQL_INTENT_TRACKING: "off";
    readonly AUTOPILOT_OBJECTIVES: "experimental";
    readonly DISABLE_WEB_TOOLS: "off";
    readonly CONTENT_EXCLUSION: "staff";
    readonly TUIKIT_COMMAND: "team";
    readonly CHILD_CUSTOM_INSTRUCTIONS: "staff";
    readonly ON_DEMAND_INSTRUCTIONS: "on";
    readonly FORGE_AGENT_ENABLED: "off";
    readonly CLOUD_SESSION_STORE: "on";
    readonly COPILOT_GITHUB_TABS: "staff-or-experimental";
    readonly COPILOT_GITHUB_THEME: "staff-or-experimental";
    readonly DIAGNOSE: "staff";
    readonly DOWNGRADE: "team";
    readonly COLLECT_DEBUG_LOGS: "staff";
    readonly WEBSOCKET_RESPONSES: "team";
    readonly MCP_ENTERPRISE_ALLOWLIST: "off";
    readonly ASK_USER_ELICITATION: "experimental";
    readonly MULTI_TURN_AGENTS: "experimental";
    readonly EXTENSIONS: "experimental";
    readonly TOOL_SEARCH: "experimental";
    readonly TOOL_SEARCH_ANTHROPIC: "off";
    readonly TOOL_SEARCH_OPENAI: "off";
    readonly TOOL_SEARCH_BUILTIN_ANTHROPIC: "off";
    readonly DYNAMIC_INSTRUCTIONS_RETRIEVAL: "off";
    readonly COPILOT_SUBCONSCIOUS: "team";
    readonly GPT_5_4_MINI_FOR_EXPLORE: "off";
    readonly BACKGROUND_SESSIONS: "staff-or-experimental";
    readonly SANDBOX: "staff-or-experimental";
    readonly EVERY_AND_AFTER: "staff-or-experimental";
    readonly VOICE: "on";
    readonly RUBBER_DUCK_AGENT: "on";
    readonly COMPUTER_USE: "staff";
    readonly MCP_REGISTRY_INSTALL: "staff-or-experimental";
    readonly SESSION_INDEXING: "on";
    readonly CLI_CLOUD_SESSIONS: "experimental";
    readonly SESSION_INDEXING_REPO: "staff";
    readonly REMOTE_JSON_RPC: "on";
    readonly SUBAGENT_PARALLELISM_PROMPTS: "off";
    readonly CHILD_GIT_REPO_SCAN: "staff";
    readonly COPILOT_ASSOCIATE_COMPUTE: "off";
    readonly GITHUB_CONTEXT_SIDEKICK_AGENT: "off";
    readonly PROMPT_FRAME: "staff-or-experimental";
    readonly REMOTE_KICKSTART: "team";
    readonly READ_AGENT_INCREMENTAL_READS: "team";
    readonly FOCUSED_TOOLS: "off";
    readonly TGREP: "off";
    readonly MCP_TASKS: "experimental";
    readonly MCP_TASKS_SEP2669: "off";
    readonly MCP_TASKS_SEP2694: "off";
    readonly SHELL_ERROR_CLASSIFICATION: "off";
    readonly MCP_APPS: "experimental";
    readonly FIDES_IFC: "off";
    readonly SHELL_SPAWN_BACKEND: "team";
    readonly ANTHROPIC_ADVISOR: "off";
    readonly SECURITY_REVIEW: "experimental";
    readonly WORKTREE: "experimental";
    readonly COPILOT_AGENTS_TAB: "team";
    readonly TARGETED_VALIDATION_PROMPT: "off";
    readonly REMOTE_EXPORT_MAX_EVENTS_PER_FLUSH: "off";
    readonly REMOTE_EXPORT_SAFETY_INTERVAL_MS: "off";
    readonly FAILBOT_ERROR_REPORTING: "staff";
    readonly SPLIT_SYSTEM_MESSAGE_CACHE: "team";
};

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. Used by the CLI ExP coordinator, not core flag resolution. */
    streamerMode?: boolean;
    /** Optional config object for config-based overrides */
    config?: DefaultConfig;
    /** Timestamp of first CLI launch. Used by the CLI ExP coordinator, not core flag resolution. */
    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>>;
    /** Runtime settings carried for CLI coordinator consumers; not used by core flag resolution. */
    settings?: RuntimeSettings;
}

declare interface FeatureFlagResolutionOptions {
    baseFlags?: FeatureFlags;
    env?: NodeJS.ProcessEnv;
    config?: DefaultConfig;
    flagOverrides?: Partial<Record<FeatureFlag, boolean>>;
}

/** Resolved feature flags with boolean values for runtime use */
export declare type FeatureFlags = Readonly<Record<FeatureFlag, boolean>>;

/**
 * Service for accessing feature flags for one runtime owner.
 *
 * The core service owns pure feature flag resolution and ExP assignment state.
 * CLI-specific ExP fetching, caching, auth subscription, and telemetry live in
 * CLI modules and inject assignment responses through `setExpAssignments`.
 */
export declare class FeatureFlagService implements SessionFeatureFlagService {
    private flags;
    private expFlags;
    private listeners;
    /** Current ExP response (always synchronously available; starts as EMPTY_EXP_RESPONSE) */
    private latestExpResponse;
    /** Tracks whether the initial ExP response has been supplied */
    private expFetchStatus;
    /** Callbacks waiting for the initial ExP response to complete */
    private expFetchWaiters;
    private options;
    private latestAssignmentContext;
    private latestSecondaryAssignmentContext;
    constructor(options: FeatureFlagInitOptions, constructorOptions?: FeatureFlagServiceConstructorOptions);
    dispose(): void;
    /**
     * Creates a deferred FeatureFlagService for tests that need to exercise
     * wait-for-assignment behavior without a CLI ExP client.
     */
    static createForTest(options: FeatureFlagInitOptions): FeatureFlagService;
    /**
     * Resets the service instance. Primarily for testing purposes.
     */
    resetInstance(): void;
    resetExpResponse(): void;
    setExpAssignments(assignments?: CopilotExpAssignmentResponse): void;
    private createExpAssignmentState;
    private applyExpAssignments;
    /**
     * 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 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-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 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 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>;
    /**
     * Whether MCP `_meta` (FIDES IFC) surfacing on `ToolResultExpanded.mcpMeta` is enabled.
     * Awaits the ExP assignment for `copilot_cli_fides_ifc`;
     * falls back to the `FIDES_IFC` feature flag when ExP has no assignment.
     */
    isFidesIfcEnabled(): Promise<boolean>;
    /**
     * Whether the Copilot Subconscious experiment is enabled.
     * Awaits the ExP assignment for `copilot_cli_subconscious`;
     * falls back to the `COPILOT_SUBCONSCIOUS` feature flag when ExP has no assignment.
     */
    isCopilotSubconsciousEnabled(): Promise<boolean>;
    /**
     * Whether the system message should be split into static and per-user blocks for cache optimization.
     * Awaits the ExP assignment for `copilot_cli_split_system_message_cache`;
     * falls back to the `SPLIT_SYSTEM_MESSAGE_CACHE` feature flag when ExP has no assignment.
     */
    isSplitSystemMessageCacheEnabled(): Promise<boolean>;
    /**
     * Returns a promise that resolves once the initial ExP response has completed.
     * If the response has already been supplied, resolves immediately.
     *
     * Use this to gate work that requires ExP assignment context (e.g.
     * experimentation-critical telemetry).
     */
    waitForExpResponse(): Promise<void>;
    /**
     * Gets all ExP 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;
    /**
     * Applies a partial config override and re-resolves flags through the
     * normal resolution chain, then notifies subscribers. Used for in-session
     * toggles (e.g. `/memory on|off`) so the change propagates to the active
     * session without a CLI restart.
     */
    applyConfigOverride(partialConfig: Partial<DefaultConfig>): void;
    /**
     * Resolves feature flags using the full resolution chain.
     * @param options Feature flag initialization options
     */
    private resolveFlags;
    private notifyListeners;
}

declare interface FeatureFlagServiceConstructorOptions {
    deferExpResponse?: boolean;
}

/**
 * Mapping from FeatureFlag names to their corresponding ExP flag keys.
 * Used by feature flag services to check COPILOT_EXP_* env overrides and
 * by async flag resolution to look up ExP experiments for a given feature flag.
 */
export declare const featureFlagToExpFlag: Partial<Record<FeatureFlag, ExpFlagKey>>;

/**
 * Tool that fetches documentation about the GitHub Copilot CLI agent.
 * First checks embedded README and /help output, only fetches online docs if needed.
 */
declare const fetch_copilot_cli_documentation: (logger: RunnerLogger) => Tool_2 | undefined;

declare const FETCH_DOCUMENTATION_TOOL_NAME = "fetch_copilot_cli_documentation";

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, {
        start: number;
        end: number;
    }, {
        start: number;
        end: number;
    }>>;
}, "strip", z.ZodTypeAny, {
    path: string;
    type: "file";
    displayName: string;
    lineRange?: {
        start: number;
        end: number;
    } | undefined;
}, {
    path: string;
    type: "file";
    displayName: string;
    lineRange?: {
        start: number;
        end: number;
    } | undefined;
}>;

/**
 * Metrics for file editing operations (numeric values only).
 * Used by file-editing tools to report line changes in their telemetry metrics.
 */
declare type FileEditedMetrics = {
    /** Number of lines added in the edit operation */
    linesAdded: number;
    /** Number of lines removed in the edit operation */
    linesRemoved: number;
};

/**
 * Properties for file editing operations (string values).
 * Used by file-editing tools to report file paths in their telemetry properties.
 */
declare type FileEditedRestrictedProperties = {
    /** Paths of all files that were edited, JSON-encoded */
    filePaths: string;
    /** Paths of files that were added (created), JSON-encoded */
    addedPaths?: string;
    /** Paths of files that were deleted, JSON-encoded */
    deletedPaths?: string;
};

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;
}

/**
 * A file touched during a session.
 */
declare interface FileRow {
    session_id: string;
    file_path: string;
    tool_name?: string;
    turn_index?: number;
    first_seen_at?: string;
}

/**
 * Finds the autofind binary in various possible locations.
 *
 * @param logger Logger for debug messages
 * @param autofindName Optional alternative filename for the autofind binary (defaults to "autofind"), used for testing
 *
 * @returns Promise resolving to the path of the autofind binary
 * @throws Error if the autofind binary is not found in any location
 */
declare function findAutofindBinary(logger: RunnerLogger, autofindName?: string): Promise<string>;

/**
 * Find orphaned tool call IDs from the end of the chat messages.
 * Returns an array of {toolCallId, toolName, args} for each orphaned tool call.
 */
export declare function findOrphanedToolCalls(messages: ChatCompletionMessageParam[]): {
    toolCallId: string;
    toolName: string;
    args: unknown;
}[];

/** Flat token pricing (legacy format, API < 2026-06-01). */
declare type FlatTokenPrices = {
    input_price?: number;
    output_price?: number;
    cache_price?: number;
    batch_size?: number;
};

/**
 * A Forge-specific trajectory event derived from session tool activity.
 */
declare interface ForgeTrajectoryEventRow {
    session_id: string;
    tool_call_id?: string;
    turn_index?: number;
    event_type: string;
    command?: string;
    output?: string;
    exit_code?: number;
    event_key?: string;
    event_value?: string;
    created_at?: string;
}

/**
 * Scope for reading Forge trajectory events across sessions.
 */
declare interface ForgeTrajectoryScope {
    repository?: string;
    branch?: string;
    limitSessions?: number;
}

declare interface ForkSessionOptions {
    /** Optional event ID boundary (exclusive). */
    toEventId?: string;
    /** Optional friendly name for the fork. */
    name?: string;
}

declare interface ForkSessionResult {
    /** New forked session ID. */
    sessionId: string;
    /** Friendly name assigned to the fork, when one was persisted. */
    name?: string;
}

/**
 * Formats bytes into a human-readable string (e.g., "1.5 MB", "48 KB").
 */
declare function formatBytes(bytes: number): string;

/**
 * Type for a function tool call delta (streaming).
 */
declare type FunctionToolCallDelta = {
    index: number;
    id?: string;
    type?: "function";
    function?: {
        name?: string;
        arguments?: string;
    };
};

/**
 * Generates a message to tell the LLM where to find the large output.
 */
declare function generateLargeOutputMessage(filePath: string, originalSizeBytes: number, preview: string, grepToolName?: string, contentKind?: string): string;

/**
 * Returns names of current tools that were not in `previousNames`.
 */
declare function getAddedToolsByName(previousNames: string[], currentTools: Tool_2[]): 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;
    /**
     * Reasoning summary mode for providers that support configurable reasoning summaries.
     * Use "none" to suppress summary output regardless of whether reasoning is enabled.
     * Providers that do not support summary verbosity may ignore it.
     */
    reasoningSummary?: ReasoningSummary;
    /**
     * Optional callback to refresh the tool list mid-turn. Called after each batch of
     * tool executions. If it returns a new tool array (or a promise resolving to one),
     * 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.
     *
     * May be async to support refresh sources that require I/O (e.g. fetching the
     * updated tool list from an MCP server after a `tools/list_changed` notification).
     */
    refreshTools?: () => Tool_2[] | undefined | Promise<Tool_2[] | undefined>;
    /**
     * Session filesystem for session-scoped file I/O (e.g. large output handling).
     */
    sessionFs?: SessionFs;
    /**
     * Callback invoked when a 401 response is received on a request that carried a
     * CAPI session token (auto-mode). The callback should clear the expired session,
     * acquire a fresh token, and return it. Returning `undefined` skips the retry.
     * Called at most once per `getCompletionWithTools` invocation.
     */
    onSessionTokenExpired?: () => Promise<{
        sessionToken: string;
        model: string;
    } | undefined>;
};

/**
 * Returns the list of temp files that have been created (for testing).
 */
declare function getCreatedTempFiles(): ReadonlyArray<{
    sessionFs: SessionFs;
    filePath: string;
}>;

/** 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[]>;

/**
 * Extracts the underlying model class from a custom model ID.
 * Custom model IDs follow the format `org/key/model-class`.
 * Returns undefined if the ID doesn't match the expected format.
 */
export declare function getCustomModelClass(model: Model): string | undefined;

/**
 * Returns the environment variable name for an ExP flag override.
 * Convention: `COPILOT_EXP_` + upper-cased flag name with hyphens replaced by underscores.
 */
export declare function getExpFlagEnvKey(flag: ExpFlagKey): 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 getExpFlagEnvOverrides(): ExpFlags;

declare function getGrepToolNameFromTools(tools: readonly Pick<ToolMetadata, "name" | "description">[]): string | undefined;

/**
 * Extract MCP server and tool name from a tool's metadata.
 * Prefers explicit `mcpServerName`/`mcpToolName` when set.
 * Falls back to splitting `namespacedName` on the last "/".
 *
 * @returns The MCP server and tool names, or undefined for non-MCP tools.
 */
declare function getMcpInfo(tool: Pick<ToolMetadata, "namespacedName" | "mcpServerName" | "mcpToolName">): {
    mcpServerName: string;
    mcpToolName: string;
} | undefined;

export declare function getPostToolUseFailureError(toolResult: ToolResultExpanded): string;

/**
 * Returns tool names from `previousNames` that are not in the current tool list.
 */
declare function getRemovedToolsByName(previousNames: string[], currentTools: Tool_2[]): string[];

declare function getStrReplaceEditorArgsOrNull(toolCall: CopilotChatCompletionMessageToolCall): StrReplaceEditorArgs | null;

declare function getToolDeniedWithoutUserRequest(isAutopilotMode?: boolean): Readonly<DeniedToolResult_2>;

/**
 * Extracts unique tool names from assistant tool_calls in the chat history.
 * Returns undefined if no tool calls are found (i.e., the model never called any tools).
 * This is used on session resume to determine which tools the model has "seen" —
 * only tools it actually called need a removal notice, since the model has no
 * memory of tools it never invoked beyond the current system prompt.
 */
declare function getToolNamesFromHistory(messages: OpenAI_2.Chat.Completions.ChatCompletionMessageParam[]): string[] | undefined;

/**
 * Returns the registration source of a tool. `source` is required on every tool, so this
 * is a thin accessor; it exists as a named call site for tool-filtering code paths that
 * want to be explicit about reading classification metadata rather than tool fields.
 */
declare function getToolSource(tool: ToolMetadata): ToolSource;

/** 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>;
}

declare const GITHUB_MCP_SERVER_NAME = "github-mcp-server";

/** 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[];
    /**
     * When true, exclude MCP tools that have `gh` CLI equivalents.
     * Only the tools in `CLI_KEPT_GITHUB_MCP_TOOLS` will be exposed.
     * Set this when the `gh` CLI is available so the agent uses it for local-equivalent operations.
     * Both the CLI and SDK default this to the result of `shouldExcludeGhReplaceableMcpTools()`.
     */
    excludeGhReplaceableTools?: boolean;
    /**
     * When true, send the `X-MCP-Insiders` header to enable insiders mode on the GitHub MCP server.
     * This exposes experimental features such as IFC metadata in tool responses.
     * Callers are responsible for gating this option on the `FIDES_IFC` feature flag before setting it.
     */
    enableInsidersMode?: boolean;
}

/** 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";
}>;

declare type GitRootResult = {
    gitRoot: string;
    found: boolean;
};

/**
 * Output from the Go CLI - the raw response structure from autofind CLI.
 * Contains detected results, usage metrics, and error information.
 */
declare type GoDetectorOutput = {
    /** Array of detected issues, warnings, or suggestions */
    alerts: DetectedResult[];
    /** Error message if CLI failed to run properly */
    error?: string;
    /** Warning message for non-fatal issues */
    warning?: string;
    /** Indicates if the operation was aborted due to a timeout */
    timedOut?: boolean;
};

/**
 * Represents a file with its contents for analysis by the autofind CLI.
 * Matches the `FileWithContents` type in Autofind `main.go`.
 */
declare type GoInputFile = {
    /** File path relative to repository root */
    path: string;
    /** Current file contents */
    contents: string;
    /** File contents from the base commit for comparison */
    baseContents?: string;
    /** Line number ranges to analyze (startLine, endLine pairs, both inclusive) */
    regions: [LineNumber, LineNumber][];
};

/**
 * Returns true when the GPT model version supports tool search.
 * Supported: GPT-5.4 and later (major > 5, or major === 5 && minor >= 4).
 */
declare function gptModelSupportsToolSearch(model: string): boolean;

/**
 * Handles a permission request result and returns an appropriate tool result.
 * Returns null if permission was approved, otherwise returns a denial/rejection result.
 */
declare function handlePermissionResult(result: PermissionRequestResult, options?: HandlePermissionResultOptions): ToolResultExpanded | null;

/**
 * Options for handling permission results.
 */
declare type HandlePermissionResultOptions = {
    /** Custom messages for denial cases */
    messages?: PermissionResultMessages;
    /** Whether autopilot mode is enabled (adds extra guidance to denial messages) */
    isAutopilotMode?: boolean;
};

declare function handleProgressReport(prDescription: string, branchName: string, logger: RunnerLogger, callback?: IAgentCallback): Promise<{
    isError: boolean;
}>;

/**
 * Handler for the "view" command
 *
 * TODO(permissions-improvement)
 * The user may have configured file denial e.g. !View(.secrets/**), so we should have permissions
 * checks here as well.
 */
declare function handleViewCommand(input: StrReplaceEditorArgs & {
    command: typeof VIEW_TOOL_NAME;
}, baseToolTelemetry: StrReplaceEditorTelemetry, permissions: PermissionsConfig, logger: RunnerLogger, options?: ToolCallbackOptions<StrReplaceEditorOptions>): Promise<StrReplaceEditorResult>;

/**
 * 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";

/**
 * Returns true when a model has issues that prevent it from being used.
 */
export declare function hasModelIssues(model: Model): boolean;

/** Models visible in help text and CLI --model choices (excludes {@link HIDDEN_MODELS}) */
export declare const HELP_VISIBLE_MODELS: ("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-opus-4.7-1m-internal" | "claude-opus-4.8" | "claude-fable-5" | "gpt-5-mini" | "claude-haiku-4.5" | "gpt-5.4" | "gpt-5.3-codex" | "gpt-5.5" | "gpt-5.2" | "gpt-5.2-codex" | "claude-opus-4.7-high" | "claude-opus-4.7-xhigh" | "gpt-5.4-mini" | "gemini-3.1-pro-preview" | "gemini-3.5-flash")[];

/**
 * 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})
 * - When CAPI returns a hidden model as available (policy enabled), it is **always shown** in the
 *   `/model` picker regardless of staff status — CAPI is the source of truth for authorization
 * - When CAPI does not return a hidden model (or returns it as blocked/unconfigured), it is
 *   excluded from the blocked/disabled/upgrade lists for non-staff users to keep the picker clean
 * - Staff users always see hidden models in all categories (available, blocked, upgrade-needed)
 *
 * **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 it is also gated server-side via CAPI policy
 * - 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;
};

/**
 * A hook: its handler plus the metadata the runtime needs to order, attribute,
 * and fail-close it.
 *
 * Representing hooks as objects — rather than bare functions tagged via
 * process-global side tables — keeps provenance ({@link Hook.source}) and policy
 * status ({@link Hook.isPolicy}) intrinsic to the hook. The metadata therefore
 * cannot go stale, leak across unrelated hook graphs, or be lost when a hook is
 * wrapped (e.g. by a matcher).
 */
export declare interface Hook<TInput extends BaseHookInput = BaseHookInput, TOutput = unknown> {
    /** The function invoked when the hook runs. */
    readonly handler: HookHandler<TInput, TOutput>;
    /**
     * Short, human-readable label identifying where the hook came from (e.g. the
     * plugin it was loaded from, like `dependabot@agency`).
     *
     * The label is config-derived (plugin name / configured command), never
     * influenced by tool arguments, so it is safe to surface in error messages —
     * unlike a hook's thrown error text, which can be attacker-influenced via
     * `toolArgs` and is therefore kept out of model-visible results.
     */
    readonly source?: string;
    /**
     * Whether this is an admin-deployed policy hook (e.g. Defender, Purview).
     * Policy hooks run before non-policy hooks, may make terminal decisions that
     * skip later hooks, and fail closed when they throw.
     *
     * Security: this flag grants elevated precedence, so it must only be set by
     * trusted construction (the policy loader in `policyHooks.ts`). Hooks loaded
     * from untrusted sources (repo config, plugins) flow through
     * {@link getHooksFromConfig}, which never sets it.
     */
    readonly isPolicy?: boolean;
}

/**
 * A validated hook block result: decision is "block" and reason is guaranteed present.
 * Use {@link isHookBlock} to narrow a hook output to this type.
 */
export declare interface HookBlock {
    decision: "block";
    reason: string;
}

/**
 * Decision returned by hooks that can block an operation.
 * - "block": The operation is denied. Must be accompanied by a `reason`.
 * - "allow": Explicitly permits the operation (same as omitting `decision`).
 */
export declare type HookBlockDecision = "block" | "allow";

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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>;
            source: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        }, {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "hook.end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "hook.end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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 hook's handler — the function invoked when the hook runs. Hooks supplied by
 * SDK consumers, loaded from config, or produced by plugins are all reduced to
 * this signature before the runtime invokes them.
 */
export declare type HookHandler<TInput extends BaseHookInput = BaseHookInput, TOutput = unknown> = (input: TInput) => Promise<TOutput | 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 tool call ID associated with this hook-gated prompt, when available */
    readonly toolCallId?: string;
    /** 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 HookProgressEvent = z.infer<typeof HookProgressEventSchema>;

/**
 * Hook emits a progress message (ephemeral, for user-facing display)
 */
declare const HookProgressEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"hook.progress">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        message: z.ZodString;
        temporary: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        temporary?: boolean | undefined;
    }, {
        message: string;
        temporary?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "hook.progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        temporary?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "hook.progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        temporary?: boolean | undefined;
    };
    agentId?: string | undefined;
}>;

/**
 * Formats a ` from "<source>"` suffix for hook diagnostic log messages, or an
 * empty string when the source is unknown.
 *
 * This is for CLI/log output only — never surfaced to the model.
 */
export declare function hookSourceLogSuffix(source: string | undefined): string;

declare class HooksProcessor implements IPreToolsExecutionProcessor, IPostToolExecutionProcessor {
    private readonly logger;
    private readonly commonHookContext;
    private readonly preEditsHooks;
    private readonly postEditsHooks;
    private readonly preCommitHooks;
    private readonly prePRDescriptionHooks;
    private readonly postResultHooks;
    private userHooks?;
    /**
     * Called when a preToolUse hook explicitly allows a tool call (`permissionDecision: "allow"`).
     * Wires the approval into the session's permission gate so the tool is not re-prompted.
     */
    private onToolCallAllowed?;
    /** Called when a preToolUse or postToolUse hook returns `additionalContext` for a tool call. */
    private onAdditionalContext?;
    /**
     * Called at the start of each `preToolsExecution` batch to clear stale hook-allowed tool
     * call IDs from the session's permission store. Prevents an `allow` decision from one batch
     * from leaking into later batches when a model call reuses the same `toolCallId`.
     */
    private onClearBatch?;
    constructor(commonHookContext: CommonHookContext, initialHooks?: AgentHook[]);
    /**
     * Registers a callback invoked when a preToolUse hook returns `permissionDecision: "allow"`.
     * For CLI sub-agents, pass `(id) => pendingRequests.addHookAllowedToolCallId(id)` so the
     * session's permission gate auto-approves the tool without re-prompting the user.
     */
    setOnToolCallAllowed(callback: (toolCallId: string) => void): void;
    /**
     * Registers a callback invoked when a preToolUse or postToolUse hook returns `additionalContext`.
     * On the top-level CLI path this context is injected into the next model turn; for
     * sub-agents that injection happens inside `Agent.agent()` which is not exposed here,
     * so callers should collect and apply the context through the agent loop themselves.
     */
    setOnAdditionalContext(callback: (toolCallId: string, context: string) => void): void;
    /**
     * Registers a callback invoked at the start of each `preToolsExecution` batch.
     * For CLI sub-agents, pass `() => pendingRequests.clearHookAllowedToolCallIds()` to
     * prevent `allow` decisions from one batch leaking into subsequent batches.
     */
    setOnClearBatch(callback: () => void): void;
    toJSON(): string;
    addHook(hook: AgentHook): HooksProcessor;
    addUserHooksFromRepoConfig(): Promise<void>;
    /**
     * Loads hooks from installed plugins and merges them with existing user hooks.
     * Plugin hooks use the plugin directory as the working directory for commands.
     *
     * @param installedPlugins - List of installed plugins to load hooks from
     * @param settings - Optional runtime settings
     * @returns An object with `hookCount` (total individual hooks loaded) and `pluginCount` (plugins that provided hooks)
     */
    addHooksFromInstalledPlugins(installedPlugins: InstalledPlugin[], settings?: RuntimeSettings): Promise<{
        hookCount: number;
        pluginCount: number;
    }>;
    setUserHooks(userHooks: QueryHooks): Promise<void>;
    createMcpToolCallInterceptor(): McpToolCallInterceptor;
    preSession(source: "new" | "resume", initialPrompt: string): Promise<void>;
    postSession(): Promise<void>;
    userPrompt(prompt: string): Promise<void>;
    applyPrePRDescriptionHooks(prDescription: string): Promise<string>;
    preToolsExecution(context: PreToolsExecutionContext): Promise<Map<string, ToolResultExpanded>>;
    private runUserPreToolUseHooks;
    private runPreCommitHooks;
    private extractCommitMessagesByCallId;
    private applyRedactedCommitMessage;
    private runPreEditHooks;
    postToolExecution(context: PostToolExecutionContext): Promise<void>;
    private getPostToolExecutionToolInfo;
    onResult(currentCommitHash: string): Promise<string | undefined>;
    private runUserPostToolUseHooks;
    private runUserPostToolUseFailureHooks;
    private runPostResultHooks;
}

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "hook.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "hook.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

/**
 * Host context exposed to the guest UI on initialization, and via
 * `ui/notifications/host-context-changed` for partial updates (SEP-1865).
 */
declare interface HostContext {
    /** Metadata of the tool call that instantiated the View. */
    toolInfo?: {
        /** JSON-RPC id of the originating `tools/call` request. */
        id?: number | string;
        /** The tool that was called (name, inputSchema, etc.). */
        tool?: Record<string, unknown>;
    };
    /** Current color theme preference. */
    theme?: "light" | "dark";
    /** Style configuration for theming. */
    styles?: {
        /** CSS custom properties the view can reference. */
        variables?: Record<string, string | undefined>;
        /** CSS blocks the view can inject (e.g., `@font-face` rules). */
        css?: {
            fonts?: string;
        };
    };
    /** Current display mode. */
    displayMode?: McpUiDisplayMode;
    /** Display modes the host supports. Views should check before requesting changes. */
    availableDisplayModes?: McpUiDisplayMode[];
    /**
     * Container dimensions. `width`/`height` are fixed; `maxWidth`/`maxHeight`
     * are flexible upper bounds; absence means unbounded.
     */
    containerDimensions?: {
        width?: number;
        height?: number;
        maxWidth?: number;
        maxHeight?: number;
    };
    /** BCP-47 locale (e.g., `"en-US"`). */
    locale?: string;
    /** IANA timezone (e.g., `"America/New_York"`). */
    timeZone?: string;
    /** Host application identifier (free-form). */
    userAgent?: string;
    /** Platform type for responsive design. */
    platform?: "web" | "desktop" | "mobile";
    /** Device capabilities. */
    deviceCapabilities?: {
        touch?: boolean;
        hover?: boolean;
    };
    /** Safe-area insets in pixels (e.g. notches, home indicators). */
    safeAreaInsets?: {
        top: number;
        right: number;
        bottom: number;
        left: number;
    };
    /** Forward-compat catchall for fields added in later spec revisions. */
    [key: string]: unknown;
}

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_telemetry`)
 * 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.restricted_telemetry";
    event: HydroRestrictedTelemetry;
} & {
    restricted: true;
});

/**
 * 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;
}

/**
 * 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;
}

declare interface HydroTelemetryOptions {
    clientName?: string;
    featureFlagService?: IFeatureFlagService;
}

/**
 * A way for the runtime agent to callback to something with progress, results, errors, etc.
 */
declare interface IAgentCallback {
    progress(content: AgentCallbackProgressEvent, opts?: AgentCallbackProgressOptions): Promise<void | AgentCallbackProgressResponse>;
    partialResult(result: AgentCallbackPartialResultEvent): Promise<void>;
    commentReply(reply: AgentCallbackCommentReplyEvent): Promise<void>;
    checkQuota?(content: AgentCallbackCheckQuotaEvent): Promise<void | AgentCallbackCheckQuotaResponse>;
    result(result: AgentCallbackResultEvent): Promise<void>;
    error(error: AgentCallbackErrorEvent): Promise<void>;
    /**
     * Emit a progress event with a specific namespace and structured content.
     * Used by first-party integrations (e.g., ci-analysis) to publish findings
     * to the sweagentd progress API with a dedicated namespace, ensuring they
     * flow through to hydro unconditionally.
     */
    emitNamespacedProgress?(namespace: string, kind: string, content: string): Promise<void>;
}

declare class IFCEngine implements IPostToolExecutionProcessor {
    private readonly logger;
    private contextLabel;
    private listCollaboratorsTool;
    private searchRepositoriesTool;
    private settings;
    private readonly repoVisibilityCache;
    private readonly repoCollaboratorsCache;
    constructor(logger: RunnerLogger, initialLabel?: SecurityLabel);
    /**
     * Sets the MCP tool used to resolve repository sink recipients.
     * Called after tools are loaded (they are not available at construction time).
     */
    setCollaboratorsTool(tool: Tool_2 | undefined, settings: RuntimeSettings): void;
    /**
     * Sets the MCP tool used to check repository visibility.
     * Called after tools are loaded (they are not available at construction time).
     */
    setSearchRepositoriesTool(tool: Tool_2 | undefined): void;
    getContextLabel(): SecurityLabel;
    setContextLabel(label: SecurityLabel): void;
    /** Visible for testing. */
    getRepoVisibilityCache(): ReadonlyMap<string, RepoVisibility>;
    /** Visible for testing. */
    getRepoCollaboratorsCache(): ReadonlyMap<string, ReadonlySet<string>>;
    toJSON(): string;
    getRepoVisibility(owner: string, repo: string): Promise<RepoVisibility | undefined>;
    getRepoCollaborators(owner: string, repo: string): Promise<ReadonlySet<string> | undefined>;
    /**
     * Queries the `search_repositories` MCP tool to determine whether a
     * repository is public or private. Returns `undefined` when the tool is
     * unavailable or the response cannot be parsed.
     */
    private fetchRepoVisibility;
    private parseRepoVisibility;
    private fetchRepoCollaborators;
    private parseRepoCollaborators;
    createPreToolUseHook(): (input: PreToolUseHookInput) => Promise<PreToolUseHookOutput | void>;
    postToolExecution(context: PostToolExecutionContext): Promise<void>;
}

/**
 * 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;
    /**
     * Applies a partial config override and re-resolves flags through the
     * normal resolution chain (env, config, flag overrides), then notifies
     * subscribers. Use for in-session toggles (e.g. `/memory on|off`) so the
     * change takes effect without a CLI restart.
     */
    applyConfigOverride(partialConfig: Partial<DefaultConfig>): 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>;
    /** Gets the value of a specific ExP flag (awaits the ExP response first). */
    getExpFlag(flag: ExpFlagKey): Promise<ExpFlagValue | undefined>;
    /** Applies CLI-fetched assignments and resolves any pending waiters. */
    setExpAssignments(assignments?: CopilotExpAssignmentResponse): void;
    /** 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 WebSocket transport for the Responses API is enabled. */
    isWebSocketResponsesEnabled(): 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>;
    /** Whether MCP `_meta` (FIDES IFC) surfacing on `ToolResultExpanded.mcpMeta` is enabled. */
    isFidesIfcEnabled(): Promise<boolean>;
    /** Whether the Copilot Subconscious (cross-session context sharing) experiment is enabled. */
    isCopilotSubconsciousEnabled(): Promise<boolean>;
    /** Whether the system message should be split into static and per-user blocks for cache optimization. */
    isSplitSystemMessageCacheEnabled(): Promise<boolean>;
}

declare type ImageAttachmentRequestFormat = "capi_url" | "inline_base64";

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, {
    type: "image";
    data: string;
    mimeType: string;
}, {
    type: "image";
    data: string;
    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>;

/**
 * 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;
}

declare class Inbox {
    private entries;
    private dbProvider?;
    private loaded;
    private loadPromise?;
    configurePersistence(dbProvider: () => SessionDatabase | undefined): void;
    send(input: SendInboxEntryInput): Promise<InboxEntry>;
    read(options?: ReadInboxEntryOptions): Promise<InboxEntry | undefined>;
    getUnreadUnnotifiedEntries(): Promise<InboxEntry[]>;
    markNotified(entryId: string): Promise<InboxEntry | undefined>;
    getById(entryId: string): Promise<InboxEntry | undefined>;
    /** Returns entries sent by a specific sender for a specific interaction. */
    getEntriesBySenderAndInteraction(senderId: string, interactionId: string): Promise<InboxEntry[]>;
    private ensureLoaded;
    private doLoad;
    private runMigrations;
    private applySend;
    private persistEntry;
    private persistReadState;
    private persistNotificationState;
    private prunePersistedEntries;
}

declare type InboxEntry = {
    id: string;
    recipientSessionId: string;
    senderId: string;
    senderName: string;
    senderType: string;
    interactionId: string;
    sequence: number;
    summary: string;
    content: string;
    sentAt: number;
    unread: boolean;
    readAt?: number;
    notifiedAt?: number;
};

/** Infer the function signature for a client→server method. */
declare type InferMethod<M> = M extends {
    params: z_2.ZodTypeAny;
    result: z_2.ZodTypeAny;
} ? (...args: OptionalParamArgs<z_2.infer<M["params"]>>) => z_2.infer<M["result"]> | Promise<z_2.infer<M["result"]>> : M extends {
    params: z_2.ZodTypeAny;
} ? (...args: OptionalParamArgs<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?;
    /**
     * Callback invoked when a tool call fails with "Not connected" (transport disconnected).
     * The callback should reconnect the server and return the fresh MCP client.
     * If undefined, disconnect errors are surfaced without retry.
     */
    private onDisconnectReconnect?;
    /**
     * Callback invoked when a tool call receives HTTP 404 (session expired per MCP spec).
     * Should evict tokens, restart the server, and return the fresh MCP client.
     */
    private onSessionExpiredReconnect?;
    /** Maps tool IDs (which may be truncated) to original MCP tool names for invocation. */
    private toolIdToOriginalName;
    /** Maps tool IDs to their MCP task support level. */
    private toolIdToTaskSupport;
    /** Handler for URL elicitation required errors from tool invocations. */
    private urlElicitationHandler?;
    /** Optional task registry for non-blocking MCP task execution. */
    private taskRegistry?;
    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;
    /**
     * Register a callback invoked when a tool call fails because the transport disconnected.
     * The callback should restart the MCP server and return the fresh client instance.
     */
    setOnDisconnectReconnect(callback: (serverName: string) => Promise<Client>): void;
    /**
     * Register a callback invoked when a tool call receives HTTP 404 (session expired).
     * The callback should evict tokens, restart the server with fresh auth, and return the new client.
     */
    setOnSessionExpiredReconnect(callback: (serverName: string) => Promise<Client>): 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;
    /**
     * Set the task registry for non-blocking MCP task execution.
     * When set, tools with `taskSupport: "required"` will register as background
     * tasks in the registry and return immediately instead of blocking.
     */
    setTaskRegistry(registry: TaskRegistry | undefined): void;
    private isSep2694TaskEventStreamsEnabled;
    private isMcpTaskStillActive;
    private closeMcpTaskEventStream;
    private waitForMcpTaskEventRetry;
    private startMcpTaskEventStream;
    /**
     * 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: Record<string, unknown>, toolCallId?: string, _customAgentName?: string): Promise<InvokeToolResponseData>;
    private doInvokeToolWithRetry;
    private requireTaskRegistryForTask;
    /**
     * Invoke a tool using the MCP Tasks protocol via `callToolStream()`.
     *
     * Entry to this method already required `taskSupport === "required"`. If
     * a `TaskRegistry` is wired in, the task is registered as a background
     * entry and the method returns immediately with the agent/task ID; the
     * stream is consumed asynchronously, updating registry status/progress
     * until the task completes. If no `TaskRegistry` is available (e.g. the
     * Actions runtime pipeline doesn't use Session), the method throws —
     * there is no safe way to surface a long-running task without a registry,
     * and falling back to a blocking stream consumption could hang the model
     * turn for an unbounded amount of time.
     */
    private doInvokeToolWithTask;
    /**
     * Non-blocking task stream consumption: reads messages using manual `.next()`,
     * registers a background task in TaskRegistry on `taskCreated`, and returns
     * immediately with the agent ID. The background executor consumes the rest.
     */
    private consumeTaskStreamNonBlocking;
    /**
     * Convert a `CallToolResult` into the shape the TaskRegistry executor
     * expects (`{ textResultForLlm, resultType }`). Throws on tool errors so
     * the registry marks the agent as failed with a useful message.
     *
     * Mirrors the LLM-visible text logic of the blocking path's
     * `invokeToolResponseToToolResult` by delegating to
     * `combineContentAndStructured` — see that helper for the precedence
     * rules. The combined string is computed before branching on `isError`
     * so a failure that only carries `structuredContent` (e.g.
     * `{ code: "RATE_LIMITED" }`) still surfaces that payload rather than
     * being reduced to the generic fallback string. Text items (and resource
     * items carrying text) are concatenated to form the `content` text input
     * to the helper.
     *
     * Known gap — binary content is not propagated. The blocking path
     * separately attaches images / resource blobs to the tool result via
     * `binaryResultsForLlm`, which the model layer (capi/anthropic) turns
     * into multimodal content blocks. The background-task path drops them
     * here because:
     *   1. The executor return shape is text-only and `task.result` flows
     *      back through `read_agent`, which currently has no multimodal
     *      surface.
     *   2. Persisting image/blob bytes on `task.result` would bloat session
     *      snapshots and likely needs a side-channel keyed by task id.
     *   3. The TasksDialog UI renders `task.result` as truncated text and
     *      would need updating to handle image-bearing completed tasks.
     * Addressing this would mean: (a) extend the executor return to carry
     * `binaryResultsForLlm`, (b) plumb it through `read_agent` so it ends
     * up on the surfaced ToolResult, (c) update the UI / persistence story.
     * Tracked as a follow-up to the experimental MCP_TASKS feature in
     * https://github.com/github/copilot-agent-runtime/issues/7419.
     */
    private callToolResultToExecutorReturn;
    /**
     * Stream-drop fallback: poll `getTask` until the task reaches a terminal
     * state, then call `getTaskResult` to fetch the final payload. Used when
     * the streaming connection breaks mid-flight (network blip, transport
     * error). Keeps the subagent alive and surfaces the eventual result rather
     * than failing it just because the stream went away.
     *
     * Note: This is a per-process recovery only — when the CLI itself
     * restarts, the in-memory MCP client and TaskRegistry are gone and
     * outstanding tasks are orphaned on the server (eventually expiring per
     * their TTL). The "non-easy" version of this would persist
     * `{ serverConfig, taskId, agentId }` to session state on `taskCreated`,
     * re-spawn / re-connect MCP servers on startup, rehydrate subagents via a
     * new `TaskRegistry.adoptExistingAgent(...)` API, and resume polling.
     * That matters because long-running MCP tasks are precisely the workloads
     * users are most likely to leave running across a restart, but it's a
     * meaningful chunk of work involving session-state schema, transport
     * reconnection, and a new registry surface — so it's deferred.
     */
    private pollTaskUntilTerminal;
    protected getProviderCacheKey(provider: ClientInfo_2): string;
    protected loadToolsFromProvider(clientInfo: ClientInfo_2): Promise<Record<string, BasicToolConfig>>;
    private static getToolIdFromClientAndToolName;
    private static getToolNameFromIdAndClientName;
}

declare const inputSchema: z_2.ZodObject<{
    description: z_2.ZodString;
    query: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    description: string;
    query: string;
}, {
    description: string;
    query: string;
}>;

declare type InsertArgs = z_2.infer<typeof insertArgsSchema>;

declare const insertArgsSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    insert_line: z_2.ZodNumber;
    new_str: z_2.ZodString;
} & {
    command: z_2.ZodLiteral<"insert">;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "insert";
    new_str: string;
    insert_line: number;
}, {
    path: string;
    command: "insert";
    new_str: string;
    insert_line: number;
}>;

declare type InsertInput = z_2.infer<typeof insertInputSchema>;

/**
 * Zod schema for insert command input (without command field).
 */
declare const insertInputSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    insert_line: z_2.ZodNumber;
    new_str: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    new_str: string;
    insert_line: number;
}, {
    path: string;
    new_str: string;
    insert_line: number;
}>;

/**
 * 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;
}

/**
 * Source identifier for the hidden follow-up user message that delivers
 * on-demand instruction file discoveries (e.g. nested AGENTS.md). Carried on
 * `ToolResultExpanded.newMessages[].source` so timeline rendering filters it
 * out (`isUserFacingUserMessageSource` only allows allowlisted prefixes) and so it is
 * excluded from `originalUserMessages` for compaction purposes. Mirrors the
 * pattern used by the skill tool (see `SKILL_MESSAGE_SOURCE_PREFIX`).
 */
declare const INSTRUCTION_DISCOVERY_MESSAGE_SOURCE = "instruction-discovery";

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(s) from frontmatter — when set, this instruction applies only to matching files */
    applyTo?: string[];
    /** Short description from frontmatter for use in instruction tables */
    description?: string;
    /** When true, this source starts disabled and must be toggled on by the user */
    defaultDisabled?: boolean;
};

/** Source of an indexed instruction entry. */
declare type InstructionSource_2 = "mcp-server" | "skill";

/** Where an instruction source lives — used for UI grouping */
declare enum InstructionSourceLocation {
    User = "user",
    Repository = "repository",
    WorkingDirectory = "working-directory",
    Plugin = "plugin"
}

/** 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",
    Plugin = "plugin"
}

export declare const INTEGRATION_ID: string;

/**
 * Two-level integrity lattice following the FIDES paper (arXiv 2505.23643v2, §4.1):
 *   T ⊑ U  (trusted flows to untrusted)
 *   join(T, U) = U  (taint propagation: LUB is the less-trusted value)
 *   meet(T, U) = T  (GLB is the more-trusted value)
 *
 * Numeric encoding: trusted = 0, untrusted = 1.
 */
declare class IntegrityLabel implements Lattice<IntegrityLabel> {
    readonly level: "trusted" | "untrusted";
    private constructor();
    static trusted(): IntegrityLabel;
    static untrusted(): IntegrityLabel;
    static fromString(s: string): IntegrityLabel;
    private get numericLevel();
    leq(other: IntegrityLabel): boolean;
    /** Least upper bound: returns the less-trusted (higher) value. */
    join(other: IntegrityLabel): IntegrityLabel;
    /** Greatest lower bound: returns the more-trusted (lower) value. */
    meet(other: IntegrityLabel): IntegrityLabel;
    equals(other: IntegrityLabel): boolean;
    toString(): string;
    toJSON(): 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, sentiment analysis) */
| "conversation-background"
/** Conversation compaction requests */
| "conversation-compaction"
/** First billable request in a user-initiated turn (set by PremiumRequestProcessor) */
| "conversation-user";

/**
 * Implements tools that expose interactive shell terminals to Copilot agent.
 * This tool supports multiple shell sessions, including long-running and interactive
 * (apps using NCurses or requiring a TTY) to work.
 */
declare class InteractiveShellToolContext {
    private readonly config;
    private readonly inTests;
    private readonly options;
    private readonly sessions;
    private readonly sessionMetadata;
    private readonly currentExecutions;
    private readonly detachedSessions;
    private readonly retainedAttachedShellTasks;
    private readonly promotableSyncShells;
    private readonly syncShellPromotionResolvers;
    private readonly shutdownSessionsInfos;
    /** Bounded map tracking recently-shutdown sessions for error classification. */
    private readonly recentShutdowns;
    private readonly shellConfig;
    private readonly shellDisplayName;
    private readonly executionQueues;
    private onCommandComplete?;
    private readonly backgroundTaskNotificationsEnabled;
    private readonly taskRegistry;
    private readonly ownerId;
    private currentLocation;
    readonly sessionFactory: IShellExecutionSessionFactory;
    constructor(config: ToolConfig, inTests?: boolean, sessionFactory?: IShellExecutionSessionFactory, options?: {
        readonly supportsPowerShell7Syntax?: boolean;
        /**
         * When true, sync commands do NOT auto-shutdown their session on completion.
         * Sessions linger past command exit until the idle reaper picks them up between
         * turns, matching async behavior — a same-turn read after a finished sync command
         * succeeds instead of failing with `shell_completed`. See plan.md action #1.
         *
         * Gated by SHELL_SPAWN_BACKEND in config.ts so this behavior change rolls out
         * paired with the spawn backend; PTY-backed sessions retain the legacy
         * auto-shutdown semantics.
         */
        readonly retainSyncOutputAfterCompletion?: boolean;
    });
    /**
     * Creates the default session factory (PTY backend).
     * When the SHELL_SPAWN_BACKEND flag is enabled, getShellTools() in config.ts
     * resolves the flag eagerly and passes the appropriate factory to the constructor.
     */
    private createDefaultSessionFactory;
    /**
     * Updates the working directory used for new shell sessions.
     * Existing shell sessions retain their own cwd.
     */
    updateLocation(newLocation: string): void;
    /**
     * Sets the callback to be invoked when a background shell command completes.
     * @param callback - The callback to invoke, or undefined to remove the callback
     */
    setOnCommandCompleteCallback(callback: ShellCommandCompletionCallback | undefined): void;
    getShellTool(overrides?: {
        notifyOnComplete?: boolean;
    }): Tool_2;
    private getPowerShellCompatibilityDescriptionLines;
    private needsPowerShellCompatibilityGuidance;
    getWriteShellTool(): Tool_2;
    getReadShellTool(overrides?: {
        notifyOnComplete?: boolean;
    }): Tool_2;
    getStopShellTool(): Tool_2;
    getListShellsTool(): Tool_2;
    private defaultTimeoutInMs;
    /**
     * Helper method to execute the shell tool callback with permission checks.
     * This is called either directly or through the execution queue.
     */
    private executeShellToolCallback;
    private shellTool;
    private writeShellTool;
    private readShellTool;
    private stopShellTool;
    private listShellsTool;
    private shutdown;
    getSession(shellId: string): IShellExecutionSession | undefined;
    /**
     * Shuts down all shell sessions and cleans up resources.
     * This is intended to be called when the owning Session is being disposed.
     */
    shutdownAll(): Promise<void>;
    /**
     * Shuts down all attached shells immediately, even if they have a command
     * in progress. Detached shells are left alone — they were started to
     * outlive the agent under their original policy.
     *
     * Used when settings baked into the PTY at spawn time (e.g. sandbox
     * policy) change mid-session and existing shells must be torn down so the
     * next command spawns fresh.
     */
    killAllAttachedShells(): void;
    /**
     * Shuts down attached shells that still have a command in progress.
     *
     * Called on user-initiated turn cancellation (esc) to reap shell commands
     * that slipped into the background — sync commands promoted on timeout, or
     * async commands started without detach — whose turn-scoped abort listener
     * was already removed when they were promoted. Detached shells
     * (servers/daemons) and idle reusable shells are intentionally left alone:
     * the former are meant to outlive the agent, the latter carry reusable
     * state (cwd, env, activated venvs) across turns.
     */
    killRunningAttachedShells(): void;
    /**
     * Shuts down all attached shell sessions that don't have a command in progress.
     * Intended to be called when the agent goes idle with no background tasks,
     * reclaiming child processes (pwsh/bash + conhost) and in-process resources
     * (PTY handles, xterm terminals, output buffers).
     *
     * This is intentionally synchronous — `shutdownSession` performs synchronous
     * process kills and map cleanup with no async I/O.
     */
    shutdownIdleSessions(): number;
    /**
     * Waits for all running async shell commands to complete.
     * Returns when all commands have finished.
     */
    waitForActiveShells(): Promise<void>;
    /**
     * Returns true if any shell session has a command in progress.
     */
    hasRunningCommands(): boolean;
    /**
     * Returns true if any attached shell session has a command currently in
     * progress.
     *
     * Unlike `hasCommandsAwaitingNotification()`, this is independent of the
     * notification opt-in: every running attached command counts. Detached
     * sessions are skipped because they're designed to outlive the session
     * (servers, daemons) and must not gate session-idle decisions.
     */
    hasRunningAttachedCommands(): boolean;
    /**
     * Returns true if any attached shell has a command in progress that will
     * trigger a completion notification when it finishes.
     */
    hasCommandsAwaitingNotification(): boolean;
    /**
     * Returns true if the specified sync shell wait can currently be released
     * into background execution.
     */
    canPromoteShellToBackground(shellId: string): boolean;
    /**
     * Returns the currently-promotable sync shell wait, if any.
     */
    getCurrentPromotableShell(): {
        shellId: string;
        description?: string;
    } | undefined;
    /**
     * Releases the current sync shell wait so the command keeps running in the
     * background and can be managed via read/write/stop.
     */
    promoteShellToBackground(shellId: string): boolean;
    getTrackedShellTasks(): Array<{
        type: "shell";
        id: string;
        description: string;
        status: TaskStatus;
        startedAt: number;
        completedAt?: number;
        command: string;
        logPath?: string;
        pid?: number;
        attachmentMode: "attached" | "detached";
        executionMode: "sync" | "background";
        canPromoteToBackground?: boolean;
    }>;
    getShellTaskProgress(shellId: string): Promise<{
        recentOutput: string;
        pid?: number;
    } | undefined>;
    cancelShellTask(shellId: string): Promise<boolean>;
    removeShellTask(shellId: string): boolean;
    /**
     * Returns the TaskRegistry used for tracking detached shell sessions.
     * Primarily useful for tests and for retrieving detached shell state.
     */
    getTaskRegistry(): TaskRegistry;
    private isAttachedShell;
    private shouldRetainAttachedShellTask;
    private retainAttachedShellTask;
    /**
     * Returns info about attached running shell commands that are awaiting notification.
     */
    getRunningCommandsInfo(): Array<{
        shellId: string;
        description?: string;
    }>;
    /**
     * Build a non-destructive sessions list for inclusion in error messages.
     * Unlike {@link listShellsTool}, this does not call `session.readOutput()`,
     * so it will not drain buffered output from running sessions.
     */
    private getActiveSessionsList;
    private markPromotableSyncShell;
    private clearPromotableSyncShell;
    private getOrCreateSession;
    private shutdownSession;
    /**
     * Record a shutdown in the bounded tracking map.
     * Evicts the oldest entry only when inserting a new key would grow the map
     * beyond MAX_SHUTDOWN_TRACKING_ENTRIES. Updates to existing keys never
     * trigger eviction.
     */
    private trackShutdown;
    /**
     * Compute the telemetry baseline for a `read_*` call against a given shellId.
     *
     * Returns the `read_target_state` and `read_target_original_mode` properties
     * to emit on this read, regardless of whether the read ultimately succeeds or
     * fails. Captures the operational state of the read target at the moment the
     * read is processed: alive session → `active`; recorded shutdown → mapped from
     * `ShutdownInfo.reason`; no record → `never_existed` / `unknown`.
     *
     * Callers should compute this once at the top of `readShellTool` and merge the
     * returned properties into the `toolTelemetry` of every exit path so we can
     * measure how often the model polls each state and compare outcomes.
     */
    private getReadTargetTelemetry;
    /**
     * Classifies why a shell ID is not available and builds a categorized error result.
     * Checks active sessions, recently-shutdown sessions, and returns appropriate
     * error category, LLM message, and telemetry.
     */
    private classifyShellError;
    /**
     * Get or create an execution queue for the given shell ID.
     * This ensures that all shell operations for the same session are executed sequentially.
     */
    private getOrCreateExecutionQueue;
}

export declare namespace internal {
    export {
        AppInsightsTelemetryService,
        NoopTelemetryService,
        SessionTelemetry,
        missingRemoteBranchWarning,
        HandoffStep,
        HandoffProgress,
        PruneResult,
        ForkSessionOptions,
        ForkSessionResult,
        LocalSessionManagerOptions,
        ResumeBehavior,
        LocalSessionManager
    }
}

/**
 * Information about a skill that was invoked during the session.
 * Used to preserve skill context across compaction.
 */
declare interface InvokedSkillInfo {
    /** The skill name */
    name: string;
    /** Path to the SKILL.md file */
    path: string;
    /** The full content of the skill file (YAML frontmatter stripped) */
    content: string;
    /**
     * Tools that should be auto-approved when this skill is active.
     * Stored separately from `content` because the frontmatter is stripped before injection,
     * so the allowed-tools list cannot be recovered by re-parsing `content` on session resume.
     */
    allowedTools?: readonly string[];
    /** Turn number when the skill was invoked */
    invokedAtTurn: number;
}

declare type InvokeToolResponseData = {
    isToolError: boolean;
    content: CallToolResult["content"];
    structuredContent?: unknown;
    /** When true, secret masking would have applied but was skipped. */
    secretMaskingSkipped?: boolean;
    /** When true, server config explicitly disabled secret masking. */
    secretMaskingDisabledForServer?: boolean;
    /**
     * Resolved MCP App UI resource (SEP-1865), populated when the invoked
     * tool declared `_meta.ui.resourceUri` and the auto-fetch succeeded.
     */
    uiResource?: McpUiResource;
    /**
     * MCP `CallToolResult._meta`, carried verbatim. On the OOP HTTP path this comes from
     * `response.json()` and is therefore unvalidated — always pass through `normalizeMcpMeta`
     * before treating it as an object. Surfaced as `mcpMeta` only when `FIDES_IFC` is on.
     */
    _meta?: unknown;
};

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 IPostEditHook {
    readonly id: string;
    /**
     * Post-edit hooks are ran after any edit is made by the agent, once per turn. Note: if the agent decides to edit
     * using bash execution, like `echo 'content' > file.txt`, the hook will not run.
     */
    postEdit(context: PostEditHookContext): Promise<PostEditHookResult>;
}

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 IPostResultHook {
    readonly id: string;
    /**
     * Post-result hooks are ran after the agent has finished its work for the current problem.
     */
    postResult(context: PostResultHookContext): Promise<PostResultHookResult>;
}

declare interface IPostToolExecutionProcessor extends IToJson {
    /**
     * Called after a tool has been executed. Processors may normalize the tool
     * result in-place (for example to resize binary attachments) before it is
     * serialized into conversation history.
     */
    postToolExecution(context: PostToolExecutionContext): Promise<void>;
}

declare interface IPreCommitHook {
    readonly id: string;
    /**
     * - Ran before commits are made by the agent, once per turn. Note: if the agent decides to commit using
     * bash execution of `git commit`, the hook will not run.
     * - May prevent the commit from happening via the returned {@link PreCommitHookResult}
     */
    preCommit(context: PreCommitHookContext): Promise<PreCommitHookResult>;
}

declare interface IPreEditsHook {
    readonly id: string;
    /**
     * - Ran before any edits are made by the agent, once per turn. Note: if the agent decides to edit
     * using bash execution, like `echo 'content' > file.txt`, the hook will not run.
     */
    preEdits(context: PreEditsHookContext): Promise<void>;
}

declare interface IPrePRDescriptionHook {
    readonly id: string;
    /**
     * Allows hooks to modify the staged PR description before it is returned.
     */
    prePRDescription(context: PrePRDescriptionHookContext): Promise<string>;
}

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;
            /**
             * True when the parent session resolved the virtual "auto" model via `POST /models/session`.
             * Sub-agents check this to inherit the session model instead of selecting their own,
             * ensuring the Copilot-Session-Token billing header is forwarded and rate-limit quotas
             * are shared. Distinct from `capiSessionToken` presence, which can also be set from
             * Actions job details outside of CLI auto mode.
             */
            autoMode: boolean;
        };
        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;
        isTriggerJob?: boolean;
    };
    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;
    /**
     * Test-only: Pre-formatted repo/user memories to inject as separate sections
     * in the combined memories prompt used by user-scoped memory evals.
     */
    testInjectedScopedMemories?: TestInjectedScopedMemories;
    /**
     * Test-only: When true, enables the vote_memory tool in local memory strategy evals.
     * Used by eval tests to verify voting behavior without requiring cloud API.
     */
    testVoteToolEnabled?: boolean;
    /**
     * Test-only: When true and testInjectedMemories is set, a synthetic voteToolDefinition
     * is included so getMemoryTools() registers the vote_memory tool. Combined with
     * testInjectedMemories (which bypasses both the /enabled and /prompt Memory API calls),
     * this allows eval tests to exercise vote_memory with no real Memory API dependency.
     */
    testEnableVoteTool?: boolean;
    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;
                /**
                 * Override the model passed to the autofind CLI's `--model` flag.
                 * When undefined, the runtime uses its built-in default model.
                 *
                 * Useful when the default model is not available in a given
                 * environment (e.g. 1P-only models in a 3P session) or when
                 * experimenting with alternative models.
                 */
                model?: string;
            };
            /**
             * 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;
            };
        };
        /**
         * CCAv3-only settings for runtime-tools memory tool exposure.
         * When storeEnabled or voteEnabled is false, the matching memory tool will not be exposed via MCP.
         * When enabled is true or undefined, the tool's availability is determined by the Memory API /prompt response.
         */
        memory?: {
            storeEnabled?: boolean;
            voteEnabled?: boolean;
        };
        /**
         * Settings for handling large tool outputs.
         */
        largeOutput?: {
            /**
             * Maximum size in bytes before output is written to a temp file.
             * Default is 20KB.
             */
            maxSizeBytes?: number;
            /**
             * Directory to write temp files to. Default is os.tmpdir().
             */
            outputDir?: string;
        };
    };
    /**
     * Settings for built-in agents (e.g. rubberDuck rollout settings).
     */
    builtInAgents?: {
        rubberDuck?: boolean;
        rubberDuckAutoInvoke?: boolean;
    };
    /**
     * 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;
    };
}

export declare function isAbortReason(value: unknown): value is AbortReason;

/**
 * Single source of truth for whether the Agents-tab feature is enabled.
 *
 * Gates every Agents-tab surface (UI tab membership, registry watcher, managed-server
 * spawn, LocalRpcSession-based attach, the `--managed-server` CLI flag, and the
 * `agentRegistry.spawn` shared-API RPC). Tier `"team"`: on by default for team
 * repos, opt in elsewhere via `COPILOT_CLI_ENABLED_FEATURE_FLAGS=COPILOT_AGENTS_TAB`
 * or `defaultFeatureFlags` override.
 *
 * Use this helper instead of reading `featureFlags.COPILOT_AGENTS_TAB` directly so callers
 * have a single, greppable site to update if the gating widens or splits in the future.
 *
 * Accepts `undefined` so server-mode and tooling paths that propagate optional
 * featureFlags can call the helper without an explicit guard. Treating
 * `undefined` as "off" matches the rest of the feature-flag plumbing where a
 * missing flags object means "use defaults", and gating off in that case is the
 * safe choice for Agents-tab surfaces that depend on a resolved flag set.
 */
export declare function isAgentsTabEnabled(featureFlags: FeatureFlags | undefined): boolean;

declare function isAutofindNotFoundError(error: unknown): error is Error;

/** Returns true when {@link modelId} is the auto-mode virtual id. */
export declare function isAutoModel(modelId: string | undefined | null): boolean;

/**
 * Returns true when the settings indicate the parent session is using auto mode.
 * Requires both the explicit `autoMode` flag (set by the CLI session builder when auto mode
 * resolves) and a `capiSessionToken` (the JWT needed for billing header forwarding).
 * Checking both distinguishes CLI auto mode from Actions job details (which set the token
 * without the flag) and guards against a stale flag without a valid token.
 */
export declare function isAutoModeSession(settings: RuntimeSettings): boolean;

declare function isAutopilotContinuationMessage(prompt: string): boolean;

/**
 * Checks whether the code review feature should be considered enabled.
 * Requires the enable flag while ensuring the disable flag is not set.
 * Also respects repo-level validation settings which take precedence.
 */
declare const isCodeReviewFeatureEnabled: (settings: RuntimeSettings) => boolean;

declare function isCreateFileStrReplaceEditorCommand(command: StrReplaceEditorArgs["command"]): boolean;

/**
 * Returns true when a model is a custom (BYOK) model.
 */
export declare function isCustomModel(model: Model): boolean;

/**
 * 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;

/**
 * Checks whether the dependency checker tool should be enabled as a validation tool.
 * Respects repo-level validation settings which take precedence over feature flags.
 */
declare function isDependencyCheckerEnabled(settings: RuntimeSettings): boolean;

export declare const isFeatureFlag: (flag: string) => flag is FeatureFlag;

/**
 * Backend-neutral interface for shell command execution sessions.
 *
 * This interface abstracts the execution backend (PTY, spawn, etc.) so that
 * `InteractiveShellToolContext` can manage shell tool lifecycle without coupling
 * to a specific process management strategy.
 */
declare interface IShellExecutionSession {
    /** Whether a command is currently executing in this session. */
    readonly hasCommandInProgress: boolean;
    /** The PID of the underlying process, if available. */
    getPid(): number | undefined;
    /** Sets a callback invoked when partial output changes during execution. */
    setPartialOutputChangedCallback(callback: ShellPartialOutputChangedCallback | undefined): void;
    /**
     * Sets a callback invoked when a command completes.
     * The callback receives the final output and the process PID.
     * The caller is responsible for associating the shellId externally.
     */
    setCommandCompleteCallback(callback: ((output: ShellOutput, pid?: number) => void) | undefined): void;
    /**
     * Executes a command synchronously with an optional timeout.
     * Returns undefined if a command is already in progress.
     */
    executeCommand(command: string, timeoutMs?: number, abortSignal?: AbortSignal, releaseOnPromotion?: Promise<never>, onCommandStarted?: () => void): Promise<ShellOutput | undefined>;
    /**
     * Starts a command asynchronously without waiting for completion.
     * Returns false if a command is already in progress.
     */
    tryExecuteAsyncCommand(command: string, abortSignal?: AbortSignal): Promise<boolean>;
    /**
     * Starts a detached command that survives session shutdown.
     * Output is redirected to the specified log file.
     *
     * Note: This is a temporary compatibility method. A future refactor will
     * move detached execution to a separate ShellDetachedExecutionLauncher.
     */
    tryExecuteDetachedCommand(command: string, logPath: string): Promise<boolean>;
    /**
     * Sends input to the currently running command.
     * Returns false if no command is in progress.
     */
    trySendInput(input: string): boolean;
    /**
     * Reads accumulated output from the current or last command.
     *
     * Pass `{ flush: false }` for a best-effort snapshot that does not wait for
     * pending file-backed output writes to quiesce. This is useful when a command
     * is still running and may continue producing output indefinitely.
     */
    readOutput(options?: {
        flush?: boolean;
    }): Promise<ShellOutput | undefined>;
    /**
     * Waits for the current command to complete, with a timeout.
     * Throws on timeout, abort, or promotion.
     */
    waitForCommandCompletionOrTimeout(timeoutMs: number, abortSignal?: AbortSignal, releaseOnPromotion?: Promise<never>): Promise<ShellOutput>;
    /**
     * Signals that the caller has consumed the final output.
     * Implementations should clear or reset output buffers as appropriate.
     */
    acknowledgeFinalOutput(): void;
    /** Shuts down the session, killing any running process and releasing resources. */
    shutdown(): void;
    /**
     * Releases heavyweight resources (terminal emulators, stream listeners, etc.)
     * while keeping the underlying process alive. Called after detaching a command
     * so the session stops consuming memory for I/O it no longer needs to track.
     */
    releaseResources(): void;
    /** Returns a point-in-time snapshot of the session's status. */
    getSnapshot(): ShellExecutionSessionSnapshot;
}

/** Factory for creating shell execution sessions. */
declare interface IShellExecutionSessionFactory {
    create(options: ShellExecutionSessionCreateOptions): Promise<IShellExecutionSession>;
    /** Capabilities of sessions created by this factory. */
    readonly capabilities: ShellExecutionCapabilities;
}

/**
 * Type guard that narrows a hook output containing optional decision/reason
 * fields to a validated {@link HookBlock} with a guaranteed reason string.
 */
export declare function isHookBlock(output: {
    decision?: HookBlockDecision;
    reason?: string;
} | void | undefined): output is HookBlock;

declare function isRateLimitError(output: string): boolean;

declare function isStrReplaceEditorCall(toolCall: CopilotChatCompletionMessageToolCall): toolCall is ChatCompletionMessageFunctionToolCall & {
    function: {
        name: "str_replace_editor" | StrReplaceEditorArgs["command"];
    };
};

/**
 * Checks whether a hook output represents a terminal decision that should
 * lock further non-policy hooks from executing. Covers block decisions
 * (userPromptSubmitted, postToolUse, agentStop, subagentStop), deny
 * decisions (preToolUse), and behavior deny (permissionRequest).
 *
 * @internal Not intended for use by SDK consumers.
 */
export declare function isTerminalDecision(output: unknown): boolean;

declare function isToolResultExpanded(result: ToolResult): result is ToolResultExpanded;

/**
 * Type guard that checks if an external tool's parameters schema is valid for use as a ToolInputSchema.
 * Tool input schemas must be objects (type: "object") since function calling requires named parameters.
 * Returns true if the schema is undefined (will use default empty object) or has type "object".
 */
export declare function isValidToolParametersSchema(schema: ExternalToolDefinition["parameters"]): schema is ToolInputSchema;

declare function isWriteToExistingFileStrReplaceEditorCommand(command: StrReplaceEditorArgs["command"]): boolean;

declare function isWriteToFileStrReplaceEditorCommand(command: StrReplaceEditorArgs["command"]): 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 KnownReasoningEffort = (typeof REASONING_EFFORT_LEVELS)[number];

declare type LanguageTelemetry = {
    aborted?: boolean;
} & (DatabaseCreationTelemetry | (DatabaseCreationTelemetry & AnalysisTelemetry) | SkippedTelemetry);

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;
    /** Configured grep tool name to suggest when inspecting saved output. */
    grepToolName?: string;
    /** Human-readable content kind for the generated large-output message. */
    contentKind?: string;
};

/**
 * Configuration for handling large tool outputs.
 */
declare interface LargeToolOutputConfig {
    /**
     * Whether large output handling is enabled. Default is true.
     */
    enabled?: boolean;
    /**
     * Maximum size in bytes before output is written to a temp file. Default is 50KB.
     */
    maxSizeBytes?: number;
    /**
     * Directory to write temp files to. Default is os.tmpdir().
     */
    outputDir?: string;
}

declare const LARK_AUTOPILOT_CONTINUATION_MESSAGE = "This is an internal autopilot control message, not an end-user request. Do not acknowledge it in visible assistant text.\n\nYou have not yet marked the task as complete using the task_complete tool. If you were planning, stop planning and start implementing. You aren't done until you have fully completed the task.\n\nIMPORTANT: Do NOT call task_complete if:\n- You have open questions or ambiguities - make good decisions and keep working\n- You encountered an error - try to resolve it or find an alternative approach\n- There are remaining steps - complete them first\n\nIf the latest visible end-user request was conversational-only and you already answered it, your entire next response must be exactly one task_complete tool call with a short summary. Do not send assistant text before or after the tool call. Do not inspect the workspace, query session state, query todos, read files, search, run commands, run tests, validate, or continue implementation work.\n\nKeep working autonomously until the task is truly finished, then call task_complete.";

/**
 * A lattice provides a partial order with join (least upper bound) and meet (greatest lower bound).
 * Used for information flow control label algebra.
 */
declare interface Lattice<T> {
    /** Returns true if this <= other in the lattice ordering. */
    leq(other: T): boolean;
    /** Returns the least upper bound (join) of this and other. */
    join(other: T): T;
    /** Returns the greatest lower bound (meet) of this and other. */
    meet(other: T): T;
}

/** Repository+branch-scoped dynamic context board configuration. */
declare type LaunchCheckDynamicContextConfig = {
    store: SessionStore;
    repository: string;
    branch: string;
};

/** Line number in a source file (1-based) */
declare type LineNumber = number;

declare const llmToolRejectionMessage = "The tool call required approval from the user, but the user rejected it or an earlier tool call.";

/**
 * 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;

/**
 * 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/
 * - 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 const LOCAL_SKILL_SOURCES: readonly ["project", "inherited", "personal-copilot", "personal-agents", "plugin", "custom", "builtin"];

/**
 * Lightweight IFeatureFlagService implementation that resolves static flags
 * without ExP infrastructure. Suitable for the Actions runtime, SDK, and tests.
 */
export declare class LocalFeatureFlagService extends FeatureFlagService {
    constructor(options?: Partial<FeatureFlagInitOptions>);
}

/**
 * Session class with event sourcing
 */
declare class LocalSession extends Session<LocalSessionMetadata> {
    readonly isRemote: false;
    private callback;
    private isProcessing;
    private itemQueue;
    /**
     * Monotonic counter shared between `itemQueue` and the immediate steering
     * queue so we can identify the most recently added pending item across
     * both queues regardless of which one received it last.
     */
    private nextPendingOrder;
    /**
     * Tracks insertion order for pending items keyed by item identity. Used
     * by `removeMostRecentPendingItem()` to honor LIFO removal across both
     * the immediate steering queue and the queued-items queue.
     */
    private pendingItemOrder;
    private _cachedTools;
    private cachedToolConfig?;
    private cachedSettings?;
    protected getToolConfig(): ToolConfig | undefined;
    private _cachedClient;
    private premiumRequestProcessor;
    private immediatePromptProcessor;
    private compactionProcessor;
    private screenshotProcessor;
    readonly sidekickAgentManager: SidekickAgentManager;
    /**
     * Get background tasks from the sidekick agent registry.
     * Returns only agent tasks (sidekick agents don't have shell entries).
     */
    getSidekickBackgroundTasks(): BackgroundTask[];
    get hasActiveWork(): boolean;
    /**
     * Extends the base behavior with a re-evaluation of the deferred
     * `session.idle` event. Every background-task-change pulse already funnels
     * through here (taskRegistry change, sidekick change), so this is the
     * single choke point that drains the deferral when work quiesces.
     *
     * In particular, `interactiveShellTool.setCommandCompleteCallback` schedules
     * `taskRegistry.notifyChange()` via `queueMicrotask` on every attached
     * shell command completion regardless of notification opt-in, which lands
     * here and lets non-notifying shells unblock idle.
     *
     * `emitDeferredSessionIdleIfReady` is a no-op when no deferral is pending
     * (or work is still in progress), so calling it on every change is cheap.
     */
    protected notifyBackgroundTaskChange(): void;
    /** 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?;
    /** Session-scoped embedding cache DB, reused across index rebuilds. */
    private embeddingCacheDb?;
    /** Dirty flag: when true the embedding instruction index needs to be (re)built. */
    private instructionIndexDirty;
    /** Promise for the in-progress index rebuild so concurrent callers can await it. */
    private instructionIndexRebuildPromise?;
    /** Tracks the skills cache generation at last index build to detect skill changes. */
    private lastSkillsCacheGeneration;
    private pendingAbortReason?;
    /** True while the queue is sleeping during a rate-limit pause. */
    private isPausedForRateLimit;
    private activeSubAgents;
    mcpHostCache: McpHostCache;
    /** Per-session telemetry sender, supplied at construction. */
    protected sessionTelemetry?: DisposableTelemetrySender;
    /** Tear down per-session resources and clear the telemetry sender. */
    dispose(): Promise<void>;
    private hasEmittedModelResolutionInfo;
    private warnedUnknownTools;
    private sessionWorkspace;
    private workspaceEnabled;
    private _workspaceManager;
    private lastTodoContent;
    private lastPlanUpdateTurn;
    private static readonly PLAN_REMINDER_TURN_THRESHOLD;
    private readonly memoryApiCache;
    /** Store + repo + branch for the dynamic context board tool (set even when the board is empty). */
    private _dynamicContextConfig;
    /**
     * Tools that should be hidden from the default (top-level) agent but still
     * available to custom subagents (sidekicks, task-tool subagents) that
     * allowlist them. Mutated internally — kept separate from the user-facing
     * `defaultAgentExcludedTools` SDK option so that values added here do not
     * leak into telemetry or SDK consumers reading that field back.
     */
    private readonly internalDefaultAgentExcludedTools;
    /** Set the dynamic context config so the context_board tool can be registered even when the board is empty. */
    setDynamicContextConfig(config: {
        store: SessionStore;
        repository: string;
        branch: string;
    }): void;
    /** Read accessor for propagating to subagent sessions (see createSubagentSession). */
    getDynamicContextConfig(): {
        store: SessionStore;
        repository: string;
        branch: string;
    } | null;
    private compactionCancelled;
    private manualCompactionAbortController;
    private idleDeferredByBackgroundWork;
    private idleDeferredAborted;
    /**
     * 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;
    /**
     * Set auto-generated session name from the first user message content.
     * Only sets the name if the workspace doesn't already have one.
     */
    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 capability APIs for focused updates
     * await session.auth.setCredentials({ credentials: newAuthInfo });
     * await session.model.switchTo({ modelId: newModel });
     * ```
     */
    updateOptions(options: Partial<UpdatableSessionOptions>, behavior?: UpdateOptionsBehavior): void;
    /** After compaction, reset the embedding dedup set so instructions can be re-injected. */
    protected onCompactionApplied(): void;
    /**
     * Cached set of injection marker keys present in prior user messages.
     * Lazily populated; updated incrementally as new markers are injected;
     * cleared by `onCompactionApplied` since compaction rewrites `_chatMessages`.
     */
    private cachedPriorInjectedMarkers;
    /**
     * Marker keys (`mcp:<name>` / `skill:<name>`) already injected in prior
     * user messages, used by embedding retrieval to dedup across `--resume`
     * boundaries where the in-process emitted-id set was lost. Caller must
     * incrementally add any new markers it injects.
     */
    private getPriorInjectedMarkers;
    getMetadata(): LocalSessionMetadata;
    /**
     * Get the per-session WorkspaceManager, if available.
     */
    getWorkspaceManager(): WorkspaceManager | null;
    /** Internal throwing accessor for methods that require workspace to be enabled. */
    private requireWorkspaceManager;
    /**
     * Update workspace metadata (cwd, repo, branch) for this session.
     * Called by session managers on session create/resume.
     */
    updateWorkspaceMetadata(context: WorkspaceContext, name?: string): Promise<void>;
    /**
     * 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;
    }[]>;
    /**
     * Read a specific checkpoint by number.
     */
    readCheckpoint(checkpointNumber: number): Promise<string | null>;
    /**
     * Check if a plan.md file exists in the workspace.
     */
    hasPlan(): Promise<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;
    private getAutopilotObjectiveContentForCompaction;
    /**
     * Write plan content to the workspace plan.md file.
     */
    writePlan(content: string): Promise<void>;
    /**
     * Delete the workspace plan.md file.
     */
    deletePlan(): Promise<void>;
    getAutopilotObjectivePath(): string | null;
    readAutopilotObjective(): Promise<string | null>;
    writeAutopilotObjective(content: string): Promise<"create" | "update">;
    deleteAutopilotObjective(): Promise<boolean>;
    autopilotObjectiveExists(): Promise<boolean>;
    /**
     * 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(): Promise<boolean>;
    /**
     * Get the plan reminder message to inject into user prompts.
     * Returns null if no reminder should be shown.
     */
    getPlanReminderMessage(): Promise<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>;
    /**
     * Discovers instruction files near the accessed file path, walking
     * from its directory up to the repo root. Returns newly discovered
     * sources without performing side effects (notifications, telemetry).
     */
    protected discoverInstructionsForFile(filePath: string, _triggerTool: string): Promise<InstructionSource[]>;
    /**
     * 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. Passive
     * messages ride along the same way; their `PassivePolicy` only matters
     * at the post-loop salvage point if the loop exits before a preRequest
     * drains them.
     *
     * Idle behavior depends on `options.passive`:
     *   - omitted / `false`: routes through `send()` → agenticLoop, which
     *     emits the event and starts a new turn.
     *   - `{ type: "wait-for-next-turn" }`: buffered in the immediate queue
     *     without waking the loop; the next user-driven turn's preRequest
     *     drains it alongside that turn's prompt.
     *   - `{ type: "drop" }`: silently discarded. The caller is responsible
     *     for any durable storage (e.g., the Inbox table) if it wants the
     *     message to resurface later.
     *
     * System notifications are hidden from the timeline, non-billable, and
     * excluded from session snapshots.
     */
    sendSystemNotification(message: string, kind: SystemNotificationKind, options?: {
        passive?: PassivePolicy;
    }): 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;
    /** Fires the permission_prompt notification hook once a permission prompt is actually shown. */
    notifyPermissionPrompt(message: string): void;
    /**
     * Core logic for adding an item to the queue.
     *
     * For `kind: "message"` items, the wrapper inherits any insertion-order
     * stamp already attached to `item.options` — this preserves true LIFO
     * ordering for `removeMostRecentPendingItem()` when an item moves between
     * queues (e.g. an immediate steering message popped into the main queue
     * via `processQueuedItems()`). Fresh sends have no stamp on `options`
     * and get a new one allocated.
     *
     * @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;
    /**
     * Add a message to the immediate steering queue and stamp it with an
     * insertion order so `removeMostRecentPendingItem()` can compare it
     * against entries in `itemQueue`.
     */
    private addImmediateMessage;
    /**
     * 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;
    protected enqueueResumePendingWake(): 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(params?: {
        reason?: AbortReason;
    }): Promise<void>;
    /**
     * Drain queued prompts/commands so an MCP user.abort fully stops the session.
     * Mirrors the user-rejected-tool path: clears both the immediate steering
     * queue and the main item queue so no pending user-visible work survives.
     */
    protected onUserAbort(): void;
    /**
     * Suspend the session so it can be resumed later.
     *
     * Unlike abort(), suspend() preserves persisted permission state in the JSONL
     * so that orphaned tool calls can be properly classified on resume. The abort
     * signal carries reason "suspend" to distinguish it from a user-initiated abort
     * (which emits an "abort" event and marks orphans as interrupted).
     *
     * After the agentic loop unwinds, all buffered events are flushed to disk so
     * the caller can safely tear down the session / kill the process.
     */
    suspend(): Promise<void>;
    /**
     * Shared abort + cleanup logic for abort() and suspend().
     *
     * Note: subagents are hard-cancelled here, not checkpointed. On resume they
     * appear as orphaned local tool calls classified "interrupted". Adding
     * subagent resume would be additive: persist a `subagent.suspended` event
     * before cancelling, add a corresponding orphan state in
     * `classifyOrphanedToolCalls`, and re-launch from the checkpointed
     * conversation in `resolveResumeOrphans`.
     */
    private cancelProcessing;
    /**
     * Cancel all running/idle agent tasks in the main task registry.
     *
     * This complements sidekickAgentManager.cancelAll() which only covers
     * the sidekick registry. Agents launched by the Task tool and MCP tasks
     * live in this.taskRegistry and must be cancelled separately.
     *
     * Idempotent: already-cancelled tasks are skipped by TaskRegistry.cancel().
     */
    private cancelActiveAgents;
    /**
     * 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, reasoningSummary?: ReasoningSummary, contextTier?: ContextTier): Promise<void>;
    /**
     * Check whether there is any active background work that should defer
     * `session.idle`.
     *
     * "Active background work" today means either:
     *   - A multi-turn agent in the main task registry with status `"running"`.
     *   - An attached shell session with a command currently in progress.
     *
     * Both are work the session is awaiting on the user's behalf; neither
     * should be allowed to silently flip the session to idle. Used by the
     * idle-deferral path: `hasActiveWork`, `emitDeferredSessionIdleIfReady`,
     * and the post-loop idle decision in `processQueuedItems`. That path
     * pairs with `notifyBackgroundTaskChange()` (overridden on `LocalSession`)
     * to re-evaluate and drain the deferral when work quiesces, so it is
     * safe to include sources that have no synchronous completion-notification
     * turn — `interactiveShellTool` already pokes
     * `taskRegistry.notifyChange()` via `queueMicrotask` on every shell
     * command completion (see `setCommandCompleteCallback`).
     *
     * Intentionally NOT included:
     *   - Agents with status `"idle"` (multi-turn agents parked waiting for
     *     `write_agent`) — they are user-driven; gating idle on them would
     *     freeze the UI until the agent was explicitly killed.
     *   - Detached shells — by design they outlive the session (servers,
     *     daemons) and would otherwise pin idle forever.
     *   - Sidekick agents in `SidekickAgentManager.taskRegistry` — separate
     *     registry.
     *   - Attached shells when this session's shell context is inherited
     *     from a parent (subagents). Shells live in the parent's shell
     *     context; their completion only pulses the parent's task
     *     registry, so a subagent would never see the drain. Subagents
     *     gate idle on their own work only.
     *
     * NOTE: Other call sites (queue-draining via `enqueue`/`enqueueItem`
     * and the post-item break in `runAgenticLoop`) want a stricter predicate
     * that only includes background work whose completion fires a
     * notification turn capable of waking the queue and flushing pending
     * events. Those use `hasNotifyingBackgroundWork()` below; broadening
     * them to all attached shells would strand queued messages behind
     * never-completing attached commands (e.g., a `tail -f` or REPL that
     * quiesced and returned control to the agent while the underlying
     * process keeps running). The `suspend()` drain is stricter still
     * (`hasRunningAgents()` only) because suspend deliberately preserves
     * attached shells across the resume boundary.
     */
    private hasActiveBackgroundWork;
    /**
     * Whether any multi-turn agent in the main task registry is currently
     * in status `"running"`. Excludes `"idle"` (parked waiting for
     * `write_agent`) and sidekick agents (separate registry).
     *
     * Shared building block for `hasActiveBackgroundWork()`,
     * `hasNotifyingBackgroundWork()`, and `waitForNotificationTurnsToDrain()`.
     * The last of those needs the agent check in isolation: it must not
     * unconditionally gate on attached shells because `suspend()`
     * deliberately preserves shells (including notifying ones) across the
     * resume boundary. The `waitForPendingBackgroundTasks()` caller opts
     * back into waiting for notifying shells via the drain's
     * `includeNotifyingShells` parameter, since prompt-mode exit should
     * cover notifying work spawned recursively by completion turns.
     */
    private hasRunningAgents;
    /**
     * Stricter sibling of `hasActiveBackgroundWork()` that only counts
     * background work whose completion fires a notification turn capable of
     * waking the queue:
     *   - A multi-turn agent in the main task registry with status `"running"`.
     *   - An attached shell session with a command in progress AND
     *     `notifyOnComplete: true` (the opt-in that sends a synthetic
     *     completion notification when the command finishes).
     *
     * Excludes attached shells without `notifyOnComplete`: those return to
     * the agent on output quiescence while the underlying process keeps
     * running, with no synchronous wake-up signal. Deferring queue draining
     * on them risks stranding messages indefinitely (e.g., the user keeps
     * a REPL alive).
     *
     * Use this predicate for paths that depend on a completion notification
     * to make progress — not for the idle-deferral path (which is drained
     * directly by `notifyBackgroundTaskChange()`) and not as the only
     * suspend-drain gate (since suspend preserves attached shells,
     * including notifying ones, across the resume boundary).
     *
     * Same subagent exclusion as `hasActiveBackgroundWork()`: when this
     * session's shell context is inherited from a parent, the shells live
     * in the parent and their completion only pulses the parent's task
     * registry. Subagents must not gate on parent-owned shells.
     */
    private hasNotifyingBackgroundWork;
    private emitSessionIdle;
    private emitDeferredSessionIdleIfReady;
    /**
     * Wait until the session is no longer processing messages and no
     * multi-turn agents in this session are still running. Optionally
     * (when `includeNotifyingShells: true`) also waits for any attached
     * shells with `notifyOnComplete: true` whose commands are in progress;
     * those shells will fire a synthetic completion notification turn on
     * completion, and the loop will catch that turn via `isProcessing`.
     *
     * Attached shells are otherwise NOT waited on regardless of
     * `notifyOnComplete`:
     *
     *   - `suspend()` preserves attached shells (notifying and non-notifying)
     *     across the resume boundary, so waiting on either would block tear-
     *     down behind a never-completing REPL, `tail -f`, or long-running
     *     build.
     *   - `waitForPendingBackgroundTasks()` calls `waitForActiveShells()`
     *     before reaching this drain, so any shells that existed at call
     *     time have already settled. But the notification turns spawned
     *     by those completions may launch new notifying background shells
     *     (e.g., LLM kicks off `npm test` after `npm run build` finishes),
     *     and prompt-mode exit should wait for those too. Pass
     *     `includeNotifyingShells: true` from that call site so the loop
     *     iterates over recursively-spawned notifying work.
     *
     * What we DO need to wait on at both call sites is the agentic loop
     * itself unwinding (`isProcessing`) and any in-flight notification
     * turn it spawns to complete — including the synthetic completion
     * turns that just-finished notifying shells enqueued via `send()`.
     * `isProcessing` covers those turns once they reach `processQueue`.
     */
    private waitForNotificationTurnsToDrain;
    /**
     * Synchronous because the UI consumes the queued display-prompt list on
     * every render and remote sessions don't currently support steering or
     * queuing. If/when remote steering is added, this and its peers will need
     * to become async (and the UI consumers updated to match).
     */
    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;
    /**
     * Remove the most recently added user-facing pending item from across both
     * the immediate steering queue and the queued-items queue. System items
     * are skipped because they're hidden from the UI and removing them would
     * surprise the user.
     *
     * Insertion order is tracked via {@link pendingItemOrder} so items are
     * removed strictly in LIFO order regardless of which queue they ended up
     * in (e.g. Enter goes to the immediate queue, Ctrl+Enter to itemQueue).
     *
     * @returns true if an item was removed, false when there are no
     *   user-facing pending items left.
     */
    removeMostRecentPendingItem(): boolean;
    /**
     * @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.
     *
     * @param customInstructions - Optional user-provided instructions to focus the compaction summary
     * @returns Promise that resolves with compaction results
     * @throws Error if compaction fails or prerequisites aren't met
     */
    compactHistory(customInstructions?: string): 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.
     *
     * Returns true if a background compaction was actually in flight and was
     * cancelled; false if there was no compaction to cancel.
     */
    cancelBackgroundCompaction(): boolean;
    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;
    /**
     * Applies the common per-turn tool preparation used by both eager metadata
     * initialization and real model requests. Keeping deferral here ensures
     * `/context` reports the same MCP/tool-search state the model will see.
     */
    private prepareToolsForModelRequest;
    /**
     * 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;
    private resolveIsDynamicRetrievalEnabled;
    /** Convenience wrapper that delegates to the shared top-level function. */
    private resolveToolSearchEnabled;
    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 > 25
     *   - "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;
    /**
     * Returns the session-scoped in-memory embedding cache DB, creating it on first access.
     * Only used when `embeddingCacheStorage` is `"in-memory"`; returns `undefined` otherwise,
     * letting `InstructionIndex` fall through to its default on-disk DB.
     */
    private getOrCreateEmbeddingCacheDb;
    /** Internal helper that performs the actual embedding index build. */
    private doEmbeddingIndexBuild;
    protected isToolEnabled(tool: ToolMetadata): boolean;
    /**
     * 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
     */
    protected filterToolsForSelectedAgent<T extends ToolMetadata>(allTools: T[]): T[];
    private addReportIntentToolIfSqlIntentIsUnavailable;
    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 An outcome indicating how the agentic loop ended (normal, rate limited, etc.)
     * @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>;
    /**
     * Creates an IAgentCallback bridge that forwards progress events from an agent
     * execution back to the session. Behavior varies by agent type the bridge is created for.
     */
    createAgentCallbackBridge(options: {
        agentId: string;
        agentType: "subagent" | "sidekick";
        taskRegistry: TaskRegistry;
        interactionId?: string;
    } | {
        agentId: string;
        agentType: "sampling";
    }): IAgentCallback;
}

/**
 * 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 sessionStoreFlush?;
    private _startupPrompts;
    private pendingRepoHooks;
    private _lastLoadedHookCount;
    private detachedSessionCache;
    private closingSessions;
    /** Per-session hook loggers, cached so deferred/reloaded hooks reuse the same logger. */
    private sessionHookLoggers;
    /**
     * 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[];
    /**
     * Method form of {@link startupPrompts} used by the schema {@link SessionsApiManager}
     * interface. Returns the same readonly view; the schema getter wraps it in
     * `{prompts}` for the wire shape.
     */
    getStartupPrompts(): readonly string[];
    /**
     * Setter form of {@link additionalPlugins} used by the schema {@link SessionsApiManager}
     * interface. Replaces the manager-wide additional-plugin list with the
     * provided array. Subsequent createSession calls (and reloadPluginHooks
     * invocations) will see the new set; already-running sessions keep their
     * existing hook installation until the next reload.
     */
    setAdditionalPlugins(plugins: InstalledPlugin[]): void;
    /**
     * Returns a snapshot of the in-memory active sessions. Used by server-level
     * APIs (e.g. {@link pluginsApi}'s `onBeforePluginMutation` hook) to iterate
     * sessions for cross-cutting work like stopping plugin-owned MCP servers
     * before plugin files are removed. The returned array is a copy; callers
     * must not assume entries remain alive (sessions can be disposed concurrently).
     */
    getActiveSessions(): LocalSession[];
    /**
     * 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 telemetryService;
    private readonly handoffGitOperations?;
    private readonly sessionLifecycleMode?;
    private readonly authManager?;
    private readonly sessionsApi;
    readonly otel?: OtelLifecycle;
    private readonly shellNotifier;
    private readonly extensionControllers;
    private readonly telemetrySenders;
    /** Exporters owned by runtime-spawned sessions, keyed by session ID. */
    private readonly spawnedExporters;
    /**
     * State machine for the runtime-managed remote-control singleton.
     * Mutated only by `startRemoteControl*` / `transferRemoteControl*` /
     * `stopRemoteControl*` / `setRemoteControlSteering*` / spawn callbacks.
     * The CLI reads it via `getRemoteControlStatus` and the corresponding
     * `sessionsApi` schema methods.
     */
    private remoteControlState;
    /**
     * Bounded FIFO of spawn events for cursor-based long-poll consumers
     * (`pollSpawnedSessions`). Each event gets a monotonic sequence
     * number; consumers pass back the last seen `seq` as their cursor.
     */
    private spawnedEventQueue;
    private spawnedSeqCounter;
    /** Awaiters parked inside `pollSpawnedSessions` waiting for new events. */
    private spawnedWaiters;
    private static readonly SPAWN_POLL_MAX_WAIT_MS;
    private static readonly SPAWN_QUEUE_MAX;
    /** Factory for creating per-session virtual filesystems. */
    sessionFsFactory: (sessionId: string, settings?: RuntimeSettings) => SessionFs;
    constructor(coreServices: CoreServices, { version, flushDebounceMs, settings, shellNotifier, sessionLifecycleMode, handoffGitOperations, authManager, }?: LocalSessionManagerOptions);
    getActiveSession(sessionId: string): LocalSession | undefined;
    registerExtensionToolsOnSession(params: {
        sessionId: string;
        loader?: unknown;
        options?: {
            enabled?: unknown;
        };
    }): {
        unsubscribe: () => void;
    };
    configureSessionExtensions(params: {
        sessionId: string;
        controller?: unknown;
    }): void;
    private getOrCreateExtensionController;
    private getOrCreateTelemetrySender;
    /**
     * Replace the session filesystem factory for all future sessions.
     * Must only be called when no sessions are active.
     */
    setSessionFsFactory(factory: (sessionId: string, settings?: RuntimeSettings) => SessionFs): void;
    /** Create the OTel trace context resolver for a session so MCP calls propagate traceparent/tracestate. */
    private createMcpTraceContextResolver;
    /**
     * Wire the OTel parent-trace-context resolver onto a session so the
     * schema-driven `session.send` handler can update (or clear) the W3C
     * trace context for each agent turn. The resolver invokes
     * `otel.updateParentTraceContext` unconditionally so leftover trace
     * context from a previous send is
     * cleared rather than inherited.
     *
     * Passed to both {@link createSession} and {@link getSession} (the
     * resume path) — symmetrical to {@link createMcpTraceContextResolver}.
     */
    private createOtelParentContextResolver;
    private createTraceContextOptions;
    /**
     * Stop the foreground remote-control exporter (if any) when the
     * attached session is going away. Always clears any state pinned to
     * the session — `connecting` and `error` variants don't own an
     * exporter to stop, but their `attachedSessionId` would dangle. Safe
     * to call when nothing is attached.
     */
    private detachForegroundRemoteControlForSession;
    dispose(): Promise<void>;
    /**
     * Get effective settings, preferring options.configDir over this.settings
     */
    private getEffectiveSettings;
    private hasLegacyFlatSessionFile;
    /**
     * Create a new file-backed session
     */
    createSession(options?: SessionOptions, emitStart?: boolean): Promise<LocalSession>;
    private getHooksDir;
    /**
     * Wires the dynamic context board onto the session when COPILOT_SUBCONSCIOUS
     * is enabled. Resolves the board identity (falling back to a workspace-scoped
     * id when git is unavailable), attaches the store, and bumps the per-board
     * session counter. Errors are swallowed to debug logs so a missing/corrupt
     * board never blocks session creation or resume.
     */
    private initDynamicContextBoard;
    /**
     * 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. Skipped when enableSessionStore is explicitly false. */
    private wireSessionStoreTracking;
    /**
     * Flush any buffered session-store tracking data (e.g. partially-batched
     * turns) out to the persistent SQLite store without detaching tracking.
     * Called during shutdown and by {@link saveSessionById} so the persisted
     * store reflects the complete trajectory before observers (e.g., a
     * detached headless rem-agent child) read it.
     */
    private flushSessionStoreTracking;
    /**
     * Look up the dynamic-context board entry count for the given active
     * local session's repo+branch. Returns undefined when the sessionId is
     * not active locally, when no dynamic-context config is wired up, or
     * when the SQLite lookup throws — callers should treat undefined as
     * "metric unavailable" and never let it block their primary work
     * (e.g. spawning the rem-agent).
     *
     * The underlying query is a single indexed SELECT (~25 µs per
     * `hasDynamicContextBoardEntries` in `sidekickLaunchChecks.ts`).
     */
    getBoardEntryCount(sessionId: string): number | undefined;
    startRemoteControl(params: {
        sessionId: string;
        config: RemoteControlConfig;
    }): Promise<RemoteControlStatus>;
    private setupForegroundExporter;
    transferRemoteControl(params: {
        toSessionId: string;
        expectedFromSessionId?: string;
    }): Promise<{
        status: RemoteControlStatus;
        transferred: boolean;
    }>;
    setRemoteControlSteering(params: {
        enabled: boolean;
    }): Promise<RemoteControlStatus>;
    stopRemoteControl(params?: {
        expectedSessionId?: string;
        force?: boolean;
    }): Promise<{
        status: RemoteControlStatus;
        stopped: boolean;
    }>;
    getRemoteControlStatus(): RemoteControlStatus;
    pollSpawnedSessions(params?: {
        cursor?: string;
        waitMs?: number;
    }): Promise<{
        events: Array<{
            sessionId: string;
        }>;
        cursor: string;
    }>;
    private remoteControlAttachedSessionId;
    private computeRemoteControlStatus;
    private notifySpawnedSession;
    private stopSpawnedExporterIfAny;
    /**
     * Internal session spawner invoked when Mission Control sends a
     * `start_session` command. Creates, authenticates, and exports a new
     * session without CLI involvement, then enqueues a spawn event that
     * CLI surfaces consume via {@link pollSpawnedSessions}.
     */
    private spawnRemoteSession;
    /**
     * Creates a {@link RemoteExportSession} adapter from a {@link LocalSession}.
     * Used internally for wiring remote export on runtime-spawned sessions.
     */
    private createRemoteExportSessionAdapter;
    /**
     * Loads deferred repo-level hooks after folder trust has been confirmed.
     * Must be called once after trust is granted. Idempotent — subsequent calls return
     * `{startupPrompts: [], hookCount: 0}`. Returns the same shape (with empty
     * `startupPrompts`) when no pending repo hooks exist for the session or when no
     * active session matches the given sessionId.
     *
     * @param sessionId - The active session ID to apply hooks to
     * @returns Repo-level startup prompts plus the total hook count loaded for the
     *   session by this call (captured atomically so callers don't race with
     *   concurrent invocations on other sessions).
     */
    loadDeferredRepoHooks(sessionId: string): Promise<{
        startupPrompts: string[];
        hookCount: number;
    }>;
    /**
     * Reload all hooks (user and plugin) and apply them to the active session.
     * Call after installing plugins so their hooks take effect immediately. No-op
     * when no active session matches the given sessionId.
     * @param sessionId - The active session ID to apply hooks to
     * @param deferRepoHooks - When true, skip repo hooks (use before folder trust is confirmed)
     */
    reloadPluginHooks(sessionId: string, deferRepoHooks?: boolean): Promise<void>;
    /**
     * Get existing session by ID
     * ALWAYS loads from disk to ensure freshness
     *
     * @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, behavior?: ResumeBehavior): Promise<LocalSession | undefined>;
    /**
     * Get the most recently updated session
     */
    getLastSession(options?: Omit<SessionOptions, "sessionId">, behavior?: ResumeBehavior): Promise<LocalSession | undefined>;
    /**
     * Get the ID of the most recently updated session
     */
    getLastSessionId(): Promise<string | undefined>;
    /**
     * Cheaply enumerate the most-recent non-empty (resumable) local session
     * IDs for the launch-time picker-vs-auto-resume decision.
     *
     * Walks sessions newest-first and prunes housekeeping-only ("empty")
     * sessions exactly like {@link listSessions}, but stops as soon as it has
     * collected `limit` of them (default 2 — all the caller needs to tell
     * "none" / "one" / "many" apart). In the common returning-user case the
     * two most-recent sessions carry a user message, so this reads ~2 JSONL
     * headers and **no** workspace.yaml files — cheaper than a
     * metadata-bearing `listSessions({ metadataLimit: 1 })` while keeping the
     * empty-session filtering that the decision depends on.
     *
     * Detached maintenance sessions are excluded, matching the
     * `includeDetached: false` listing the picker uses.
     */
    listNonEmptySessionIds(limit?: number): Promise<string[]>;
    /**
     * Get the ID of the most recently updated session, preferring sessions
     * that match the given working directory context (same repo+branch,
     * same repo, same git root, or same cwd — in descending priority).
     * Falls back to the most recent session if no context-matching sessions exist.
     */
    getLastSessionIdForContext(currentContext?: WorkingDirectoryContext): Promise<string | undefined>;
    /**
     * Updates the telemetry sender for a session based on the disable flag.
     * When disabled, clears the sender. When enabled, creates a new SessionTelemetry.
     * This consolidates telemetry setup so that create, disk-load resume, and
     * in-memory resume all go through the same code path.
     */
    updateSessionTelemetry(session: LocalSession, disable: boolean, options?: {
        remoteDefaultedOn?: boolean;
        remoteExporting?: boolean;
        configDir?: string;
        config?: UserSettings;
        detachedFromSpawningParentEngagementId?: string;
    }): Promise<void>;
    /**
     * Resolve a session's persisted remote steering state.
     */
    getPersistedRemoteSteerable(sessionId: string, settings?: RuntimeSettings): Promise<boolean | 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>;
    /**
     * Find a unique UUID session ID by abbreviated prefix.
     * Returns the full session ID if exactly one UUID session matches the prefix,
     * or undefined if no sessions match or the match is ambiguous.
     *
     * The prefix must be shorter than a full UUID (fewer than 36 characters),
     * start with at least 7 hexadecimal characters, and contain only
     * hexadecimal characters or hyphens thereafter. This allows partial UUID
     * copies like "a1b2c3d4-e5f6". Only canonical UUID session IDs participate
     * in prefix matching; non-UUID session IDs (which SDK clients can create
     * via the session API) are ignored. Note that user-facing names set via
     * /rename are display-only and do not affect session IDs or this lookup.
     *
     * 7 hex chars matches git's default prefix length. The first 8 hex chars
     * of a UUID v4 are pure random entropy, so 7 chars provides the same
     * collision resistance as git's 7-char commit prefixes.
     */
    findSessionByPrefix(prefix: string, settings?: RuntimeSettings): Promise<string | undefined>;
    saveSession(session: Session): Promise<void>;
    /** Flush a session's pending events to disk by session ID. */
    saveSessionById(sessionId: string, options?: {
        force?: boolean;
    }): Promise<void>;
    /** Wire flush callback so shared APIs (e.g., history.truncate) can flush buffered events. */
    private wireFlushCallback;
    /**
     * Wire the plugin-hook reloader so `session.plugins.reload` can refresh user/plugin/repo
     * hooks for an active session without round-tripping through the manager-level
     * `sessions.reloadPluginHooks` RPC.
     */
    private wirePluginHookReloader;
    /**
     * Stop every plugin-owned MCP child process across all active local sessions.
     *
     * This is the shared cross-session cleanup primitive consumed by both the
     * server-level `server.plugins.*` API (wired via `CLIServer`) and the CLI's
     * interactive `/plugin …` slash commands (wired via `getCliPluginsApi`).
     * Both surfaces need the same behavior so that destructive plugin mutations
     * (uninstall, update, force-marketplace-remove) don't leave child processes
     * pointing at files we're about to delete or replace — important on Windows
     * where the OS holds executable handles open, and important everywhere to
     * avoid orphaned child processes.
     *
     * Errors are logged and swallowed so a single stuck server can never block
     * the mutation.
     */
    stopPluginMcpServersAcrossSessions(pluginName: string): Promise<void>;
    /**
     * 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 options - Optional fork settings, including an event boundary and friendly name
     * @returns The new session ID
     */
    forkSession(sourceSessionId: string, options?: ForkSessionOptions | string): Promise<ForkSessionResult>;
    private addSourceForkInfoEvent;
    private createForkInfoEvent;
    private getSourceForkInfoMessage;
    private getForkedSessionInfoMessage;
    private loadForkSourceWorkspace;
    private resolveForkSessionName;
    private getExistingSessionNameKeys;
    private getForkSourceNameBase;
    private getForkSourceEvents;
    private rewriteForkedSessionPaths;
    private getForkedCheckpointCount;
    private copyForkedSessionState;
    private copyForkedWorkspaceMetadata;
    private copySessionFsEntryIfExists;
    private copySessionFsEntry;
    private getSessionFsParentPath;
    private loadSession;
    /**
     * Resolve the on-disk JSONL event file path for a session. Useful for
     * tools that want to stream events without loading the full session.
     */
    getSessionEventFilePath(sessionId: string): string;
    /**
     * 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 workspace metadata loaded (context).
     * The remaining sessions are returned with basic info only (sessionId, times).
     * This avoids reading thousands of workspace.yaml files when only a screenful
     * of sessions will be displayed initially.
     */
    listSessions(options?: {
        metadataLimit?: number;
        includeDetached?: boolean;
    }): 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.
     *
     * Sessions confirmed to have no user prompt and no explicit name are
     * omitted from the result (returned as undefined, then filtered out).
     * Callers that batch enrichment should compare returned IDs against
     * the input batch to detect and remove pruned sessions from their lists.
     */
    enrichSessionMetadata(sessions: LocalSessionMetadata[]): Promise<LocalSessionMetadata[]>;
    private isDetachedSession;
    private getVisibleSessionEntriesWithBoundedDetachedDetection;
    private isDetachedSessionMarkerOnly;
    private hasDetachedSessionMarker;
    private writeDetachedSessionMarker;
    private readDetachedStatusFromSessionStart;
    /**
     * 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>>;
    /**
     * Release the in-use lock for a session without performing a full
     * {@link closeSession} teardown. Use this when the CLI decides not to
     * continue with a session (e.g., user chose "Go back" from the
     * session-in-use confirmation) so the lock file doesn't linger.
     */
    releaseSessionLock(sessionId: string): Promise<void>;
    /**
     * 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>;
    private waitForSessionClose;
    private closeSessionCore;
    /**
     * 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 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, taskType?: "cca" | "cli"): AsyncGenerator<HandoffProgress, LocalSession, undefined>;
    /**
     * Helper method to fetch from git remote
     */
    private gitFetch;
}

declare type LocalSessionManagerOptions = {
    version?: string;
    flushDebounceMs?: number;
    settings?: RuntimeSettings;
    /**
     * Shell notification sender. If a {@link DelegatingShellNotificationSender}
     * is provided, it is used directly (the caller retains ownership and can
     * reconfigure its delegate at any time). Otherwise a new delegating wrapper
     * is created internally.
     */
    shellNotifier?: DelegatingShellNotificationSender;
    sessionLifecycleMode?: SessionOptions["sessionLifecycleMode"];
    /** Git operations for remote→local session handoff */
    handoffGitOperations?: HandoffGitOperations;
    /**
     * Auth manager used by the runtime-managed remote-control singleton to
     * resolve Mission Control credentials. Required for `startRemoteControl`
     * / `transferRemoteControl`; without it those methods throw. Optional
     * for managers that never participate in remote control (e.g. unit
     * tests, prompt-mode runs).
     */
    authManager?: AuthManager;
};

export declare interface LocalSessionMetadata extends SessionMetadata {
    readonly isRemote: false;
    /** GitHub task ID persisted for sessions exported to remote control. */
    readonly mcTaskId?: string;
    /** True for detached maintenance sessions, such as background REM-agent consolidation runs. */
    readonly isDetached?: boolean;
}

declare const localShellToolName = "local_shell";

/**
 * 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;
}

declare type LocalSkillSource = (typeof LOCAL_SKILL_SOURCES)[number];

/** A serializable location */
declare type Location_2 = {
    /** file path relative to the repo root */
    file: string;
    startLine: LineNumber;
    startColumn: ColumnNumber;
    endLine: LineNumber;
    endColumn: ColumnNumber;
};

/** 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";
}>]>;

/**
 * Marks MCP and external tools as deferred when the total tool count exceeds
 * {@link DEFERRED_TOOLS_THRESHOLD}. Deferred tools are sent to the model with
 * `copilot_defer_loading: true` and are discovered via the tool_search tool.
 *
 *
 * @param tools - The full mutable array of tools (modified in place)
 * @param externalToolNames - Names of externally-provided tools
 */
declare function markToolsAsDeferred(tools: Tool_2[], externalToolNames: ReadonlySet<string>): void;

/** Maximum number of files the code review tool will process */
declare const MAX_CODE_REVIEW_FILE_COUNT = 100;

/** Maximum size of the aggregated `additionalContext` from postToolUse hooks before truncation. */
export declare const MAX_POST_TOOL_USE_CONTEXT_LENGTH: number;

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;
}

export declare type McpAppToolCallCompleteEvent = z.infer<typeof McpAppToolCallCompleteEventSchema>;

/**
 * Emitted when an MCP App view (SEP-1865 iframe) calls back into a connected
 * MCP server via {@link Session.callMcpAppTool} / `session.mcp.apps.callTool`.
 *
 * This is an **observability** event: it is *not* tied to a model `toolCallId`,
 * does not surface in the model's tool call history, and does not run any
 * pre/post tool hooks. It exists so hosts can decide — per app, per tool —
 * whether to forward the result to the model (e.g. by sending a synthetic
 * user message). Spec-default visibility (`["model","app"]`) means a tool may
 * be invoked by both the model *and* an app view; consumers that forward to
 * the model should gate on `toolMeta.ui.visibility` and avoid forwarding
 * results from purely-decorative app interactions to prevent loops.
 *
 * Ephemeral (not persisted): `result` payloads can carry user-entered form
 * data and base64 image/audio/resource blobs that should not be written to
 * the on-disk event log without host-side review.
 */
declare const McpAppToolCallCompleteEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"mcp_app.tool_call_complete">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        serverName: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        success: z.ZodBoolean;
        durationMs: z.ZodNumber;
        result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            message: string;
        }, {
            message: string;
        }>>;
        toolMeta: z.ZodOptional<z.ZodObject<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectOutputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    }, {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectInputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "mcp_app.tool_call_complete";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectOutputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "mcp_app.tool_call_complete";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectInputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    };
    agentId?: string | undefined;
}>;

/**
 * Client registration info from dynamic registration (RFC 7591) or static configuration
 */
declare interface MCPClientRegistration {
    serverUrl: string;
    authorizationServerUrl: string;
    clientId: string;
    clientSecret?: string;
    /** The redirect URI used during client registration. Required for re-authentication. */
    redirectUri?: string;
    /** The resource URL (RFC 8707) for this server, used in token requests. */
    resourceUrl?: string;
    issuedAt?: number;
    expiresAt?: number;
    /**
     * When true, indicates this is a statically configured client (not dynamically registered).
     * Static clients should not attempt re-registration if authentication fails.
     */
    isStatic?: boolean;
    /**
     * When true, the callback server uses HTTPS with a self-signed certificate.
     * This is set when the OAuth provider requires HTTPS redirect URIs and the
     * initial HTTP registration attempt failed.
     */
    httpsRedirect?: boolean;
}

/**
 * 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;
    /**
     * When the server was blocked by an enterprise allowlist, the login of the
     * enterprise that owns the policy (e.g. `mcp-itsa`). Surfaces in the
     * user-facing warning so admins can be identified.
     */
    enterpriseName?: 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 mcpToolCallInterceptor?;
    private mcpTaskEventCallback?;
    private taskRegistry?;
    private mcp3pEnabled;
    private configFilter;
    private elicitationHandler?;
    protected statusCallback?: ServerStatusCallback;
    protected logger: RunnerLogger;
    protected onOAuthRequired?: McpHostOptions["onOAuthRequired"];
    protected settings?: RuntimeSettings;
    /**
     * Per-host MCP Apps opt-in flag, mirrored from the constructor option.
     * Used to thread the per-session capability into the {@link MCPTransport}
     * when one is lazily constructed on first tool listing/invocation, so the
     * transport preserves `_meta.ui` and fetches `ui://` resources without
     * relying solely on the global feature flag.
     */
    protected mcpAppsEnabled: boolean;
    private serverStateChangedCallback?;
    private serverStatusChangedCallback?;
    private filteredServerNames;
    /** In-flight `handleToolsChanged` promises; awaited by `awaitPendingToolsChanges` (#7432). */
    private pendingToolsChanges;
    /**
     * Single-flight chain for `applySandboxConfig` so concurrent sandbox toggles
     * serialize on a single restart pipeline instead of interleaving stops/starts.
     */
    private sandboxApplyChain;
    /** Per-server custom agent info that is needed for accessing custom agent information
     *  throughout the lifetime of the MCP host w/o having to pass it around explicitly.
     *  It allows for either a shared host (CLI, legacy) or a host per-custom agent (new) flow.
     */
    protected serverCustomAgents: Map<string, CustomAgentInfo>;
    constructor(options: McpHostOptions);
    /**
     * Sets a callback that is invoked whenever an OIDC token is added to the
     * internal token cache (e.g., during prefetch or on-demand resolution).
     * This allows external consumers (like MCPServer) to react to new tokens
     * for cross-process secret filtering.
     */
    setOnTokenAdded(callback: (value: string) => void): void;
    /**
     * 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;
    /**
     * Wait for any in-flight `tools/list_changed` notifications to finish processing,
     * so the agent loop sees newly advertised tools within the same turn (#7432).
     */
    awaitPendingToolsChanges(): Promise<void>;
    /** Register a callback invoked when an individual server's connection status changes. */
    setOnServerStatusChanged(callback: (serverName: string, status: ServerConnectionStatus) => void): void;
    /**
     * Forward a session event to MCP servers that opted in via `events` config.
     * Currently scoped to built-in servers only.
     */
    sendNotification(eventType: string): 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
     * @param forceReauth - Optional flag to force re-authentication
     * @param customAgent - Optional custom agent information for OIDC token cache key derivation
     * @returns Promise that resolves when server is started
     */
    startServer(serverName: string, config: MCPServerConfig, forceReauth?: boolean, customAgent?: CustomAgentInfo): 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
     * @param forceReauth - Optional flag to force re-authentication
     * @param customAgent - Optional custom agent information
     * @returns Promise that resolves when server is restarted
     */
    restartServer(serverName: string, config: MCPServerConfig, forceReauth?: boolean, customAgent?: CustomAgentInfo): Promise<void>;
    /**
     * Reconnect a remote (HTTP/SSE) MCP server using a caller-supplied OAuth
     * provider — typically just after a proactive OAuth login so the fresh
     * tokens are used immediately, without re-entering the auth path.
     *
     * Contrast with `restartServer`, which goes through the processor and
     * requires `onOAuthRequired` to be wired on the host to obtain a
     * provider. This method takes the provider as a parameter, skipping
     * that indirection.
     */
    reconnectRemoteServerWithProvider(serverName: string, config: MCPRemoteServerConfig, authProvider: OAuthClientProvider): Promise<void>;
    /**
     * Restart a server reusing existing cached OIDC tokens.
     * Used for disconnect recovery when the transport is closed but auth is still valid.
     */
    reconnectServer(serverName: string): 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>;
    /**
     * Atomically update the sandbox policy and restart every currently-running
     * local (stdio) MCP server so they pick up the new policy.
     *
     * The sandbox is baked into the spawn at process creation time, so a policy
     * change is only observable after the server is restarted. Remote (HTTP/SSE)
     * servers are intentionally skipped — the sandbox would only apply to the
     * proxy/transport process, not the remote endpoint.
     *
     * Concurrent calls are serialized through {@link sandboxApplyChain} so a
     * burst of sandbox toggles doesn't interleave stops and starts on the same
     * server.
     */
    applySandboxConfig(config?: SandboxConfig): 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;
    /**
     * Set the interceptor invoked before MCP tool calls are sent.
     */
    setMcpToolCallInterceptor(interceptor: McpToolCallInterceptor | undefined): void;
    /**
     * Set the callback for live SEP-2694 MCP task events.
     */
    setMcpTaskEventCallback(callback: McpTaskEventCallback | undefined): void;
    /**
     * Set the task registry for non-blocking MCP task execution.
     * When set, tools with `taskSupport: "required"` register as background tasks.
     */
    setTaskRegistry(registry: TaskRegistry | 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;
    /**
     * Register a callback to be invoked when a built-in server sends a user.abort notification.
     */
    setAbortCallback(callback: () => void): void;
    /**
     * Set the current abort signal so in-flight MCP tool calls can be cancelled.
     * Also stores the controller so user.abort notifications can trigger abort directly.
     */
    setAbortSignal(signal?: AbortSignal, controller?: AbortController): void;
    private abortCallback?;
    private _abortController?;
    /**
     * Register a `user.abort` notification handler on a built-in server's client
     * (when the server has opted in via `notifications: ["user.abort"]`). Safe
     * to call multiple times for the same server; the underlying SDK replaces
     * any prior handler for the same method. Invokes the abort callback first
     * so the session can drain queued work before abort signal listeners run.
     */
    private registerUserAbortHandler;
    /**
     * 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, hostOptions?: Omit<McpHostOptions, "logger" | "mcpConfig">): 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>;
    /**
     * Propagate a sandbox policy change to every cached subagent MCP host so
     * already-running stdio servers pick up the new policy.
     *
     * Each host's `applySandboxConfig` is single-flight, so this is safe to
     * call concurrently with itself or with a sandbox toggle that races
     * subagent host creation.
     */
    applySandboxConfig(config?: SandboxConfig): 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;
        grantType?: "client_credentials";
    }, forceReauth?: boolean, redirectPort?: number) => 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;
    telemetryCallback?: MCPTelemetryCallback;
    /**
     * Optional secret store for resolving ${secret:...} placeholders.
     * Only used in the CLI; the Actions runtime does not use this.
     */
    secretStore?: McpSecretStoreInterface;
    /**
     * When true, advertise the MCP Apps (SEP-1865) UI extension during MCP
     * `initialize` and forward `_meta.ui` on tool listings. Combined with the
     * MCP_APPS feature flag in the registry. Defaults to false.
     */
    mcpAppsEnabled?: boolean;
    /**
     * When set and `enabled`, local (stdio) MCP servers spawn inside the
     * active MXC sandbox policy. Remote (HTTP/SSE) servers are unaffected —
     * the sandbox would only apply to the proxy/transport process, not the
     * remote endpoint.
     */
    sandboxConfig?: SandboxConfig;
}

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>;
    agentId: z.ZodOptional<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, {
    type: "mcp.oauth_completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "mcp.oauth_completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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>;
            grantType: z.ZodOptional<z.ZodLiteral<"client_credentials">>;
        }, "strip", z.ZodTypeAny, {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        }, {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    }, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "mcp.oauth_required";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "mcp.oauth_required";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}>;

/**
 * Interface for MCP OAuth storage operations.
 *
 * The `key` parameter is a store key computed by {@link oauthStoreKey}.
 * For dynamic (DCR) clients it equals the raw server URL; for static clients
 * it includes a client-ID suffix so sibling servers on the same URL get
 * independent cache entries.
 */
declare interface MCPOAuthStoreInterface {
    getTokens(key: string): Promise<MCPOAuthTokens | undefined>;
    saveTokens(key: string, tokens: MCPOAuthTokens): Promise<boolean>;
    deleteTokens(key: string): Promise<void>;
    getClientRegistration(key: string): Promise<MCPClientRegistration | undefined>;
    saveClientRegistration(key: string, registration: MCPClientRegistration): Promise<void>;
    deleteClientRegistration(key: string): Promise<void>;
    getStaticClientSecret(key: string): Promise<string | undefined>;
    saveStaticClientSecret(key: string, secret: string): Promise<boolean>;
    deleteStaticClientSecret(key: string): Promise<void>;
    saveCodeVerifier(key: string, verifier: string): Promise<void>;
    getCodeVerifier(key: string): Promise<string | undefined>;
    clearCodeVerifier(key: string): Promise<void>;
}

/**
 * OAuth tokens stored for an MCP server
 */
declare interface MCPOAuthTokens {
    accessToken: string;
    refreshToken?: string;
    expiresAt?: number;
    scope?: 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;
};

/**
 * Telemetry event emitted when secret masking was skipped for a proxy tool call.
 */
declare type McpProxySecretMaskingSkippedEvent = TelemetryEvent_2<"mcp_proxy_secret_masking_skipped", {
    properties: {
        /**
         * SHA-256 hash of the MCP server name.
         */
        serverName: string;
        /**
         * SHA-256 hash of the tool name that was called.
         */
        toolName: string;
        /**
         * Whether secret masking was skipped.
         */
        skipped: "true" | "false";
        /**
         * Whether secret masking is disabled for the server (if false, then masking should have occurred but was skipped, likely due to an error).
         */
        disabledForServer: "true" | "false";
    };
    restrictedProperties: {
        /**
         * The raw (unhashed) name of the MCP server.
         */
        serverName: string;
        /**
         * The raw (unhashed) name of the tool that was called.
         */
        toolName: string;
    };
    metrics: Record<string, never>;
}>;

declare class MCPRegistry {
    private logger;
    private clientFactory;
    private transportFactory;
    envValueMode: EnvValueMode;
    protected settings?: RuntimeSettings | undefined;
    /** Enable MCP Apps (SEP-1865) support. Combined with the FF in {@link isMcpAppsEnabled}. */
    private mcpAppsEnabled;
    protected sandboxConfig?: SandboxConfig | 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>;
    /**
     * Stderr streams for local MCP server processes, keyed by server name.
     * Used to retrieve stderr output when a server fails to start.
     */
    private serverStderrStreams;
    /**
     * 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?;
    /**
     * Metadata needed to reconnect remote (HTTP/SSE) servers after transient disconnections.
     * Stored when a remote server is first connected; cleared on intentional stop.
     */
    private remoteReconnectMeta;
    /**
     * Servers that were intentionally disconnected (e.g., via stopServer).
     * Prevents auto-reconnection from firing after deliberate shutdown.
     */
    private intentionalDisconnects;
    /**
     * In-flight reconnection promises, keyed by server name.
     * Prevents duplicate concurrent reconnection attempts.
     */
    private pendingReconnects;
    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>, 
    /** Enable MCP Apps (SEP-1865) support. Combined with the FF in {@link isMcpAppsEnabled}. */
    mcpAppsEnabled?: boolean, sandboxConfig?: SandboxConfig | 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;
    /** Store the current abort signal for in-flight MCP tool call cancellation. */
    private _abortSignal?;
    setAbortSignal(signal?: AbortSignal): void;
    getAbortSignal(): AbortSignal | undefined;
    /** Register a callback invoked when an individual server's connection status changes. */
    setOnStatusChanged(callback: (serverName: string, status: ServerConnectionStatus) => void): void;
    /**
     * Update the sandbox policy used when spawning new local (stdio) MCP servers.
     * Already-running servers retain their original policy until they are restarted —
     * callers that need them to pick up the new policy (e.g. the user toggling
     * `/sandbox`) must restart them explicitly via {@link McpHost.applySandboxConfig}.
     */
    setSandboxConfig(config?: SandboxConfig): void;
    /**
     * Get the client capabilities, including elicitation if a handler is registered.
     * MCP Apps (SEP-1865) is advertised via `extensions.io.modelcontextprotocol/ui`
     * when the per-session `mcp-apps` capability is set.
     *
     * The `MCP_APPS` feature flag (and `COPILOT_MCP_APPS=true` env override) acts
     * as a fallback enable for environments that grant the capability by default
     * — e.g. an org-wide rollout where the FF flips on and any session without an
     * explicit `mcp-apps` opt-in still benefits. Either signal is sufficient.
     */
    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;
    /**
     * Returns the first stderr line captured from a local server process, if any.
     * @param serverName - Name of the server
     */
    getServerStderr(serverName: string): string | undefined;
    /**
     * 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;
    /**
     * Mark a server as intentionally disconnected to prevent auto-reconnection.
     * Call this before closing a remote server's transport.
     *
     * Per MCP spec §"Session Management": "Clients that no longer need a particular
     * session SHOULD send an HTTP DELETE to explicitly terminate the session."
     * Callers are responsible for sending the DELETE (via transport.terminateSession())
     * before or after calling this method.
     *
     * @param serverName - Name of the server being intentionally stopped
     */
    markIntentionalDisconnect(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>;
    /**
     * Attempt to reconnect a remote (HTTP/SSE) server after a transient disconnection.
     * Uses exponential backoff with a maximum number of retries.
     * On success, the server is fully re-registered in the registry.
     * On failure, the server is marked as failed.
     *
     * This implements the client-side reconnection behavior described in the MCP spec:
     * - Disconnections are transient and SHOULD NOT cancel requests
     *   (§"Sending Messages to the Server", item 6)
     * - Clients SHOULD resume via HTTP GET with Last-Event-ID after broken connections
     *   (§"Resumability and Redelivery")
     * - Clients MUST start a new session (InitializeRequest) when receiving HTTP 404
     *   for an expired session (§"Session Management")
     *
     * Our reconnection calls client.connect() which sends a fresh InitializeRequest,
     * establishing a new session as the spec requires.
     *
     * @see https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http
     */
    private attemptReconnect;
    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;
    /**
     * Optional. OAuth grant type to use for this server.
     * - "authorization_code" (default): interactive browser-based flow with PKCE.
     * - "client_credentials": fully headless flow that POSTs directly to the token endpoint
     *   using the configured `oauthClientId` + a keychain-stored client secret. Requires
     *   `oauthClientId` to be set and `oauthPublicClient` to be `false`. No browser is opened
     *   and no localhost callback server is started — suitable for CI/cron usage.
     */
    oauthGrantType?: "authorization_code" | "client_credentials";
    /**
     * Optional. Additional authentication configuration for this server.
     */
    auth?: MCPServerAuthConfig;
}

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.
 *
 * The concrete implementation lives at `src/mcp-client/mcp-secret-store.ts`;
 * this interface is defined separately so that types stay import-cheap and
 * keep the `mcp-client`/`core` layers free of transitive CLI dependencies.
 */
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>;
}

/**
 * Authentication configuration for a remote MCP server.
 * When `true`, default auth settings are used.
 */
declare type MCPServerAuthConfig = boolean | MCPServerAuthSettings;

/**
 * Additional authentication settings for a remote MCP server.
 */
declare interface MCPServerAuthSettings {
    /**
     * Fixed port for the OAuth redirect callback server.
     * When set, the localhost callback server binds to this port instead of
     * an ephemeral random port. Useful when the OAuth provider requires the
     * redirect URI to be pre-registered with a known port.
     */
    redirectPort?: number;
}

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 or .github/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;
    /**
     * Optional. List of event types this server wants to receive as
     * `notifications/copilot` MCP notifications (host -> server direction).
     * Currently only respected for built-in servers (`source: "builtin"`).
     */
    events?: string[];
    /**
     * Optional. List of `notifications/copilot` notification types this server
     * is allowed to send to the host (server -> host direction).
     * Acts as an explicit capability opt-in. Currently only respected for
     * built-in servers (`source: "builtin"`).
     *
     * Supported values:
     * - "user.abort": server can request the agent loop to stop.
     */
    notifications?: string[];
    /**
     * Optional. Config-level warnings detected at load time (e.g. legacy
     * `oauth` key). Set at load time; not persisted.
     */
    configWarnings?: string[];
    /**
     * Optional. List of tool names to exclude from this server, applied after the `tools`
     * include filter. A tool in this list is hidden even when `tools` is `["*"]`.
     *
     * Use this to suppress MCP tools that overlap with built-in runtime tools so the model
     * never sees both variants of the same operation. For example, when the built-in
     * `create_pull_request` is active, add `"create_pull_request"` here to prevent the
     * github-mcp-server copy from appearing in the tool list.
     */
    excludeTools?: string[];
}

/**
 * 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>;

/**
 * Abstraction for adding MCP servers and getting their tools.
 * This allows different implementations (OutOfProcMCPTransport, McpHost) to be used
 * interchangeably when setting up custom agents.
 */
declare interface McpServerProvider {
    /**
     * Add an MCP server and return the tools it provides.
     * @param serverName - Unique name for the server
     * @param serverConfig - Configuration for the server
     * @param logger - Logger for diagnostic messages
     * @param customAgent - Optional custom agent that owns this server
     * @returns an `McpToolsAndShutdown`
     */
    addServerAndGetTools(serverName: string, serverConfig: MCPServerConfig, logger: RunnerLogger, customAgent?: CustomAgentInfo): Promise<McpToolsAndShutdown>;
}

declare interface MCPServersConfig {
    mcpServers: Record<string, MCPServerConfig>;
}

/**
 * Telemetry event emitted when an MCP server setup completes.
 */
declare type McpServerSetupTelemetryEvent = TelemetryEvent_2<"mcp_server_setup", {
    properties: {
        /**
         * SHA-256 hash of the MCP server name.
         */
        serverName: string;
        /**
         * The type of server: "local", "stdio", "http", "sse", or "memory".
         */
        serverType: string;
        /**
         * Whether this is a default server provided by the runtime.
         */
        isDefaultServer: string;
        /**
         * Whether the connection was successful.
         */
        success: string;
        /**
         * Optional correlation identifier (typically the SDK session ID)
         * shared across all status emissions for the same logical agent
         * session. Lets callers join multiple `mcp_server_setup` events
         * — and the matching log lines — for one session.
         */
        sessionId?: string;
    };
    restrictedProperties: {
        /**
         * The raw (unhashed) name of the MCP server.
         */
        serverName: string;
    };
    metrics: {
        /**
         * How long the connection took in milliseconds.
         */
        setupDurationMs: number;
    };
}>;

declare type McpTaskEvent = z_2.infer<typeof McpTaskEventSchema>;

declare type McpTaskEventCallback = (event: McpTaskEventCallbackEvent) => void;

declare type McpTaskEventCallbackEvent = {
    mcpServerName: string;
    agentId: string;
    taskEvent: McpTaskEvent;
};

declare const McpTaskEventSchema: z_2.ZodObject<{
    seq: z_2.ZodNumber;
    taskId: z_2.ZodString;
    type: z_2.ZodString;
    payload: z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>;
    _meta: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
}, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
    seq: z_2.ZodNumber;
    taskId: z_2.ZodString;
    type: z_2.ZodString;
    payload: z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>;
    _meta: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
}, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
    seq: z_2.ZodNumber;
    taskId: z_2.ZodString;
    type: z_2.ZodString;
    payload: z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>;
    _meta: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
}, z_2.ZodTypeAny, "passthrough">>;

declare interface McpTaskEventStreamInfo {
    /** Current SEP-2694 stream state for this task. */
    state: McpTaskEventStreamState;
    /** Latest fully processed SEP-2694 event sequence number. */
    latestSeq?: number;
    /** Number of SEP-2694 task events processed for this task. */
    eventCount: number;
    /** Number of non-fatal event stream warnings observed for this task. */
    warningCount: number;
    /** Most recent stream error, when any. */
    lastError?: string;
    /** Most recent non-fatal warning, when any. */
    lastWarning?: string;
    /** Whether a sequence gap has been observed. */
    hasSequenceGap?: boolean;
    /** Whether a non-vendor-prefixed event type has been observed. */
    hasNonVendorEventTypes?: boolean;
}

declare type McpTaskEventStreamState = "idle" | "active" | "closed" | "errored" | "events_gone" | "unsupported";

/**
 * MCP-task-specific data captured from `Task` schema messages and progress
 * notifications when an agent represents an in-flight MCP task.
 */
declare interface McpTaskInfo {
    /** MCP task ID returned by the server. */
    taskId: string;
    /** Latest task status. */
    status: "working" | "input_required" | "completed" | "failed" | "cancelled" | "paused";
    /** Optional human-readable status message. */
    statusMessage?: string;
    /** Server-requested time-to-live (ms) for this task from creation. */
    ttlMs?: number;
    /** Server-suggested polling interval (ms) for `getTask`. */
    pollIntervalMs?: number;
    /** Server's reported task creation timestamp (ISO-8601). */
    createdAt?: string;
    /** Server's reported last update timestamp (ISO-8601). */
    lastUpdatedAt?: string;
    /** Numeric progress value from the most recent progress notification. */
    progress?: number;
    /** Total for the progress numerator, when known. */
    progressTotal?: number;
    /** SEP-2694 resumable event stream state, when enabled for this task. */
    eventStream?: McpTaskEventStreamInfo;
}

declare type MCPTelemetryCallback = (event: McpServerSetupTelemetryEvent | McpProxySecretMaskingSkippedEvent) => Promise<void>;

declare interface McpToolCallInterceptor {
    (input: McpToolCallInterceptorInput): Promise<McpToolCallInterceptorOutput | void>;
    hasHooks?: () => boolean;
}

declare interface McpToolCallInterceptorInput {
    toolCallId?: string;
    serverName: string;
    toolName: string;
    arguments: Record<string, unknown>;
    _meta?: Record<string, unknown>;
}

declare interface McpToolCallInterceptorOutput {
    metaToUse?: Record<string, unknown> | null;
}

/**
 * A set of MCP tools along with a shutdown function to clean up the servers
 * associated with those tools. Whether or not multiple servers are involved is
 * dependent on the context in which this type was used/returned/created.
 */
declare type McpToolsAndShutdown = {
    tools: tools.Tool[];
    shutdownMcpServers: () => Promise<void>;
    /** The normalized server names that were added (used to filter out overridden servers from outer agent) */
    serverNames?: string[];
};

declare abstract class MCPTransport<ToolsProviderT = unknown> {
    protected readonly settings: RuntimeSettings;
    protected readonly logger: RunnerLogger;
    protected readonly cacheProviderTools: boolean;
    /**
     * Per-host MCP Apps opt-in. Set by the owning {@link McpHost} via
     * {@link setMcpAppsEnabled} when the session that constructed this
     * transport has the `mcp-apps` capability. Used together with the
     * runtime feature flag in {@link isMcpAppsActive} so the transport
     * preserves `_meta.ui` on tools and fetches `ui://` resources when
     * either signal is present.
     */
    private mcpAppsEnabled;
    setMcpAppsEnabled(enabled: boolean): void;
    protected isMcpAppsActive(): boolean;
    protected cachedTools: Map<string, Record<string, BasicToolConfig>>;
    private _progressCallback?;
    private _traceContextResolver?;
    private _mcpTaskEventCallback?;
    private _mcpToolCallInterceptor?;
    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;
    /**
     * Set the callback to be invoked for live SEP-2694 MCP task events.
     */
    setMcpTaskEventCallback(callback: McpTaskEventCallback | undefined): void;
    /**
     * Set the interceptor invoked before MCP tool calls are sent.
     */
    setMcpToolCallInterceptor(interceptor: McpToolCallInterceptor | 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;
    protected get mcpTaskEventCallback(): McpTaskEventCallback | undefined;
    protected interceptMcpToolCall(input: McpToolCallInterceptorInput): Promise<Record<string, unknown> | 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: Record<string, unknown>, filterMode?: ContentFilterMode, toolCallId?: string, customAgentName?: string): Promise<ToolResultExpanded>;
    /**
     * Combine `content` text and `structuredContent` into a single LLM-visible string,
     * never dropping either side.
     *
     * Per MCP spec [§5.2.6](https://modelcontextprotocol.io/specification/2025-11-25/server/tools#structured-content),
     * a server returning `structuredContent` SHOULD also surface the serialized JSON in a
     * `TextContent` block for backwards compatibility, but this is a SHOULD, not a MUST.
     * Servers in the wild send the structured payload alone, or pair it with human-readable
     * text that is not a literal JSON serialization. Dropping either side loses information,
     * so we surface both: text first (human-readable narrative), then the JSON payload,
     * deduplicated when `content` is already the literal serialization of `structuredContent`.
     *
     * Rules:
     *  - Only `content` text         → return text as-is.
     *  - Only `structuredContent`    → return its JSON serialization.
     *  - Both, with text == JSON     → return one copy (spec-compliant duplicate).
     *  - Both, with text != JSON     → return `text + "\n\n" + json` (avoid info loss).
     *  - `JSON.stringify` throws     → fall back to text-only (BigInt, cycles, etc.).
     *  - `structuredContent` is `null` → treat as absent (non-conformant per spec; avoid
     *    surfacing the literal string `"null"` to the LLM).
     */
    protected combineContentAndStructured(textFromContent: string, structuredContent: unknown): string;
    /**
     * 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: Record<string, unknown>, 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>>;
}

/** Display modes a view can be rendered in (SEP-1865). */
declare type McpUiDisplayMode = "inline" | "fullscreen" | "pip";

/**
 * Resolved MCP App UI resource fetched via `resources/read` for a `ui://` URI.
 * Either `text` or `blob` is populated; `mimeType` is typically `text/html` or
 * `text/html;profile=mcp-app`.
 */
declare interface McpUiResource {
    uri: string;
    mimeType: string;
    text?: string;
    blob?: string;
    _meta?: {
        ui?: McpUiResourceMeta;
    };
}

/** CSP directives that the host SHOULD apply to the rendered iframe. */
declare interface McpUiResourceCsp {
    connectDomains?: string[];
    resourceDomains?: string[];
    frameDomains?: string[];
    baseUriDomains?: string[];
}

/** Resource-level `_meta.ui` block — render hints and sandbox policy. */
declare interface McpUiResourceMeta {
    csp?: McpUiResourceCsp;
    permissions?: McpUiResourcePermissions;
    domain?: string;
    prefersBorder?: boolean;
}

/** Iframe permissions the resource requests; presence = requested. */
declare interface McpUiResourcePermissions {
    camera?: Record<string, unknown>;
    microphone?: Record<string, unknown>;
    geolocation?: Record<string, unknown>;
    clipboardWrite?: Record<string, unknown>;
}

/**
 * Tool-level `_meta.ui` block (SEP-1865).
 * Linked to a UI resource via `resourceUri` (typically `ui://...`).
 * `visibility` controls who can call the tool — `["app"]` hides it from the LLM
 * tool list while keeping it callable through the host's MCP App proxy.
 */
declare interface McpUiToolMeta {
    resourceUri?: string;
    visibility?: McpUiVisibility[];
}

/** Visibility for an MCP-Apps-aware tool. Defaults to ["model", "app"] when absent. */
declare type McpUiVisibility = "model" | "app";

/**
 * Result from getMemoriesPrompt containing both prompt components and tool definitions.
 * - memoriesContext: The formatted memories for injection into the system prompt (undefined if no memories)
 * - storeInstructions: Instructions for when/how to use store_memory tool
 * - storeToolDefinition: Metadata for the store_memory tool from API
 * - voteToolDefinition: Metadata for the vote_memory tool from API (only when voting is enabled)
 * - toolName / toolDescription: Deprecated store tool metadata retained for backward compatibility
 * - memoriesCount: Number of memories retrieved from the API (0 if none, undefined for test-injected memories)
 */
declare type MemoriesPromptResult = {
    memoriesContext?: string;
    storeInstructions?: string;
    /** Store tool metadata from the /prompt API (includes definitionVersion for scope detection). */
    storeToolDefinition?: MemoryToolDefinition;
    /** Vote tool metadata from the /prompt API (present when voting is enabled server-side). */
    voteToolDefinition?: MemoryToolDefinition;
    memoriesCount?: number;
};

/** Shared mutable cache for Memory API results, owned by the session and passed
 *  into every ToolConfig. Deduplicates concurrent API calls on the
 *  first turn and provides a fast path on subsequent turns. */
declare type MemoryApiCache = {
    promise?: Promise<MemoryApiCacheResult>;
    /** The repo the in-flight promise was initiated for, so repo-change
     *  invalidation can discard stale in-flight fetches. */
    promiseRepoName?: string;
    result?: MemoryApiCacheResult;
};

/** Cached result from the Memory API, including the repo it was fetched for. */
declare type MemoryApiCacheResult = {
    enabled: boolean;
    repoName?: string;
} & Partial<MemoriesPromptResult>;

/**
 * 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;
    /** The scope of the memory being stored */
    readonly scope?: "repository" | "user";
    /**
     * The repository the memory is associated with, as an `owner/repo` "name
     * with owner" (NWO) string. See {@link StoreMemoryPermissionRequest.repoNwo}.
     */
    readonly repoNwo?: string;
};

/** Tool definition metadata from the Memory API /prompt response. */
declare type MemoryToolDefinition = {
    name: string;
    description: string;
    definitionVersion?: 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`.
 * Model clients are expected to emit assistant messages, tool results, and
 * runtime-injected user messages only. System/developer prompts are session-owned
 * input artifacts surfaced via `system.message` session events instead.
 */
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 function missingRemoteBranchWarning(branch: string): string;

declare type Model = {
    id: string;
    name: string;
    preview?: boolean;
    vendor?: string;
    capabilities: {
        family?: string;
        supports: {
            streaming?: boolean;
            tool_calls?: boolean;
            vision?: boolean;
            /**
             * Reasoning effort levels accepted by CAPI for this model
             * (e.g., `["low", "medium", "high"]`). When present and non-empty,
             * the runtime intersects this with its locally configured
             * `supportedReasoningEfforts` so we never offer an effort CAPI
             * won't accept. A missing field or empty list is treated as
             * "no info" — the local list is used as-is.
             */
            reasoning_effort?: string[];
        };
        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;
            };
        };
    };
    supported_endpoints?: string[];
    policy?: {
        state: "enabled" | "disabled" | "unconfigured";
        terms?: string;
    };
    billing?: {
        multiplier?: number;
        restricted_to?: string[];
        /** Token-level pricing information from CAPI (flat format, API < 2026-06-01). */
        token_prices?: FlatTokenPrices | TieredTokenPrices;
    };
    /** Model category for the model picker (e.g., lightweight, versatile, powerful). */
    model_picker_category?: "lightweight" | "versatile" | "powerful";
    /** Price category for the model picker (e.g., low, medium, high, very_high). */
    model_picker_price_category?: "low" | "medium" | "high" | "very_high";
    custom_model?: CustomModelMetadata;
    /**
     * Issues that may prevent the model from being used by certain consumers.
     * Populated by the local enrichment layer — CAPI never sends this field.
     * Each entry has a machine-readable `code` and a human-readable `message`.
     */
    issues?: {
        code: string;
        message: string;
    }[];
    /**
     * Warning messages from CAPI about this model.
     * Each entry has a machine-readable `code` and a human-readable `message`.
     * Codes include `client_version_deprecated`, `model_degraded_provider`,
     * `model_degraded_github`, and `model_high_usage`.
     */
    warning_messages?: {
        code: string;
        message: 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;
};

/**
 * Model call failure (ephemeral event for telemetry)
 * Used to track model call failures, including recoverable failures that may be retried.
 */
declare const ModelCallFailureEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"model.call_failure">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        model: z.ZodOptional<z.ZodString>;
        initiator: z.ZodOptional<z.ZodString>;
        apiCallId: z.ZodOptional<z.ZodString>;
        providerCallId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        statusCode: z.ZodOptional<z.ZodNumber>;
        durationMs: z.ZodOptional<z.ZodNumber>;
        source: z.ZodEnum<["top_level", "subagent", "mcp_sampling"]>;
        /**
         * Raw provider/runtime error string. This may contain prompt fragments or other
         * sensitive context and must only be emitted through restricted telemetry.
         */
        errorMessage: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    }, {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "model.call_failure";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "model.call_failure";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    };
    agentId?: string | undefined;
}>;

export declare type ModelCallFailureSessionEvent = z.infer<typeof ModelCallFailureEventSchema>;

export declare type ModelCallFailureSource = z.infer<typeof ModelCallFailureSourceSchema>;

declare const ModelCallFailureSourceSchema: z.ZodEnum<["top_level", "subagent", "mcp_sampling"]>;

/**
 * -----------------------------------------------------------------------
 * Events
 * -----------------------------------------------------------------------
 *
 * Event (Union Type)
 * ├── TurnStartedEvent
 * ├── TurnEndedEvent
 * ├── TurnFailedEvent
 * ├── TurnRetryEvent
 * ├── ModelCallSuccessEvent
 * ├── ModelCallFailureEvent
 * ├── ToolExecutionEvent
 * ├── ImageProcessingEvent
 * ├── BinaryAttachmentRemovalEvent
 * ├── 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;
    api_endpoint?: CopilotAPIEndpoint;
    error?: string;
    status?: number;
    request_id?: string;
    service_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;
    /**
     * Copilot service request ID (x-copilot-service-request-id header) for this model call.
     */
    serviceRequestId?: 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;
    };
    /** Accumulated nano-AI units cost for this model. */
    totalNanoAiu: number;
    /** Token count details per type (e.g. input, output, cache_read, cache_write). */
    tokenDetails: Map<string, TokenDetails>;
}

/**
 * Model names supported by the code review tool.
 *
 * Open string alias so 1P and 3P callers can experiment with different models
 * (subject to the `/models` registry on the runtime they're calling). The
 * default literal lives on {@link DEFAULT_CODE_REVIEW_MODEL}.
 */
declare type ModelName = string;

/**
 * OpenAI's CompletionUsage extended with provider-specific token counts.
 * Providers like Anthropic report `cache_creation_input_tokens` which has
 * no standard OpenAI equivalent, and CAPI reports Gemini reasoning tokens
 * as top-level `reasoning_tokens`; 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;
    };
    /** Reasoning tokens reported by CAPI for models like Gemini. */
    reasoning_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?: HydroTelemetryOptions): void;
    shouldSendRestrictedTelemetry(): boolean;
    dispose(): void;
}

declare interface NormalizedCopilotUsage {
    tokenDetails: Array<{
        batchSize: number;
        costPerBatch: number;
        tokenCount: number;
        tokenType: string;
    }>;
    totalNanoAiu: number;
}

export declare type NotificationHook = Hook<NotificationHookInput, NotificationHookOutput>;

/**
 * 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[];
    /** Warnings reported for individual token exchanges. */
    warnings: OIDCTokenWarning[];
}

/** 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 interface OIDCTokenWarning {
    /** User-facing message describing the warning. */
    message: 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. Re-exported from `otelLifecycle.ts`. */
declare type OnToolsUpdateFn = (callback: (tools: ToolMetadata[], model: string) => void) => () => void;

declare type OpenCanvasInstance = z_2.infer<typeof openCanvasInstanceSchema>;

declare const openCanvasInstanceSchema: z_2.ZodObject<{
    instanceId: z_2.ZodString;
    extensionId: z_2.ZodString;
    extensionName: z_2.ZodOptional<z_2.ZodString>;
    canvasId: z_2.ZodString;
    title: z_2.ZodOptional<z_2.ZodString>;
    status: z_2.ZodOptional<z_2.ZodString>;
    url: z_2.ZodOptional<z_2.ZodString>;
    input: z_2.ZodOptional<z_2.ZodUnknown>;
    reopen: z_2.ZodBoolean;
    availability: z_2.ZodEnum<["ready", "stale"]>;
}, "strip", z_2.ZodTypeAny, {
    instanceId: string;
    extensionId: string;
    canvasId: string;
    reopen: boolean;
    availability: "ready" | "stale";
    status?: string | undefined;
    url?: string | undefined;
    title?: string | undefined;
    extensionName?: string | undefined;
    input?: unknown;
}, {
    instanceId: string;
    extensionId: string;
    canvasId: string;
    reopen: boolean;
    availability: "ready" | "stale";
    status?: string | undefined;
    url?: string | undefined;
    title?: string | undefined;
    extensionName?: string | undefined;
    input?: unknown;
}>;

/** Makes the params arg optional when `undefined` is assignable to the param type. */
declare type OptionalParamArgs<P> = undefined extends P ? [params?: P] : [params: P];

/**
 * Returns hooks in policy-first execution order. Policy hooks must observe
 * input before non-policy hooks and may produce terminal decisions that prevent
 * non-policy hooks from seeing sensitive data.
 */
export declare function orderPolicyHooksFirst<THook extends {
    isPolicy?: boolean;
}>(hooks: readonly THook[]): THook[];

/**
 * Classification of an orphaned tool call's permission/external tool state for resume.
 *
 * - interrupted: no permission/tool request boundary persisted for this tool call;
 *   it is reported as interrupted.
 * - awaiting-permission: permission requested but not yet decided; wait for a
 *   late decision or accept a user-message preempt.
 * - approved / denied: permission decision was persisted before suspend. For
 *   external tools, "approved" continues by re-issuing the tool request (the
 *   work hadn't started). For local tools, "approved" cannot be safely resumed
 *   (the in-process stack is gone) and is reported as interrupted.
 * - awaiting-external-tool: external tool was dispatched but not completed;
 *   wait for the consumer to re-supply the result via respondToExternalTool.
 * - external-tool-completed: a late completion arrived in-memory after resume
 *   but before classification; replay it.
 */
declare type OrphanedToolPermissionState = "interrupted" | "awaiting-permission" | "approved" | "denied" | "awaiting-external-tool" | "external-tool-completed";

/** Info about an orphaned tool call that needs resolution on resume. */
declare interface OrphanedToolResumeInfo {
    toolCallId: string;
    toolName: string;
    args: unknown;
    state: OrphanedToolPermissionState;
    permissionRequestId?: string;
    permissionResult?: PermissionRequestResult;
    /** The original permission request data. */
    permissionRequest?: PermissionRequest;
    externalToolRequestId?: string;
    externalToolCompletion?: ExternalToolCompletion;
    /** For external tools awaiting response: the original request data. */
    externalToolRequest?: {
        sessionId: string;
        toolName: string;
        arguments: unknown;
    };
}

/**
 * Owns the full OTel lifecycle: config resolution, lazy SDK initialisation
 * via the native runtime, per-session tracker creation / disposal, and
 * trace-context helpers used by the JSON-RPC server layer.
 *
 * The trace/metric SDK and per-session state machine are implemented in
 * `src/runtime/src/otel_*`. This class is the thin TS adapter that
 * the rest of the codebase imports.
 */
declare class OtelLifecycle {
    private config;
    private sdkHandle;
    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;
    getAvailableCustomAgents?: () => SweCustomAgent[];
    getSelectedCustomAgent?: () => SweCustomAgent | undefined;
    getAuthInfo?: () => AuthInfo | undefined;
};

/** Options forwarded from the session creation call. */
declare interface OtelTrackingOptions {
    model?: string;
    providerType?: string;
    providerBaseUrl?: string;
    streaming?: boolean;
    traceparent?: string;
    tracestate?: string;
    agentVersion?: string;
}

/**
 * Input schema for parallel_validation to pass through to code_review.
 * Re-exported so parallel_validation can include these fields in its own input_schema
 * and forward them when invoking code_review as a child tool.
 */
declare const parallelValidationInputSchema: z_2.ZodObject<{
    trivialChangeDeclaration: z_2.ZodOptional<z_2.ZodObject<{
        isTrivial: z_2.ZodBoolean;
        reason: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        reason: string;
        isTrivial: boolean;
    }, {
        reason: string;
        isTrivial: boolean;
    }>>;
    prTitle: z_2.ZodString;
    prDescription: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    prDescription: string;
    prTitle: string;
    trivialChangeDeclaration?: {
        reason: string;
        isTrivial: boolean;
    } | undefined;
}, {
    prDescription: string;
    prTitle: string;
    trivialChangeDeclaration?: {
        reason: string;
        isTrivial: boolean;
    } | undefined;
}>;

/**
 * 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;

declare function parseTodoCounts(todos: string): {
    total: number;
    completed: number;
    pending: number;
};

/**
 * Parse a markdown checklist into structured entries, preserving order.
 * Recognizes:
 *   - `- [x]` / `- [X]` → completed
 *   - `- [ ]` → pending
 *   - `- [-]` / `- [~]` / `- [/]` → in_progress (common community conventions)
 * Bullet markers may be `-`, `*`, `+`, or numbered (`1.` / `1)`). Lines without
 * a checkbox marker are ignored.
 */
declare function parseTodoEntries(todos: string): TodoEntry[];

/**
 * Controls how a {@link SendOptions} message interacts with the agent loop
 * when no opportunistic delivery is available.
 *
 * - `false` (or omitted): the message wakes / continues / restarts the loop.
 * - `{ type: "wait-for-next-turn" }`: the message is buffered and drained
 *   on the next user-driven turn.
 * - `{ type: "drop" }`: the message is discarded if it cannot ride along on
 *   an already-scheduled model call.
 */
declare type PassivePolicy = false | {
    type: "drop" | "wait-for-next-turn";
};

declare interface PathManager {
    /**
     * Get all allowed directories
     */
    getDirectories(): string[];
    /**
     * Check if a path is within any of the allowed directories
     */
    isPathWithinAllowedDirectories(pathToCheck: string): Promise<boolean>;
    /**
     * Check if a path is within the workspace directory (session folder).
     * Used to auto-approve writes to workspace files like plan.md.
     */
    isPathWithinWorkspace(pathToCheck: string): Promise<boolean>;
    /**
     * Get the primary directory (usually the current working directory)
     */
    getPrimaryDirectory(): string;
    /**
     * Update the primary directory (e.g., when /cwd command is used)
     */
    updatePrimaryDirectory(newDir: string): Promise<void>;
    /**
     * Add additional directories to the allowed list
     */
    addDirectory(dir: string): Promise<void>;
}

/**
 * A path permission prompt emitted after the permission service has already
 * identified which paths need explicit approval.
 */
declare type PathPermissionAccessKind = "read" | "shell" | "write";

declare type PathPermissionPromptRequest = {
    readonly kind: "path";
    readonly accessKind: PathPermissionAccessKind;
    readonly paths: ReadonlyArray<PossiblePath>;
    readonly toolCallId?: string;
};

export declare type PendingMessagesModifiedEvent = z.infer<typeof PendingMessagesModifiedEventSchema>;

/**
 * User message queued (ephemeral event for UI updates)
 */
declare const PendingMessagesModifiedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"pending_messages.modified">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    type: "pending_messages.modified";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}, {
    type: "pending_messages.modified";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}>;

/**
 * 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 events and awaits responses via pending promise maps.
 * Permission and external-tool request boundaries use the durable `emit`
 * callback so they are persisted to the session log and survive suspend/resume.
 * All other interactions (user input, elicitation, sampling, MCP OAuth,
 * commands, exit-plan-mode, auto-mode switch) use `emitEphemeral`.
 * Clients (TUI, SDK, ACP) subscribe to events and call the respond methods.
 *
 * Suspend/resume model:
 * - Permission and external-tool *request boundaries* are persisted to the
 *   session log so resume can recover what was outstanding. Permission decisions
 *   and external-tool-completion markers are also persisted; external tool
 *   *results* are not (they are caller-owned and must be re-supplied via
 *   respondToExternalTool after resume if the consumer tracked the call).
 * - Permissions can be re-driven safely. If a permission request is outstanding
 *   on resume, the consumer may either supply a late decision or (for SDKs that
 *   did not persist the prompt) re-prompt the user.
 * - External tool calls have side effects that the SDK consumer owns. The
 *   runtime never re-issues an external tool call that has already been
 *   dispatched; the consumer must re-supply the result if it tracked the call
 *   across suspend, otherwise the orphan is reported as interrupted.
 * - A new user message preempts any outstanding request — the same model as in
 *   the non-suspend flow; suspend just makes the lookup durable.
 */
declare class PendingRequestStore {
    private readonly emitEphemeral;
    private readonly emit;
    /** 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;
    private readonly autoModeSwitchRequests;
    /**
     * Short-lived record of prompt IDs (requestId or toolCallId) for which a
     * permission / user-input / elicitation / exit-plan-mode request was
     * recently resolved. Lets `findXByPromptId` distinguish "raced and lost
     * to the in-process responder" (quiet `already-resolved`) from "never
     * existed" (loud `not-found` warning that signals a real drop).
     *
     * The tombstone is intentionally lightweight: a TTL-bounded Map of
     * promptId → expiry timestamp. Entries auto-expire on lookup. The TTL
     * is generous (60s) because MC steering responses can be authored by a
     * user on mobile after a meaningful delay; a fast in-process responder
     * commonly wins by seconds-to-minutes, not microseconds.
     */
    private readonly resolvedPromptIdTombstones;
    private static readonly TOMBSTONE_TTL_MS;
    /** 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, emit: (type: string, data: Record<string, unknown>) => void);
    /** Mark a tool call ID as pre-approved by a preToolUse hook. */
    addHookAllowedToolCallId(toolCallId: string): void;
    /** Check whether a tool call ID was pre-approved by a preToolUse hook. */
    isHookAllowedToolCallId(toolCallId: string): boolean;
    /** Clear all hook-allowed tool call IDs (called at the start of each preToolsExecution batch). */
    clearHookAllowedToolCallIds(): void;
    /** Emit a permission request event (raw + derived prompt data) and return a promise for the client's response. */
    requestPermissionPrompt<TResponse extends PermissionPromptResponse>(permissionRequest: PermissionRequest, promptRequest: PermissionPromptRequest): Promise<TResponse>;
    /** 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: PermissionPromptResponse): boolean;
    /**
     * Respond to a pending user input request by its ID. Returns true if the
     * request was still pending (and was resolved by this call), false if the
     * request ID was unknown or already resolved.
     */
    respondToUserInput(requestId: string, response: UserInputResponse): boolean;
    /** 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. Returns true if the request was still pending (and
     * was resolved by this call), false if the request ID was unknown or
     * already resolved.
     */
    respondToSampling(requestId: string, response?: CreateMessageResultWithTools): boolean;
    /**
     * 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;
        grantType?: "client_credentials";
    }, redirectPort?: number): 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): boolean;
    /** Reject a pending external tool request (e.g., on abort). */
    rejectExternalTool(requestId: string, error: Error): boolean;
    /** Reject all pending external tool requests (e.g., when the session is aborted). */
    rejectAllExternalTools(error: Error): void;
    /** Cancel all pending permission requests without emitting completion events. */
    cancelAllPermissions(reason: string): 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. Returns true
     * when a pending entry was found and resolved; false when the request
     * was already resolved, cancelled, or unknown.
     */
    respondToQueuedCommand(requestId: string, result: QueuedCommandResult): boolean;
    /** 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. Returns true if the request was still pending (and was resolved by this call), false if the request ID was unknown or already resolved. */
    respondToExitPlanMode(requestId: string, response: ExitPlanModeResponse): boolean;
    /** Emit an auto-mode switch request and return a promise that resolves when responded to. */
    requestAutoModeSwitch(errorCode: string | undefined, retryAfterSeconds: number | undefined): Promise<AutoModeSwitchResponse>;
    /**
     * Respond to a pending auto-mode switch request by its ID. Returns true if
     * the request was still pending (and was resolved by this call), false if
     * the request ID was unknown or already resolved.
     */
    respondToAutoModeSwitch(requestId: string, response: AutoModeSwitchResponse): boolean;
    /**
     * Look up a pending user-input request by Mission Control `promptId`.
     * MC reports `promptId = toolCallId ?? requestId`, so we accept either:
     * direct map hit (promptId === requestId) or a scan for a matching
     * `toolCallId`. Returns either the host `requestId`, the literal
     * `"already-resolved"` (a recent responder beat us to it; the steer
     * response is a quiet race-loser, not a drop), or `undefined`.
     */
    findUserInputRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    /** Look up a pending elicitation request by Mission Control `promptId`. */
    findElicitationRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    /** Look up a pending exit-plan-mode request by Mission Control `promptId`. */
    findExitPlanModeRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    /**
     * Look up a pending permission request by Mission Control `promptId`.
     * Returns the host `requestId` and the original `promptRequest` (so the
     * caller can pass it to response builders that need request context,
     * e.g. for `scope: "session"` URL domain / command identifier
     * extraction), the literal `"already-resolved"`, or `undefined`.
     */
    findPermissionByPromptId(promptId: string): {
        requestId: string;
        promptRequest: PermissionPromptRequest;
    } | "already-resolved" | undefined;
    /**
     * Record that the given requestId (and optionally its toolCallId) was
     * just resolved. Subsequent `findXByPromptId` calls within the TTL
     * window will return `"already-resolved"` instead of `undefined`,
     * letting callers distinguish "raced and lost" from "never existed".
     */
    private tombstonePromptIds;
    /** Returns true if `promptId` is in the tombstone set and within TTL. */
    private consumeTombstone;
}

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>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.completed">;
    data: z.ZodObject<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        result: z.ZodDiscriminatedUnion<"kind", readonly [z.ZodObject<{
            kind: z.ZodLiteral<"approved">;
        }, "strip", z.ZodTypeAny, {
            kind: "approved";
        }, {
            kind: "approved";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"approved-for-session">;
            approval: z.ZodType<SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">, z.ZodTypeDef, SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">>;
        }, "strip", z.ZodTypeAny, {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        }, {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"approved-for-location">;
            approval: z.ZodType<SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">, z.ZodTypeDef, SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">>;
            locationKey: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        }, {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"cancelled">;
            reason: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "cancelled";
            reason?: string | undefined;
        }, {
            kind: "cancelled";
            reason?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-by-rules">;
            rules: z.ZodReadonly<z.ZodArray<z.ZodType<Rule, z.ZodTypeDef, Rule>, "many">>;
        }, "strip", z.ZodTypeAny, {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        }, {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-no-approval-rule-and-could-not-request-from-user">;
        }, "strip", z.ZodTypeAny, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        }, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-interactively-by-user">;
            feedback: z.ZodOptional<z.ZodString>;
            forceReject: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        }, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-by-content-exclusion-policy">;
            path: z.ZodString;
            message: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        }, {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-by-permission-request-hook">;
            message: z.ZodOptional<z.ZodString>;
            interrupt: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.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", z.ZodTypeAny, {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    }, {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "permission.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "permission.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

/**
 * A user-facing permission prompt payload emitted by the session.
 */
declare type PermissionPromptRequest = UserToolPermissionRequest | PathPermissionPromptRequest | (UserUrlPermissionRequest & {
    readonly kind: "url";
}) | HookPermissionRequest;

/** A client response to a pending user-facing permission prompt. */
declare type PermissionPromptResponse = PermissionRequestResult | UserToolPermissionRequestResponse<UserToolPermissionRequest["kind"]> | UserPathPermissionRequestResponse | UserUrlPermissionRequestResponse;

/**
 * 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 | ExtensionManagementPermissionRequest | ExtensionPermissionAccessRequest);

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>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.requested">;
    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, {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: 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";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"read">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            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, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        }, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        }>, 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;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        }, {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | 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, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }>, 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, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-management">;
            toolCallId: z.ZodOptional<z.ZodString>;
            operation: z.ZodString;
            extensionName: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-permission-access">;
            toolCallId: z.ZodOptional<z.ZodString>;
            extensionName: z.ZodString;
            capabilities: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }>]>;
        promptRequest: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"commands">;
            toolCallId: z.ZodOptional<z.ZodString>;
            fullCommandText: z.ZodString;
            intention: z.ZodString;
            commandIdentifiers: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
            canOfferSessionApproval: z.ZodBoolean;
            warning: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            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";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"read">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            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.ZodNullable<z.ZodUnknown>;
        }, "strip", z.ZodTypeAny, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        }, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        }>, 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;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        }, {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"custom-tool">;
            toolCallId: z.ZodOptional<z.ZodString>;
            toolName: z.ZodString;
            toolDescription: z.ZodString;
            args: z.ZodOptional<z.ZodAny>;
        }, "strip", z.ZodTypeAny, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"path">;
            toolCallId: z.ZodOptional<z.ZodString>;
            accessKind: z.ZodEnum<["read", "shell", "write"]>;
            paths: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        }, {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        }>, 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, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-management">;
            toolCallId: z.ZodOptional<z.ZodString>;
            operation: z.ZodString;
            extensionName: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-permission-access">;
            toolCallId: z.ZodOptional<z.ZodString>;
            extensionName: z.ZodString;
            capabilities: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }>]>>;
        resolvedByHook: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    }, {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "permission.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "permission.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type PermissionRequestHook = Hook<PermissionRequestHookInput, PermissionRequestHookOutput>;

/**
 /**
 * 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: "approved-for-session";
    readonly approval: Extract<SessionApproval, {
        kind: UserToolPermissionRequest["kind"];
    }>;
} | {
    readonly kind: "approved-for-location";
    readonly approval: Extract<SessionApproval, {
        kind: UserToolPermissionRequest["kind"];
    }>;
    readonly locationKey: string;
} | {
    readonly kind: "cancelled";
    readonly reason?: string;
} | {
    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, {
    commands: readonly {
        identifier: string;
        readOnly: boolean;
    }[];
    kind: "shell";
    fullCommandText: string;
    intention: string;
    possiblePaths: readonly string[];
    possibleUrls: readonly {
        url: string;
    }[];
    hasWriteFileRedirection: boolean;
    canOfferSessionApproval: boolean;
    warning?: string | undefined;
    toolCallId?: string | undefined;
}, {
    commands: readonly {
        identifier: string;
        readOnly: boolean;
    }[];
    kind: "shell";
    fullCommandText: string;
    intention: 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";
    intention: string;
    canOfferSessionApproval: boolean;
    fileName: string;
    diff: string;
    toolCallId?: string | undefined;
    newFileContents?: string | undefined;
}, {
    kind: "write";
    intention: string;
    canOfferSessionApproval: boolean;
    fileName: string;
    diff: string;
    toolCallId?: string | undefined;
    newFileContents?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"read">;
    toolCallId: z.ZodOptional<z.ZodString>;
    intention: z.ZodString;
    path: z.ZodString;
}, "strip", z.ZodTypeAny, {
    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, {
    toolTitle: string;
    toolName: string;
    kind: "mcp";
    readOnly: boolean;
    serverName: string;
    args?: any;
    toolCallId?: string | undefined;
}, {
    toolTitle: string;
    toolName: string;
    kind: "mcp";
    readOnly: boolean;
    serverName: string;
    args?: any;
    toolCallId?: string | undefined;
}>, 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;
    subject?: string | undefined;
    citations?: string | undefined;
    direction?: "upvote" | "downvote" | undefined;
}, {
    kind: "memory";
    fact: string;
    action?: "store" | "vote" | undefined;
    toolCallId?: string | undefined;
    reason?: string | undefined;
    subject?: string | undefined;
    citations?: string | undefined;
    direction?: "upvote" | "downvote" | 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, {
    toolName: string;
    toolDescription: string;
    kind: "custom-tool";
    args?: any;
    toolCallId?: string | undefined;
}, {
    toolName: string;
    toolDescription: string;
    kind: "custom-tool";
    args?: any;
    toolCallId?: string | undefined;
}>, 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, {
    toolName: string;
    kind: "hook";
    toolCallId?: string | undefined;
    toolArgs?: unknown;
    hookMessage?: string | undefined;
}, {
    toolName: string;
    kind: "hook";
    toolCallId?: string | undefined;
    toolArgs?: unknown;
    hookMessage?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"extension-management">;
    toolCallId: z.ZodOptional<z.ZodString>;
    operation: z.ZodString;
    extensionName: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    operation: string;
    kind: "extension-management";
    extensionName?: string | undefined;
    toolCallId?: string | undefined;
}, {
    operation: string;
    kind: "extension-management";
    extensionName?: string | undefined;
    toolCallId?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"extension-permission-access">;
    toolCallId: z.ZodOptional<z.ZodString>;
    extensionName: z.ZodString;
    capabilities: z.ZodArray<z.ZodString, "many">;
}, "strip", z.ZodTypeAny, {
    extensionName: string;
    capabilities: string[];
    kind: "extension-permission-access";
    toolCallId?: string | undefined;
}, {
    extensionName: string;
    capabilities: string[];
    kind: "extension-permission-access";
    toolCallId?: string | undefined;
}>]>;

/**
 * Options for customizing permission denial messages.
 */
declare type PermissionResultMessages = {
    /** Custom message for when permission is denied by rules. If not provided, uses default. */
    deniedByRules?: string;
};

/**
 * Configuration for permissions handling.
 *
 * For CCA, permissions requests are not required.
 */
declare type PermissionsConfig = {
    requestRequired: false;
} | {
    requestRequired: true;
    request: RequestPermissionFn;
};

/**
 * The permission service is responsible for managing permission to use tools and access paths.
 */
declare type PermissionService = {
    request: RequestPermissionFn;
    configure: (options: {
        approveAllToolPermissionRequests?: boolean;
        approveAllReadPermissionRequests?: boolean;
        rules?: {
            approved: ReadonlyArray<Rule>;
            denied: ReadonlyArray<Rule>;
        };
        pathManager?: PathManager;
        urlManager?: UrlManager;
    }) => void;
    resetSessionToolApprovals: () => void;
    setApproveAllToolPermissionRequests: (value: boolean, source?: AllowAllSource) => void;
    /** Returns the current state of the approve-all-tool flag for this service. */
    getApproveAllToolPermissionRequests: () => boolean;
    addApprovedRules: (newRules: ReadonlyArray<Rule>) => void;
    removeApprovedRules: (rulesToRemove: ReadonlyArray<Rule>) => void;
    /** Add rules that came from location permissions (can be removed separately). */
    addLocationApprovedRules: (newRules: ReadonlyArray<Rule>) => void;
    /** Remove only rules that were added via addLocationApprovedRules. */
    removeLocationApprovedRules: () => void;
    /** Set the telemetry sender for permission-related telemetry events. */
    setTelemetrySender: (sender: TelemetrySender) => void;
    /** Set the callback invoked just before a permission prompt is shown to the user. */
    setOnPromptShown: (callback: ((message: string) => void) | undefined) => void;
    /** Check if MCP sampling is pre-approved for a given server. */
    checkSamplingApproval: (serverName: string) => "approved" | "unknown";
    /** The live PathManager used for filesystem permission checks. Mutations are visible immediately. */
    getPathManager: () => PathManager;
    /** The live UrlManager used for URL permission checks. Mutations are visible immediately. */
    getUrlManager: () => UrlManager;
};

/**
 * Result of `loadPersistedSessionCwd`. Exported so callers that pre-load the
 * persisted cwd (e.g. the JSON-RPC `session.resume` handler) can forward the
 * result to `LocalSessionManager.getSession` via `ResumeBehavior.persistedCwdInfo`
 * and skip a redundant `workspace.yaml` read on the cold-load path.
 */
declare interface PersistedSessionCwdInfo {
    /**
     * The persisted cwd. Set only when the value is an absolute path that
     * resolves to an existing directory. Used to default a resume's working
     * directory.
     */
    cwd: string | undefined;
    /**
     * True when `workspace.yaml` exists and has a non-empty `cwd` field,
     * regardless of whether that path is absolute or still resolves to a
     * directory. Lets callers skip the resume writeback so a transiently-
     * missing or malformed persisted cwd is not silently overwritten with
     * the launching cwd.
     */
    persistedFieldPresent: boolean;
}

/**
 * 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 PostEditHookContext = {
    /**
     * The path of the file that was edited.
     */
    readonly path: string;
    /**
     * Whether the edit was successful.
     */
    readonly editWasSuccessful: boolean;
} & CommonHookContext;

declare type PostEditHookResult = {
    /**
     * A hint to be given to the agent during the next turn about the edit
     * it made, or about something done to the file during the hook's execution.
     */
    postEditHint?: string;
} | void;

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 PostResultHookContext = {
    /**
     * The current commit hash.
     */
    postResultCommitHash: string;
} & CommonHookContext;

declare type PostResultHookResult = {
    /**
     * A message to be given to the agent about the result of its work. This will be given to the agent
     * as a start to performing another round of work on the same problem. If no message is provided,
     * work on the problem will not continue.
     */
    nextIterationMessage: string | undefined;
} | void;

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;
    /**
     * The client handling the request. Used when post-tool processing needs to
     * normalize outputs for a client-specific wire format.
     */
    readonly client?: Pick<Client_2, "getPreferredImageAttachmentFormat">;
};

export declare type PostToolUseFailureHook = Hook<PostToolUseFailureHookInput, PostToolUseFailureHookOutput>;

export declare interface PostToolUseFailureHookInput extends BaseHookInput {
    toolName: string;
    toolArgs: unknown;
    error: string;
}

export declare interface PostToolUseFailureHookOutput {
    additionalContext?: string;
}

export declare type PostToolUseHook = Hook<PostToolUseHookInput, PostToolUseHookOutput>;

/**
 * Post-tool use hook types
 *
 * Multiple hooks may be registered. They are invoked in registration order
 * (sequentially with `await` between each). When more than one hook returns
 * `additionalContext`, the strings are joined with `\n\n` in registration
 * order, capped at {@link MAX_POST_TOOL_USE_CONTEXT_LENGTH}, wrapped in a
 * labelled block, and appended to `toolResult.textResultForLlm` so the LLM
 * sees them on its next turn.
 */
export declare interface PostToolUseHookInput extends BaseHookInput {
    toolName: string;
    toolArgs: unknown;
    toolResult: ToolResultExpanded;
}

export declare interface PostToolUseHookOutput {
    modifiedResult?: ToolResultExpanded;
    additionalContext?: string;
    suppressOutput?: boolean;
    /**
     * If "block", the tool result is blocked. The original result payload should
     * be scrubbed and replaced with the reason text.
     */
    decision?: HookBlockDecision;
    /** Human-readable explanation for why the tool result was blocked. */
    reason?: string;
}

declare type PreCommitHookContext = {
    /** Commit messages from all report_progress tool calls in this turn, keyed by tool call ID. */
    commitMessagesByCallId: ReadonlyMap<string, string>;
} & CommonHookContext;

declare type PreCommitHookResult = {
    /** Whether or not the commit should proceed. */
    proceedWithCommit: boolean;
    /** The reason for stopping the commit, if applicable. Will be provided to the agent during the next turn. */
    reason?: string;
    /** If set, replaces commit messages for the matching report_progress tool call IDs. */
    redactedCommitMessagesByCallId?: ReadonlyMap<string, string>;
};

export declare type PreCompactHook = Hook<PreCompactHookInput, PreCompactHookOutput>;

/**
 * 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 PreEditsHookContext = {
    /**
     * The paths of files the agent is about to edit.
     */
    readonly pathsBeingEdited: Set<string>;
} & CommonHookContext;

export declare type PreMcpToolCallHook = Hook<PreMcpToolCallHookInput, PreMcpToolCallHookOutput>;

/**
 * Pre-MCP tool call hook types
 */
export declare interface PreMcpToolCallHookInput extends BaseHookInput {
    toolCallId?: string;
    serverName: string;
    toolName: string;
    arguments: unknown;
    _meta?: Record<string, unknown>;
}

export declare interface PreMcpToolCallHookOutput {
    /**
     * Hook-controlled metadata to use for the outgoing MCP request, before
     * runtime-owned trace metadata is added:
     * - omitted: preserve the current request `_meta`
     * - object: use this object as request `_meta`
     * - null: omit `_meta`
     */
    metaToUse?: Record<string, unknown> | null;
}

declare type PrePRDescriptionHookContext = CommonHookContext & {
    /**
     * The staged pull request description that hooks can inspect or modify.
     */
    readonly prDescription: string;
};

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 = Hook<PreToolUseHookInput, PreToolUseHookOutput>;

/**
 * Builds the model-visible denial message for a `preToolUse` hook that errored
 * (fail-closed). Includes the hook's {@link Hook.source} label when one is set
 * so a brittle plugin/hook can be identified. The source is always config-derived
 * (file paths, plugin names, admin policy labels, or hardcoded strings) and never
 * influenced by tool arguments or hook output, so it is safe to surface as-is.
 *
 * @internal Not intended for use by SDK consumers.
 */
export declare function preToolUseHookErroredMessage(hook: {
    readonly source?: string;
}): string;

/**
 * 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?;
    private readonly onBatchStart?;
    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, onBatchStart?: (() => void) | undefined);
    toJSON(): string;
    preToolsExecution(context: PreToolsExecutionContext): Promise<Map<string, ToolResultExpanded> | void>;
}

declare type PrivateRepo = "private";

/**
 * Processes a tool result, writing it to a file if it exceeds the size threshold.
 */
declare function processLargeOutput(result: ToolResultExpanded, options?: LargeOutputOptions): Promise<ToolResultExpanded>;

/**
 * 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 task currently waiting synchronously that can be promoted to background
 * execution from the CLI.
 */
export declare type PromotableAgentTask = AgentTask & {
    executionMode: "sync";
    canPromoteToBackground: true;
};

export declare type PromotableShellTask = ShellTask & {
    executionMode: "sync";
    canPromoteToBackground: true;
};

export declare type PromotableTask = PromotableAgentTask | PromotableShellTask;

/** 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;
}

declare type PublicRepo = "public";

/**
 * Hook system with arrays of specific hook callbacks
 */
export declare interface QueryHooks {
    preToolUse?: PreToolUseHook[];
    preMcpToolCall?: PreMcpToolCallHook[];
    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 | QueuedResumePendingItem;

/**
 * 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;
    reasoningSummary?: ReasoningSummary;
    modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
    contextTier?: ContextTier;
}

/**
 * Represents an internal wake-up to continue processing after a late permission
 * or external tool response was durably recorded.
 */
export declare interface QueuedResumePendingItem {
    kind: "resume_pending";
}

/** 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;
    shouldLog(_level: LogLevel): 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 additional usage 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 additional 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
     */
    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;
    /**
     * Whether the user currently has quota available for use.
     * When `false` (and the entitlement is not unlimited), the user is blocked
     * from making further requests until quota resets.
     */
    hasQuota?: boolean;
    /**
     * Whether this quota snapshot uses token-based billing (TBB).
     * When `true`, the snapshot represents an AI-credits based allocation
     * rather than a fixed premium-request count.
     */
    tokenBasedBilling?: boolean;
};

declare type QuotaSnapshotsByType = Record<string, QuotaSnapshot>;

declare function readDirectoryListing(directoryPath: string, softMaxBytes: number | undefined, hardMaxBytes: number, abortSignal?: AbortSignal): Promise<DirectoryListingResult>;

declare type ReadInboxEntryOptions = {
    entryId?: string;
    markAsRead?: boolean;
};

/**
 * 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;
};

/**
 * Well-known reasoning effort levels for models that support reasoning configuration.
 * Custom providers may accept additional values beyond these.
 */
declare const REASONING_EFFORT_LEVELS: readonly ["none", "low", "medium", "high", "xhigh", "max"];

declare const REASONING_SUMMARY_LEVELS: readonly ["none", "concise", "detailed"];

/**
 * Reasoning effort level for models that support it.
 * "none" is a client-side signal to disable reasoning and is accepted even
 * for "auto" and models that do not expose provider effort levels. Other
 * well-known values include "low", "medium", "high", "xhigh", and "max", but
 * custom providers may accept additional values.
 */
declare type ReasoningEffort = string;

/**
 * Reasoning effort level to request. Well-known values are listed in
 * {@link REASONING_EFFORT_LEVELS}; custom providers may accept additional values.
 */
declare type ReasoningEffort_2 = KnownReasoningEffort | (string & {});

/** Re-export ReasoningEffortOption as ReasoningEffortLevel for backwards compatibility */
declare type ReasoningEffortLevel = ReasoningEffortOption;

declare type ReasoningEffortOption = ReasoningEffort_2;

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;
};

declare type ReasoningSummary = (typeof REASONING_SUMMARY_LEVELS)[number];

declare type RefreshArgs = AcquireArgs & {
    existingToken: string;
};

/** Refresh an existing session token via `POST /models/session` with the token in the header. */
export declare function refreshAutoModeSession(args: RefreshArgs): Promise<AutoModeSessionResult>;

/**
 * A reference linking a session to an external entity.
 */
declare interface RefRow {
    session_id: string;
    ref_type: "commit" | "pr" | "issue";
    ref_value: string;
    turn_index?: number;
    created_at?: string;
}

/**
 * Registers a sessionFs-based temp file for cleanup tracking.
 * Use this when creating temp files outside of processLargeOutput (e.g., from StreamingOutputBuffer).
 */
declare function registerTempFile(sessionFs: SessionFs, filePath: string): void;

declare type RejectedToolResult = ToolResultExpanded & {
    resultType: "rejected";
};

declare type RejectedToolResult_2 = ToolResultExpanded & {
    resultType: "rejected";
};

/**
 * 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;

/**
 * Configuration for the runtime-managed remote-control singleton.
 *
 * Conceptually a "Mission Control connection" pointed at a single local
 * session at any one time. The CLI never constructs an exporter directly;
 * instead it asks the runtime to attach/transfer/stop remote control via
 * the {@link SessionsApi} surface, and the runtime owns the exporter
 * lifecycle, MC client, and credentials.
 */
declare interface RemoteControlConfig {
    /** Whether remote export should be enabled. (False disables completely.) */
    remote: boolean;
    /** Whether the connected MC session may steer the local session (write mode). */
    steerable: boolean;
    /**
     * Whether the user explicitly requested remote (via `--remote` or
     * `/remote on`). Controls whether missing-repo warnings are surfaced to
     * the timeline (explicit) vs. only logged (implicit / session sync).
     */
    explicit: boolean;
    /**
     * When true, suppresses timeline messages from the exporter on
     * successful setup. Used for implicit session-sync exports.
     */
    silent: boolean;
    /** Existing Mission Control task to attach the exported session to. */
    taskId?: string;
    /** Existing Mission Control session to reattach to without creating a new one. */
    existingMcSession?: {
        mcSessionId: string;
        mcTaskId: string;
    };
}

/**
 * State of the runtime-managed remote-control singleton.
 *
 * The state machine:
 * - `off` — no remote control active
 * - `connecting` — initial setup in flight for `attachedSessionId`
 * - `active` — connected and pointed at `attachedSessionId`
 * - `error` — last setup attempt failed (next start clears the error)
 *
 * `promptManager` on the `active` state is an opaque in-process handle —
 * the CLI passes it back to its `wrapAskUserForRemote` helpers without
 * introspecting its shape. Always undefined off the in-process boundary.
 */
declare type RemoteControlStatus = {
    state: "off";
} | {
    state: "connecting";
    attachedSessionId: string;
} | {
    state: "active";
    attachedSessionId: string;
    frontendUrl?: string;
    isSteerable: boolean;
    promptManager?: unknown;
} | {
    state: "error";
    error: string;
    attachedSessionId?: string;
};

/**
 * Optional host-side fallback for routing Mission Control steer responses
 * (ask_user / exit_plan_mode / permission / elicitation) when no
 * `PromptManager` entry was registered locally.
 *
 * Registration only happens in the CLI TUI (`src/cli/app.tsx`). When the
 * runtime is driven by a JSON-RPC SDK consumer (e.g. `copilot --server
 * --stdio`) the TUI doesn't run, so the `pending` map stays empty and MC
 * steer responses for in-flight prompts would otherwise be silently
 * dropped at `debug` level.
 *
 * Each `findXByPromptId` accepts a `promptId` that matches either the
 * host `requestId` or the stored `toolCallId` (mirroring the TUI's
 * `promptId = toolCallId ?? requestId` contract). They return:
 * - `string` (requestId) — match found, dispatch via the matching
 *   `respondToX`.
 * - `"already-resolved"` — the entry was drained recently and is in the
 *   tombstone window (race-loser; classify as `already-resolved`, not
 *   `not-found`, to avoid steady-state warning spam).
 * - `undefined` — no matching pending request.
 */
declare interface RemotePromptFallback {
    findUserInputRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    findElicitationRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    findExitPlanModeRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    findPermissionByPromptId(promptId: string): {
        requestId: string;
        promptRequest: PermissionPromptRequest;
    } | "already-resolved" | undefined;
    respondToUserInput(requestId: string, response: {
        answer: string;
        wasFreeform: boolean;
        dismissed?: boolean;
    }): boolean;
    tryRespondToElicitation(requestId: string, response: ElicitResult): boolean;
    respondToExitPlanMode(requestId: string, response: ExitPlanModeResponse): boolean;
    respondToPermission(requestId: string, response: PermissionPromptResponse): boolean;
}

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;
    /** Deadline at which a CLI remote session becomes stale without further heartbeats. */
    readonly staleAt?: Date;
    /** Server-side task state returned by GitHub. */
    readonly state?: string;
}

/**
 * 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";

declare const reply_to_comment: (config: ToolConfig, logger: RunnerLogger) => Tool_2;

declare const REPLY_TO_COMMENT_TOOL_NAME = "reply_to_comment";

declare type ReplyToCommentInput = z_2.infer<typeof replyToCommentInputSchema>;

declare const replyToCommentInputSchema: z_2.ZodObject<{
    reply: z_2.ZodString;
    comment_id: z_2.ZodUnion<[z_2.ZodNumber, z_2.ZodString]>;
}, "strip", z_2.ZodTypeAny, {
    comment_id: string | number;
    reply: string;
}, {
    comment_id: string | number;
    reply: string;
}>;

/**
 * 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";

declare const report_progress: (config: ToolConfig, settings: RuntimeSettings, logger: RunnerLogger, exec: RunnerExec) => Tool_2;

declare const REPORT_PROGRESS_ONLY_PUSH_FEATURE_FLAG = "sweagentd_report_progress_only_push";

declare const REPORT_PROGRESS_TOOL_NAME = "report_progress";

declare interface ReportIntentInput {
    intent: string;
}

declare const reportIntentTool: Tool_2;

declare const ReportIntentToolName = "report_intent";

declare type ReportProgressInput = z_2.infer<typeof reportProgressInputSchema>;

declare const reportProgressInputSchema: z_2.ZodObject<{
    commitMessage: z_2.ZodString;
    prDescription: z_2.ZodString;
}, "strip", z_2.ZodTypeAny, {
    prDescription: string;
    commitMessage: string;
}, {
    prDescription: string;
    commitMessage: string;
}>;

declare const reportProgressLegacyToolDescription = "Report progress on the task. Call when you complete a meaningful unit of work. Commits and pushes changes that are pending in the repo, then updates the PR description.\n* Use only when you have meaningful progress to report (you need to update the plan in the checklist, you have code changes to commit, or you have completed a new item in the checklist)\n* Use markdown checklists to show progress (- [x] for completed items, - [ ] for pending items).\n* Keep the checklist structure as consistent as you can between updates, while still being accurate and useful.\n* Only include the checklist in the prDescription, DO NOT include any headers, a summary, or any other information besides the checklist.\n* If there are changes in the repo this tool will run `git add .`, `git commit -m <msg>`, and `git push`.";

declare const reportProgressPushOnlyToolDescription = "Report progress on the task. Call when you complete a meaningful unit of work. Updates the PR description and shares progress for code already committed locally.\n* Use only when you have meaningful progress to report (you need to update the plan in the checklist, you have code progress to share, or you have completed a new item in the checklist)\n* Use markdown checklists to show progress (- [x] for completed items, - [ ] for pending items).\n* Keep the checklist structure as consistent as you can between updates, while still being accurate and useful.\n* Only include the checklist in the prDescription, DO NOT include any headers, a summary, or any other information besides the checklist.";

declare type RepoVisibility = PublicRepo | PrivateRepo;

/**
 * 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>;

/**
 * Function type for requesting user input from the UI.
 * Returns a promise that resolves when the user responds.
 */
declare type RequestUserInputFn = (request: AskUserRequest) => Promise<AskUserResponse>;

/**
 * Resolve a GitHub token into a full AuthInfo by calling `fetchCopilotUser`.
 * This mirrors the logic used by `trySdkTokenLogin` but is extracted as a
 * standalone function for per-session auth in SDK server mode.
 *
 * Server-to-server tokens (`ghs_`) and OpenShell proxy resolver placeholders
 * are short-circuited: `fetchCopilotUser` would 403 for `ghs_` tokens, and
 * placeholder tokens are not authenticated until rewritten at the HTTP
 * transport layer. In both cases a synthetic `CopilotUserResponse` is built
 * from the host via {@link buildS2SCopilotUser}.
 *
 * @param token A GitHub token (PAT, fine-grained, OAuth, server-to-server, or OpenShell placeholder).
 * @param host  Optional GitHub host URL. Defaults to `getGithubUri()`.
 * @returns A `TokenAuthInfo` with populated `copilotUser` for the token's identity.
 * @throws GitHubApiError if the token is invalid or the API call fails.
 */
export declare function resolveAuthInfoFromToken(token: string, host?: string): Promise<AuthInfo>;

/**
 * The result of resolving which model (and optional client-option tweaks)
 * to use for an agent invocation.
 */
declare interface ResolvedModel {
    /** The model ID to use (e.g. "claude-sonnet-4.6", "gpt-5.3-codex"). */
    model: string;
    /** Optional client-option overrides layered on top of the model's default config. */
    clientOptionOverrides?: Partial<ClientOptions>;
}

/**
 * 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)
 * @param options Optional env/config/explicit overrides to apply after base resolution
 * @returns Feature flags with boolean values
 */
export declare function resolveFeatureFlags(isStaff: boolean, isExperimental: boolean, isTeam: boolean, options?: FeatureFlagResolutionOptions): FeatureFlags;

declare function resolveFocusedToolPrompts(config: Pick<ToolConfig, "featureFlagService" | "featureFlags">): Promise<boolean>;

/**
 * Resolves whether Anthropic's built-in server-side tool search should be used
 * instead of the client-side `tool_search_tool_regex` implementation.
 *
 * When enabled, the Anthropic API handles tool search via `server_tool_use` /
 * `tool_search_tool_result` blocks — no client-side tool execution is needed.
 * Controlled by the `TOOL_SEARCH_BUILTIN_ANTHROPIC` feature flag / ExP.
 */
declare function resolveIsBuiltinToolSearchEnabled(model: string, featureFlagService: IFeatureFlagService | undefined, featureFlags?: Readonly<Partial<Record<FeatureFlag, boolean>>>): Promise<boolean>;

/**
 * Resolves whether tool search is enabled for the given model, checking
 * the general TOOL_SEARCH override flag plus the model-family-specific
 * ExP flags (TOOL_SEARCH_ANTHROPIC / TOOL_SEARCH_OPENAI).
 *
 * Shared between the main session (getToolsForExecution) and subagent
 * tool preparation (getToolsForTaskAgents in config.ts).
 */
declare function resolveIsToolSearchEnabled(model: string, featureFlagService: IFeatureFlagService | undefined, featureFlags?: Readonly<Partial<Record<FeatureFlag, boolean>>>): Promise<boolean>;

/**
 * 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?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }, {
        src: string;
        theme?: "dark" | "light" | 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;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    size?: number | undefined;
}, {
    type: "resource_link";
    name: string;
    uri: string;
    description?: string | undefined;
    title?: string | undefined;
    mimeType?: string | undefined;
    icons?: {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
    }[] | undefined;
    size?: number | undefined;
}>;

/**
 * An event that is emitted by the `Client` which contains the final response from the LLM.
 */
declare type ResponseEvent = {
    kind: "response";
    turn?: number;
    callId?: string;
    modelCall?: ModelCallParam;
    response: ChatCompletionMessage;
};

declare type ResponsesMessageStatus = "in_progress" | "completed" | "incomplete";

/**
 * Per-call behavior knobs for `LocalSessionManager.getSession` /
 * `getLastSession`. Distinct from `SessionOptions` so CLI-internal
 * policies do not leak into the SDK surface (which exports `SessionOptions`
 * via `./sdk`).
 */
declare interface ResumeBehavior {
    /**
     * Caller-requested suppression of the resume `workspace.yaml` writeback.
     * Set by the CLI for non-interactive resume flows (e.g. `--prompt
     * --resume <id>`, `--continue`, single-session interactive startup)
     * where `cliSessionDefaults()` pinned `workingDirectory` to the
     * launching shell's incidental cwd. Rebinding the persisted record to
     * that incidental cwd would corrupt the saved session.
     *
     * `getSession()` honors this flag for the workspace.yaml writeback
     * ONLY when the resolved `workingDirectory` does not point at the
     * same directory as the persisted cwd (compared via
     * `workingDirectoryMatchesPersistedCwd`, which uses `realpath` so
     * symlinked equivalents still match). When the two match, the
     * writeback is a safe refresh of the persisted record (`cwd` is
     * already at the persisted location, only the live
     * `branch`/`gitRoot`/`repository` are written on top) and the flag
     * is ignored for the writeback gate -- this lets `--continue` from
     * the matching cwd refresh stale git context without needing a
     * separate signal from the CLI.
     *
     * The repo-hooks enqueue gate honors the RAW value of this flag in
     * the `persistedCwdInvalid` override branch (CLI's incidental
     * `workingDirectory` is not a hook-safe override); the cwd-match
     * softening does NOT apply there. Hook safety is a provenance
     * question and is independent from whether the writeback would
     * preserve the persisted record.
     *
     * `-C <dir>` overrides this flag at the call site, since `-C` is an
     * explicit user-expressed binding.
     */
    suppressResumeWorkspaceMetadataWriteback?: boolean;
    /**
     * Pre-loaded `workspace.yaml.cwd` lookup result. When supplied,
     * `getSession` skips its own `loadPersistedSessionCwd` call. Used by
     * `SDKServer.session.resume` to avoid a second `workspace.yaml` read on
     * the cold-load path: the server already loads this info to scope MCP /
     * config discovery, and re-loading inside `getSession` for the same
     * canonical session id is pure waste.
     *
     * Invariant: callers must pre-load using the same canonical session id
     * and effective settings that `getSession` would resolve to. In
     * particular, the lookup should be done AFTER `findSessionByPrefix`
     * canonicalization so the injected info matches the session the
     * resume actually targets.
     */
    persistedCwdInfo?: PersistedSessionCwdInfo;
}

/**
 * Retrieves available models based on availability, policies, and integration
 * including capabilities and billing information, which may be cached from
 * previous calls.
 *
 * Returns two lists derived from the same CAPI response:
 * - `models`: the **session-visible / selectable** list. For OAuth callers this
 *   is the picker subset (`model_picker_enabled: true`). For HMAC callers
 *   (CCA/Actions runtime, which is not user-facing model-picking) this remains
 *   the whole filtered list, preserving prior behavior. This is what virtually
 *   all consumers (the `/model` picker, `--model` validation, custom-agent/SDK
 *   selection) should use.
 * - `unfilteredModels`: the **whole** filtered list (picker-disabled models included),
 *   used for utility-model selection (e.g. `findSmallModel` session naming).
 *   `EXCLUDED_MODELS` and subscription-tier filtering still apply; only picker
 *   and policy filtering are omitted.
 *
 * Both lists are in order of preference to be the default model for new sessions
 * where the first model is the most preferred. They 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, options?: {
    skipCache?: boolean;
}): Promise<{
    models: Model[];
    unfilteredModels: Model[];
    copilotUrl: string | undefined;
    quotaSnapshots?: QuotaSnapshotsByType;
}>;

/**
 * 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;
};

declare interface RunnerExec {
    /**
     * Exec a command.
     * Output will be streamed to the live console.
     * Arguments included in filteredCmdArgs will be replaced by REDACTED in privacy-sensitive output.
     * For example, if args is ["notPrivate", "private1", "notPrivate", "private2"] then filteredCmdArgs should be ["private1", "private2"]
     * Returns promise with return code
     *
     * @param     commandLine        command to execute (can include additional args). Must be correctly escaped.
     * @param     args               optional arguments for tool. Escaping is handled by the lib.
     * @param     options            optional exec options.  See RunnerExecOptions
     * @param     filteredCmdArgs    values that occur in the args array and which should be hidden for privacy reasons.
     * @returns   Promise<number>    exit code
     */
    exec(commandLine: string, args?: string[], options?: RunnerExecOptions, filteredCmdArgs?: string[]): Promise<number>;
    /**
     * Exec a command and get the output.
     * Output will be streamed to the live console.
     * Arguments included in filteredCmdArgs will be replaced by REDACTED in privacy-sensitive output.
     * For example, if args is ["notPrivate", "private1", "notPrivate", "private2"] then filteredCmdArgs should be ["private1", "private2"]
     * Returns promise with the exit code and collected stdout and stderr
     *
     * @param     commandLine           command to execute (can include additional args). Must be correctly escaped.
     * @param     args                  optional arguments for tool. Escaping is handled by the lib.
     * @param     options               optional exec options.  See RunnerExecOptions
     * @param     filteredCmdArgs       values that occur in the args array and which should be hidden for privacy reasons.
     * @returns   Promise<RunnerExecOutput>   exit code, stdout, and stderr
     */
    execReturn(commandLine: string, args?: string[], options?: RunnerExecOptions, filteredCmdArgs?: string[]): Promise<RunnerExecOutput>;
}

/**
 * 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;
    /**
     * Returns true if a message at the given level would be written by this logger
     * (i.e. the configured log level is at least as verbose as `level`). Use this
     * to short-circuit expensive message construction (e.g. JSON.stringify of a
     * large request body) at debug-only call sites.
     *
     * Optional for backwards compatibility with SDK consumers implementing this
     * interface. Call sites should fall back to `true` (log) when not implemented:
     * `logger.shouldLog?.(LogLevel.Debug) ?? true`. Built-in loggers (BaseLogger
     * subclasses, CompoundLogger) always implement it.
     */
    shouldLog?(level: LogLevel): boolean;
    /**
     * 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>;
    agentId: z.ZodOptional<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, {
    type: "sampling.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "sampling.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}>;

/** 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>;
    agentId: z.ZodOptional<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, {
    type: "sampling.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}, {
    type: "sampling.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}>;

/**
 * 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">;

/**
 * MCP stdio transport that spawns the server through the MXC sandbox.
 *
 * Subclasses the SDK's `StdioClientTransport` and overrides only `start()` /
 * `close()`: spawn goes through `spawnSandboxedScript` (mxc-sdk's native
 * sandbox primitive) instead of `cross-spawn`, and `close()` walks the
 * process tree because our wrapper makes the actual MCP server a grandchild
 * of `bash -c` / `pwsh -Command`. The SDK's send/pid/stderr/onmessage
 * lifecycle is inherited unchanged.
 */
declare class SandboxedStdioClientTransport extends StdioClientTransport {
    private readonly sandboxParams;
    constructor(sandboxParams: SandboxedStdioParameters);
    start(): Promise<void>;
    close(): Promise<void>;
}

declare interface SandboxedStdioParameters {
    command: string;
    args: readonly string[];
    env: NodeJS.ProcessEnv;
    cwd?: string;
    stderr?: Writable;
    sandboxConfig: SandboxConfig;
}

/**
 * Core callback logic for scanning files for secrets.
 * Shared by the MCP tool wrapper in runtime-tools.
 */
declare function scanSecrets(input: SecretScanningInput, settings: RuntimeSettings, logger: RunnerLogger, repoLocation: string): Promise<ToolResult>;

/** Options for {@link ScheduleApi.add}, {@link ScheduleApi.addCron}, and {@link ScheduleApi.addAt}. */
declare interface ScheduleAddOptions {
    /** Whether the schedule re-arms after each tick. Defaults to `true`. */
    recurring?: boolean;
    /**
     * Optional user-facing label shown in the timeline instead of the actual
     * prompt. See {@link ScheduleEntry.displayPrompt}.
     */
    displayPrompt?: string;
    /**
     * IANA timezone for evaluating a cron schedule (e.g. "Europe/Prague").
     * Only meaningful for {@link ScheduleApi.addCron}; defaults to the host's
     * timezone.
     */
    tz?: string;
}

/**
 * Narrow interface for tools that need to inspect or manage schedules
 * without depending on the full ScheduleRegistry implementation.
 */
declare interface ScheduleApi {
    /** Snapshot of the currently active entries. */
    list(): ScheduleEntry[];
    /** Parse, validate, and register a relative-interval scheduled prompt (e.g. "5m"). */
    add(interval: string, prompt: string, options?: ScheduleAddOptions): {
        entry: ScheduleEntry;
    } | {
        error: string;
    };
    /** Validate and register a recurring calendar (cron) scheduled prompt. */
    addCron(cron: string, prompt: string, options?: ScheduleAddOptions): {
        entry: ScheduleEntry;
    } | {
        error: string;
    };
    /** Register a one-shot scheduled prompt that fires at an absolute time (epoch millis). */
    addAt(at: number, prompt: string, options?: ScheduleAddOptions): {
        entry: ScheduleEntry;
    } | {
        error: string;
    };
    /** Stop a schedule by id. Returns the removed entry, or undefined if not found. */
    stop(id: number): ScheduleEntry | undefined;
}

/** Payload persisted for a created schedule. Exactly one of `intervalMs`/`cron`/`at` is set. */
declare interface ScheduleCreatedData {
    id: number;
    intervalMs?: number;
    cron?: string;
    tz?: string;
    at?: number;
    prompt: string;
    recurring: boolean;
    displayPrompt?: string;
}

/**
 * A single scheduled prompt entry.
 *
 * Exactly one schedule kind is set: {@link intervalMs} (relative interval),
 * {@link cron} (recurring calendar), or {@link at} (one-shot absolute time).
 */
declare interface ScheduleEntry {
    /** Sequential id within the session, starting at 1. Stable across resumes. */
    readonly id: number;
    /** Interval between ticks in milliseconds. Set for relative-interval schedules. */
    readonly intervalMs?: number;
    /** Recurring calendar expression (5-field cron), evaluated in {@link tz}. */
    readonly cron?: string;
    /** IANA timezone the {@link cron} is evaluated in (e.g. "Europe/Prague"). */
    readonly tz?: string;
    /** One-shot absolute fire time, epoch millis. Set for calendar `/after` schedules. */
    readonly at?: number;
    /** The prompt text that gets enqueued on every tick. */
    readonly prompt: string;
    /** Whether the schedule re-arms after each tick (`/every`) or fires once (`/after`). */
    readonly recurring: boolean;
    /**
     * Optional user-facing label shown in the timeline instead of {@link prompt}.
     * Used when the prompt is a model-facing expansion of a slash command (e.g.
     * a skill invocation), so the user sees `/skill-name` rather than the
     * verbose "Use the skill tool…" instruction.
     */
    readonly displayPrompt?: string;
    /**
     * Epoch milliseconds at which the next tick is scheduled to fire. Updated
     * each time the registry arms a new timer. While a tick is in flight (the
     * timer has expired but the prompt is still being delivered) this stays
     * at the previous value, so callers should clamp `nextRunAt - Date.now()`
     * to a non-negative number when displaying a countdown.
     */
    readonly nextRunAt: number;
}

/** Narrowed payload of the events the registry subscribes to. */
declare type ScheduleHostEventPayload<T> = Extract<SessionEvent, {
    type: T;
}>;

/**
 * Tracks per-session scheduled prompts and the timers that fire them.
 * Backs `/every` (recurring) and `/after` (one-shot).
 *
 * Lifetime is tied to the session: the registry subscribes to the session's
 * `session.shutdown` event and disposes itself there. A `Session` that owns a
 * registry should let the shutdown wiring drive cleanup; explicit `dispose()`
 * is only needed when an external owner recreates the registry.
 *
 * Schedule changes are persisted as `session.schedule_created` and
 * `session.schedule_cancelled` events. On construction the registry walks past
 * events, rebuilds the active set, and resumes the cadence — the next tick
 * of each surviving schedule waits for its full interval rather than firing
 * immediately on resume.
 */
declare class ScheduleRegistry implements ScheduleApi {
    private readonly host;
    private readonly entries;
    private readonly unsubscribeShutdown;
    private nextId;
    private disposed;
    constructor(host: ScheduleRegistryHost);
    /**
     * Parse interval, validate, and register a new relative-interval prompt.
     * The first tick fires after the interval has elapsed (not immediately).
     *
     * When `recurring` is true (default) the schedule re-arms after every
     * tick. When false the prompt fires once and is automatically removed.
     */
    add(interval: string, prompt: string, options?: ScheduleAddOptions): {
        entry: ScheduleEntry;
    } | {
        error: string;
    };
    /**
     * Validate and register a recurring calendar (cron) prompt. The cron is
     * evaluated in `options.tz` (defaulting to the host timezone), and the
     * first tick fires at the next matching occurrence.
     */
    addCron(cron: string, prompt: string, options?: ScheduleAddOptions): {
        entry: ScheduleEntry;
    } | {
        error: string;
    };
    /**
     * Register a one-shot prompt that fires at an absolute time (epoch millis).
     * Used by `/after` with a calendar phrase ("tomorrow at 9am"). A time in
     * the past fires as soon as the timer arms. Defaults to non-recurring.
     */
    addAt(at: number, prompt: string, options?: ScheduleAddOptions): {
        entry: ScheduleEntry;
    } | {
        error: string;
    };
    private assertActive;
    /**
     * Assign an id, persist a `session.schedule_created` event, and arm the
     * first tick. Shared by {@link add}, {@link addCron}, and {@link addAt}.
     */
    private register;
    /** Snapshot of the currently active entries, ordered by id. */
    list(): ScheduleEntry[];
    /** Stop a single entry by id. Returns the removed entry, or undefined. */
    stop(id: number): ScheduleEntry | undefined;
    /** Stop everything and unsubscribe from session events. Idempotent. */
    dispose(): void;
    private cancelAll;
    private cancelScheduled;
    /**
     * Walk past `session.schedule_*` events to rebuild the active set, seed
     * the id sequence, and start timers. On resume each surviving schedule is
     * re-armed for its next *future* fire: an interval waits its full period,
     * a cron jumps to its next occurrence, and a one-shot calendar fire targets
     * its absolute instant (firing immediately if already due).
     *
     * Called explicitly by Session when its event log is ready (e.g.
     * after a resume replay). Safe to call multiple times: clears any
     * existing entries and timers before rebuilding.
     */
    hydrate(): void;
    /**
     * Insert the entry into the active map and arm its first tick.
     * `nextRunAt` is set inside {@link scheduleNextTick}, which is the single
     * source of truth for that field — both new and rehydrated schedules go
     * through the same arming path.
     */
    private scheduleEntry;
    /**
     * Compute the entry's next fire time and arm its timer. Each tick
     * reschedules itself only after the previous prompt has been delivered
     * into the conversation, so a slow agent turn can never cause overlapping
     * ticks for the same schedule to pile up in the queue.
     *
     * `nextRunAt` is recomputed from the wall clock on every arm via
     * {@link computeNextRunAt}, so interval schedules advance by their period,
     * cron schedules jump to their next occurrence, and one-shot calendar
     * schedules target their absolute instant. There is no catch-up: a missed
     * occurrence is never backfilled — the next *future* fire is always used.
     */
    private scheduleNextTick;
    /**
     * Arm a `setTimeout` for the entry's `nextRunAt`, clamping the delay to
     * {@link MAX_TIMER_MS} so a far-future fire (e.g. a yearly cron) doesn't
     * exceed Node's timer ceiling. If the timer wakes before the real fire
     * time — because the delay was clamped, or the wall clock jumped back — it
     * re-arms instead of firing. This keeps long and calendar schedules robust
     * to sleep and clock changes.
     */
    private armTimer;
    private runTick;
    /**
     * Send the entry's prompt and resolve when the matching `user.message`
     * lands. Correlation is by id via `source: schedule-<id>`, so two
     * scheduled entries with the same prompt text — or a manually-typed
     * prompt that looks identical — never collapse the no-overlap guarantee.
     *
     * Rejects if `Session.send` itself fails (e.g. validation error).
     * `runTick` swallows the rejection and reschedules anyway, so a transient
     * send failure won't kill the schedule.
     *
     * The listener is tracked on the `ScheduledEntry` so that
     * `cancelScheduled` can unsubscribe it if the entry is stopped while a
     * tick is in flight, preventing listener leaks.
     */
    private sendAndAwaitDelivery;
}

/**
 * Narrow structural target the registry needs from the owning session. Lets
 * tests substitute a fake session without depending on the full Session class.
 */
declare interface ScheduleRegistryHost {
    emit(type: "session.schedule_created", data: ScheduleCreatedData): void;
    emit(type: "session.schedule_cancelled", data: {
        id: number;
    }): void;
    /**
     * Dispatch a prompt onto the session. The registry only awaits delivery
     * via the `user.message` event listener, so the return value is unused
     * (left as `unknown` to accept both `Session.send` and any schema-shaped
     * wrapper).
     */
    send(options: SendParams): unknown;
    on(type: "session.shutdown", listener: (event: ScheduleHostEventPayload<"session.shutdown">) => void): Unsubscribe;
    on(type: "user.message", listener: (event: ScheduleHostEventPayload<"user.message">) => void): Unsubscribe;
    getEvents(): readonly SessionEvent[];
}

/**
 * Session metadata with its relevance score for display grouping.
 */
declare interface ScoredSessionMetadata<T extends SessionMetadata = SessionMetadata> {
    session: T;
    score: 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>;
    agentId: z.ZodOptional<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, {
    type: "commands.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "commands.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}>;

/**
 * A single FTS5 search result.
 */
declare interface SearchResult {
    session_id: string;
    source_type: string;
    content: string;
    rank: number;
}

/** Tool name used for the secret scanning MCP tool. */
declare const SECRET_SCANNING_TOOL_NAME = "secret_scanning";

declare type SecretScanningInput = z_2.infer<typeof secretScanningInputSchema>;

declare const secretScanningInputSchema: z_2.ZodObject<{
    paths: z_2.ZodArray<z_2.ZodString, "many">;
}, "strip", z_2.ZodTypeAny, {
    paths: string[];
}, {
    paths: string[];
}>;

declare const secretScanningToolDescription: 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>>;

/**
 * Product label combining integrity and confidentiality dimensions.
 * Operations are component-wise.
 */
declare class SecurityLabel implements Lattice<SecurityLabel> {
    readonly integrity: IntegrityLabel;
    readonly confidentiality: ConfidentialityLabel;
    constructor(integrity: IntegrityLabel, confidentiality: ConfidentialityLabel);
    static default(): SecurityLabel;
    leq(other: SecurityLabel): boolean;
    join(other: SecurityLabel): SecurityLabel;
    meet(other: SecurityLabel): SecurityLabel;
    equals(other: SecurityLabel): boolean;
    toString(): string;
    toJSON(): {
        integrity: string;
        confidentiality: 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, {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    }, {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "selection";
    displayName: string;
    selection: {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    };
    filePath: string;
    text: string;
}, {
    type: "selection";
    displayName: string;
    selection: {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    };
    filePath: string;
    text: string;
}>;

declare type SendInboxEntryInput = {
    recipientSessionId: string;
    senderId: string;
    senderName: string;
    senderType: string;
    interactionId: string;
    summary: string;
    content: string;
};

/** Callback that encapsulates per-launch inbox publishing state (send count, freshness, inbox write). */
declare type SendInboxPublisher = (input: {
    summary: string;
    content: string;
}) => Promise<SendInboxResult>;

declare type SendInboxResult = {
    status: "published" | "rejected";
    entryId?: string;
    reason?: string;
};

export declare interface SendOptions {
    prompt: string;
    /** If provided, this is shown in the timeline instead of prompt */
    displayPrompt?: string;
    attachments?: Attachment[];
    mode?: "enqueue" | "immediate";
    /**
     * 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.
     * - `` `schedule-${id}` ``: tick from a scheduled prompt with the given registry id (e.g. `/every`).
     */
    source?: "system" | `command-${string}` | `schedule-${number}`;
    /** 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>;
    /**
     * Marks the message as "passive" — its presence alone must not start,
     * continue, or restart the agent loop. Passive messages are delivered
     * opportunistically (bundled into model calls that are already going to
     * happen) and otherwise either deferred to the next user-driven turn
     * (`wait-for-next-turn`) or discarded (`drop`).
     *
     * Default `false` preserves existing waking behavior.
     */
    passive?: PassivePolicy;
}

/** Inferred type for {@link sendParamsSchema}, suitable for use as a
 *  parameter type on the impl method `Session.sendForSchema`. */
declare type SendParams = z_2.infer<typeof sendParamsSchema>;

/**
 * Public-facing parameters for {@link sessionApiSchema.send}. Mirrors the
 * fields of the runtime's internal `SendOptions` that are appropriate for SDK
 * consumers; runtime-only fields (`notificationKind`) are deliberately omitted
 * from the schema and remain available to internal callers via the full
 * `SendOptions` type.
 */
declare const sendParamsSchema: z_2.ZodObject<{
    prompt: z_2.ZodString;
    displayPrompt: z_2.ZodOptional<z_2.ZodString>;
    attachments: z_2.ZodOptional<z_2.ZodArray<z_2.ZodDiscriminatedUnion<"type", [z_2.ZodObject<{
        type: z_2.ZodLiteral<"file">;
        path: z_2.ZodString;
        displayName: z_2.ZodString;
        lineRange: z_2.ZodOptional<z_2.ZodObject<{
            start: z_2.ZodNumber;
            end: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            start: number;
            end: number;
        }, {
            start: number;
            end: number;
        }>>;
    }, "strip", z_2.ZodTypeAny, {
        path: string;
        type: "file";
        displayName: string;
        lineRange?: {
            start: number;
            end: number;
        } | undefined;
    }, {
        path: string;
        type: "file";
        displayName: string;
        lineRange?: {
            start: number;
            end: number;
        } | undefined;
    }>, z_2.ZodObject<{
        type: z_2.ZodLiteral<"directory">;
        path: z_2.ZodString;
        displayName: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        path: string;
        type: "directory";
        displayName: string;
    }, {
        path: string;
        type: "directory";
        displayName: string;
    }>, z_2.ZodObject<{
        type: z_2.ZodLiteral<"selection">;
        filePath: z_2.ZodString;
        displayName: z_2.ZodString;
        text: z_2.ZodString;
        selection: z_2.ZodObject<{
            start: z_2.ZodObject<{
                line: z_2.ZodNumber;
                character: z_2.ZodNumber;
            }, "strip", z_2.ZodTypeAny, {
                line: number;
                character: number;
            }, {
                line: number;
                character: number;
            }>;
            end: z_2.ZodObject<{
                line: z_2.ZodNumber;
                character: z_2.ZodNumber;
            }, "strip", z_2.ZodTypeAny, {
                line: number;
                character: number;
            }, {
                line: number;
                character: number;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            start: {
                line: number;
                character: number;
            };
            end: {
                line: number;
                character: number;
            };
        }, {
            start: {
                line: number;
                character: number;
            };
            end: {
                line: number;
                character: number;
            };
        }>;
    }, "strip", z_2.ZodTypeAny, {
        type: "selection";
        displayName: string;
        selection: {
            start: {
                line: number;
                character: number;
            };
            end: {
                line: number;
                character: number;
            };
        };
        filePath: string;
        text: string;
    }, {
        type: "selection";
        displayName: string;
        selection: {
            start: {
                line: number;
                character: number;
            };
            end: {
                line: number;
                character: number;
            };
        };
        filePath: string;
        text: string;
    }>, z_2.ZodObject<{
        type: z_2.ZodLiteral<"github_reference">;
        number: z_2.ZodNumber;
        title: z_2.ZodString;
        referenceType: z_2.ZodEnum<["issue", "pr", "discussion"]>;
        state: z_2.ZodString;
        url: z_2.ZodString;
    }, "strip", z_2.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_2.ZodObject<{
        type: z_2.ZodLiteral<"blob">;
        data: z_2.ZodString;
        mimeType: z_2.ZodString;
        displayName: z_2.ZodOptional<z_2.ZodString>;
    }, "strip", z_2.ZodTypeAny, {
        type: "blob";
        data: string;
        mimeType: string;
        displayName?: string | undefined;
    }, {
        type: "blob";
        data: string;
        mimeType: string;
        displayName?: string | undefined;
    }>, z_2.ZodObject<{
        type: z_2.ZodLiteral<"extension_context">;
        extensionId: z_2.ZodString;
        canvasId: z_2.ZodOptional<z_2.ZodString>;
        instanceId: z_2.ZodOptional<z_2.ZodString>;
        title: z_2.ZodString;
        payload: z_2.ZodUnknown;
        capturedAt: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        type: "extension_context";
        title: string;
        extensionId: string;
        capturedAt: string;
        instanceId?: string | undefined;
        canvasId?: string | undefined;
        payload?: unknown;
    }, {
        type: "extension_context";
        title: string;
        extensionId: string;
        capturedAt: string;
        instanceId?: string | undefined;
        canvasId?: string | undefined;
        payload?: unknown;
    }>]>, "many">>;
    mode: z_2.ZodOptional<z_2.ZodEnum<["enqueue", "immediate"]>>;
    prepend: z_2.ZodOptional<z_2.ZodBoolean>;
    billable: z_2.ZodOptional<z_2.ZodBoolean>;
    requiredTool: z_2.ZodOptional<z_2.ZodString>;
    source: z_2.ZodOptional<z_2.ZodString>;
    agentMode: z_2.ZodOptional<z_2.ZodEnum<["interactive", "plan", "autopilot", "shell"]>>;
    requestHeaders: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
    traceparent: z_2.ZodOptional<z_2.ZodString>;
    tracestate: z_2.ZodOptional<z_2.ZodString>;
    wait: z_2.ZodOptional<z_2.ZodBoolean>;
}, "strip", z_2.ZodTypeAny, {
    prompt: string;
    source?: string | undefined;
    mode?: "enqueue" | "immediate" | undefined;
    prepend?: boolean | undefined;
    displayPrompt?: string | undefined;
    attachments?: ({
        path: string;
        type: "file";
        displayName: string;
        lineRange?: {
            start: number;
            end: number;
        } | undefined;
    } | {
        path: string;
        type: "directory";
        displayName: string;
    } | {
        type: "selection";
        displayName: string;
        selection: {
            start: {
                line: number;
                character: number;
            };
            end: {
                line: number;
                character: number;
            };
        };
        filePath: string;
        text: string;
    } | {
        number: number;
        type: "github_reference";
        url: string;
        state: string;
        title: string;
        referenceType: "pr" | "issue" | "discussion";
    } | {
        type: "blob";
        data: string;
        mimeType: string;
        displayName?: string | undefined;
    } | {
        type: "extension_context";
        title: string;
        extensionId: string;
        capturedAt: string;
        instanceId?: string | undefined;
        canvasId?: string | undefined;
        payload?: unknown;
    })[] | undefined;
    agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
    traceparent?: string | undefined;
    tracestate?: string | undefined;
    requestHeaders?: Record<string, string> | undefined;
    billable?: boolean | undefined;
    requiredTool?: string | undefined;
    wait?: boolean | undefined;
}, {
    prompt: string;
    source?: string | undefined;
    mode?: "enqueue" | "immediate" | undefined;
    prepend?: boolean | undefined;
    displayPrompt?: string | undefined;
    attachments?: ({
        path: string;
        type: "file";
        displayName: string;
        lineRange?: {
            start: number;
            end: number;
        } | undefined;
    } | {
        path: string;
        type: "directory";
        displayName: string;
    } | {
        type: "selection";
        displayName: string;
        selection: {
            start: {
                line: number;
                character: number;
            };
            end: {
                line: number;
                character: number;
            };
        };
        filePath: string;
        text: string;
    } | {
        number: number;
        type: "github_reference";
        url: string;
        state: string;
        title: string;
        referenceType: "pr" | "issue" | "discussion";
    } | {
        type: "blob";
        data: string;
        mimeType: string;
        displayName?: string | undefined;
    } | {
        type: "extension_context";
        title: string;
        extensionId: string;
        capturedAt: string;
        instanceId?: string | undefined;
        canvasId?: string | undefined;
        payload?: unknown;
    })[] | undefined;
    agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
    traceparent?: string | undefined;
    tracestate?: string | undefined;
    requestHeaders?: Record<string, string> | undefined;
    billable?: boolean | undefined;
    requiredTool?: string | undefined;
    wait?: boolean | undefined;
}>;

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;
    stderrDetail?: string;
} | {
    status: "needs-auth";
};

/**
 * Abstract base class for sessions.
 *
 * The runtime conformance of this class to {@link sessionApiSchema} is
 * verified at test time by `test/core/sharedApi/sessionSchemaImplValidation.test.ts`,
 * which walks every leaf in the schema and asserts that the resolved impl
 * member exists on `LocalSession.prototype`. Compile-time enforcement via
 * `implements ApiSchemaToImplementation<typeof sessionApiSchema>` was removed
 * because the inferred type for the schema literal exceeds TypeScript's
 * TS7056 declaration-emit limit (the schema has 30+ namespaces of deeply
 * nested Zod types). Per-namespace conformance is still enforced statically
 * via the typed factory return on each `readonly X = sessionXApi(this)`
 * assignment below.
 */
declare abstract class Session<SM extends SessionMetadata = SessionMetadata> {
    /**
     * Discriminates local vs remote sessions without requiring `instanceof`
     * checks against the runtime classes. CLI and other consumers should
     * branch on this field rather than importing `LocalSession` /
     * `RemoteSession` (which are runtime internals).
     */
    abstract readonly isRemote: boolean;
    /**
     * Hook for subclasses to replace a session API namespace with an alternate
     * implementation. The default returns the local factory result unchanged;
     * `RemoteSession` overrides this to substitute a Proxy that routes calls
     * through Mission Control RPC for namespaces listed in
     * `REMOTE_API_NAMESPACES`.
     *
     * Called from this class's field initializers via virtual dispatch, so the
     * most-derived override decides whether to build the local factory at all.
     * Pass a thunk for `localFactory` so subclasses can skip building a local
     * implementation they don't need.
     *
     * Subclass overrides must not access subclass instance fields here: those
     * fields aren't initialised yet when the base class's field initializers
     * run. Lazy closures over `this` (resolved later, on method call) are fine.
     */
    protected resolveSessionApi<T>(_name: string, localFactory: () => T): T;
    readonly auth: SessionAuthApi;
    readonly canvas: SessionCanvasRuntimeApi;
    readonly model: SessionModelApi;
    readonly mode: SessionModeApi;
    readonly name: SessionNameApi;
    readonly plan: SessionPlanApi;
    readonly workspaces: SessionWorkspaceApi;
    readonly instructions: SessionInstructionsApi;
    readonly fleet: SessionFleetApi;
    readonly agent: SessionAgentApi;
    readonly skills: SessionSkillsApi;
    readonly mcp: SessionMcpApi & {
        oauth: SessionMcpOauthApi;
        apps: SessionMcpAppsApi;
    };
    readonly plugins: SessionPluginsApi;
    readonly options: SessionOptionsApi;
    readonly lsp: SessionLspApi;
    readonly extensions: SessionExtensionsApi;
    readonly tasks: SessionTasksApi;
    readonly tools: SessionToolsApi;
    readonly commands: SessionCommandsApi;
    readonly telemetry: SessionTelemetryApi;
    readonly ui: SessionUiApi;
    readonly permissions: SessionPermissionsApi;
    readonly log: SessionLogApi["log"];
    readonly metadata: SessionMetadataApi;
    readonly history: SessionHistoryApi;
    readonly queue: SessionQueueApi;
    readonly eventLog: SessionEventsApi;
    readonly usage: SessionUsageApi;
    protected disposeCanvas(): void;
    private remoteDelegate;
    readonly remote: SessionRemoteApi;
    /**
     * Internal: installs a remote-steering delegate on an existing session.
     * Used by SDK server paths that obtain a session via construction first
     * and need to wire the delegate after the fact (e.g., the preloaded
     * `--resume=<id>` flow). Construction-time injection via
     * `SessionOptions.remoteDelegate` is preferred for fresh sessions.
     */
    setRemoteDelegate(delegate: SessionRemoteDelegate): void;
    readonly schedule: SessionScheduleApi;
    /**
     * Per-session schedule registry. Owns timer state for `/every` and any
     * future scheduling primitives. Always created so the schema's
     * `session.schedule.{list,add,stop}` methods work without a separate gate;
     * the `manage_schedule` tool exposure is gated by
     * {@link SessionOptions.manageScheduleEnabled} instead.
     *
     * Constructor-body assigned (not field-initialized) so the registry's
     * shutdown subscription wires onto a fully-initialized event-handler map.
     */
    readonly scheduleRegistry: ScheduleRegistry;
    private shellNotifier;
    readonly shell: ShellApi;
    /**
     * Internal: installs a shell-output notifier on an existing session.
     * Used by SDK server paths that obtain a session via construction first
     * and need to wire the notifier after the fact (e.g., the in-memory
     * SESSION_RESUME path for active/foreground/preloaded sessions, where
     * the resumed session was constructed before the resuming connection's
     * SHELL_OUTPUT/SHELL_EXIT notification sender existed).
     * Construction-time injection via {@link SessionOptions.shellNotifier} is
     * preferred for fresh sessions.
     */
    setShellNotifier(notifier: ShellNotificationSender): void;
    /** Optional permission service for centralized permission handling.
     *  SDK sessions lazily initialize a session-owned service via ensurePermissionService().
     *  Frontends configure it via configurePermissionService() and observe its
     *  prompts via the `permission.requested` session event. */
    protected _permissionService: PermissionService | undefined;
    protected _permissionServiceInitPromise: Promise<PermissionService> | undefined;
    protected permissionServiceOptions: {
        approveAllToolPermissionRequests: boolean;
        approveAllReadPermissionRequests?: boolean;
        rules: {
            approved: ReadonlyArray<Rule>;
            denied: ReadonlyArray<Rule>;
        };
        pathManager?: PathManager;
        urlManager?: UrlManager;
    };
    private allowAllPermissionOverride;
    /** Whether the session may emit permission.requested events and await a user response. */
    protected permissionRequestEventsEnabled: boolean;
    /** Configure how a lazily created session-owned permission service should behave. */
    configurePermissionService(options: {
        approveAllToolPermissionRequests?: boolean;
        approveAllReadPermissionRequests?: boolean;
        rules?: {
            approved: ReadonlyArray<Rule>;
            denied: ReadonlyArray<Rule>;
        };
        pathManager?: PathManager;
        urlManager?: UrlManager;
    }): void;
    getPathManager(): Promise<PathManager>;
    setAllowAllPermissions(enabled: boolean, source?: AllowAllSource): Promise<void>;
    /**
     * Emit `session.permissions_changed` only if the aggregate `isAllowAllPermissionsActive()`
     * value transitioned. No-op when the call did not change effective state (e.g. re-enabling
     * an already-enabled allow-all). Mirrors the transition-only emit pattern of the
     * `currentMode` setter above.
     *
     * Caveat: only `setAllowAllPermissions` funnels through this helper today. Other callers
     * that mutate `approveAllToolPermissionRequests` directly (e.g. `configurePermissionService`,
     * `sessionPermissionsApi.setApproveAll`) bypass the event. A future pass will route all
     * allow-all writers through canonical setters that emit on transition.
     */
    private emitPermissionsChangedIfTransitioned;
    isAllowAllPermissionsActive(): boolean;
    /** Called when a permission prompt is actually shown. Overridden by LocalSession to fire hooks. */
    notifyPermissionPrompt(_message: string): void;
    /** Ensure the SDK-facing permission service exists for this session. */
    ensurePermissionService(): Promise<PermissionService>;
    /** Get the permission service if one has been configured for this session. */
    getPermissionService(): PermissionService | undefined;
    /**
     * 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: (options?: {
        force?: boolean;
    }) => Promise<void>): void;
    /**
     * Optional callback registered by {@link LocalSessionManager} that re-loads user, plugin,
     * and (optionally) repo hooks for this session and applies them via `updateOptions`. Used
     * by {@link sessionPluginsApi}.reload so SDK-driven plugin install/uninstall reflects
     * immediately in the active session's hook set. Remote sessions and tests can leave it
     * unset — `reloadPluginHooks` becomes a no-op.
     */
    private _pluginHookReloader?;
    /**
     * Register the plugin-hook reloader used by `session.plugins.reload`. Called by the
     * session manager (typically {@link LocalSessionManager}) once after session creation /
     * resume so subsequent SDK reload calls can refresh hooks without round-tripping through
     * the manager-level `sessions.reloadPluginHooks` RPC.
     */
    setPluginHookReloader(cb: (deferRepoHooks?: boolean) => Promise<void>): void;
    /**
     * Re-load user, plugin, and (optionally) repo hooks for this session and apply them.
     * No-op when no reloader has been registered (e.g. remote sessions or test doubles).
     */
    reloadPluginHooks(deferRepoHooks?: boolean): Promise<void>;
    /** Flush any pending writes to disk. No-op if no flush callback is registered. */
    flushPendingWrites(options?: {
        force?: boolean;
    }): 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);
    /**
     * Change the session mode. Subclasses override this to propagate the
     * change to a remote peer (in addition to applying it locally). Callers
     * should prefer this over assigning to `currentMode` directly when the
     * change originates from a user/SDK action that should also reach a
     * connected remote peer.
     */
    changeMode(mode: SessionMode): void;
    /** Tracks the current user-message turn number for turn-scoped session state. */
    protected currentTurn: number;
    /** Dedupes root assistant.intent emissions within a single turn. */
    protected lastEmittedIntent: {
        intent: string;
        turn: number;
    } | undefined;
    readonly sessionId: string;
    /**
     * The session ID of a "parent" interactive session that spawned this
     * session (e.g., a detached headless rem-agent run launched on
     * shutdown). When set, telemetry from this session is reported under
     * the parent's session_id so all activity rolls up as part of the
     * same user-perceived session, while persistence still uses this
     * session's own sessionId.
     */
    readonly detachedFromSpawningParentSessionId?: string;
    readonly startTime: Date;
    readonly modifiedTime: Date;
    readonly summary?: string;
    /** Friendly name provided at session creation via `--name`, threaded to workspace init. */
    protected _initialName?: string;
    /** The user-provided session name (set via `--name`), available immediately without waiting for workspace init. */
    get initialName(): string | undefined;
    /** 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 host git operations are enabled for this session */
    get hostGitOperationsEnabled(): boolean;
    /** Find the git root, returning a not-found result when host git operations are disabled. */
    protected findGitRoot(): Promise<GitRootResult>;
    /** Whether this session was already in use by another client at start/resume time */
    alreadyInUse: boolean;
    /** Whether the main agent turn is currently active. */
    isAgentTurnActive(): boolean;
    /**
     * True when this session is acting as a subagent of another session.
     *
     * Subagents are an implementation detail: their lifecycle is observed via
     * `subagent.started` / `subagent.completed` / `subagent.failed` on the
     * parent, not via session-level events or hooks. Callers should use this
     * predicate to skip emitting session-lifecycle events (`session.start`,
     * `session.shutdown`) and firing session-lifecycle hooks (`sessionStart`,
     * `sessionEnd`) for subagent sessions.
     */
    isSubagentSession(): boolean;
    /**
     * Get the per-session schedule registry, lazily creating it on first
     * access. Used by `/every` and the `manage_schedule` tool to share a
     * single set of timers per session. The registry auto-disposes on
     * `session.shutdown`.
     */
    getScheduleRegistry(): ScheduleRegistry;
    /**
     * Get the per-session autopilot objective registry, lazily creating it on first access.
     * Used by `/autopilot <objective>` and objective-aware autopilot continuation.
     */
    getAutopilotObjectiveRegistry(): AutopilotObjectiveRegistry;
    /** Token limits for the currently selected model, including custom-provider and capability overrides when present. */
    getTokenLimits(): {
        promptTokenLimit?: number;
        contextWindowTokens?: number;
        outputTokenLimit?: number;
    };
    /** 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[];
    /** Diagnostics (warnings/errors) emitted during the most recent skill load. */
    getLastSkillLoadDiagnostics(): {
        warnings: string[];
        errors: string[];
    };
    /**
     * 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>;
    /** True iff plugins were configured via marketplace, --plugin-dir, or pluginDirectories. */
    private hasInstalledPlugins;
    /**
     * `enableConfigDiscovery` and explicit plugins both unlock the custom-agent discovery
     * path. Centralizing the rule keeps the three gate sites (constructor, ensureAgentsLoaded,
     * reloadCustomAgents) consistent and removes the double-negative at each call site.
     */
    private shouldDiscoverCustomAgents;
    /**
     * Public read accessor for `enableConfigDiscovery`. The SDK resume path needs to
     * detect a discovery true → false transition before `updateOptions` mutates the
     * flag so it can fire `reloadPluginHooks` for the now-filtered ambient plugins.
     * Also used by shared plugin APIs (e.g. `session.plugins.reload`) to decide whether
     * they may pull ambient global configuration into this session; sessions created with
     * discovery disabled (subagents, isolated SDK sessions) keep only their explicit set.
     */
    isConfigDiscoveryEnabled(): boolean;
    /**
     * 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?: MCPServersConfig["mcpServers"][string]["source"];
        error?: string;
        transport?: "stdio" | "http" | "sse" | "memory";
        pluginName?: string;
        pluginVersion?: 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>;
    /**
     * Build the event-based handler options (elicitation, sampling, OAuth) for McpHost.
     *
     * Elicitation is gated on `supportsElicitation()` (checks the session capability set)
     * rather than `hasEventListeners()`, because in the SDK path the wildcard event forwarder
     * handles event dispatch without registering per-type listeners.
     *
     * Sampling is gated on `hasEventListeners()` since it is only
     * wired in the CLI path which registers explicit listeners.
     *
     * OAuth delegates to `buildMcpOAuthHandler()` which uses an event-based
     * handler when listeners are registered and falls back to browserless
     * OAuth otherwise.
     */
    protected getMcpEventHandlers(): Pick<McpHostOptions, "elicitationHandler" | "samplingHandler" | "onOAuthRequired" | "mcpAppsEnabled">;
    /**
     * Whether this session supports MCP Apps (SEP-1865) UI passthrough.
     * Combined with the MCP_APPS feature flag inside {@link MCPRegistry} —
     * the capability gates per client type, the flag gates rollout.
     */
    supportsMcpApps(): boolean;
    /**
     * Host context exposed to MCP App guests on `ui/initialize` (SEP-1865).
     * SDK consumers can set this to advertise theme, locale, or other
     * host-specific metadata to the guest UI; renderers read it via
     * `mcp.apps.getHostContext` when building the `ui/initialize` response.
     */
    private mcpAppsHostContext;
    /** Replace the host context returned to MCP App guests on `ui/initialize`. */
    setMcpAppsHostContext(context: HostContext): void;
    /** Read the current host context. */
    getMcpAppsHostContext(): HostContext;
    /**
     * List MCP App–visible tools from a connected server (SEP-1865).
     *
     * Returns tools whose `_meta.ui.visibility` is unset (default `["model","app"]`)
     * or includes `"app"`. Use this to populate the tool list a rendered MCP App
     * is allowed to call back into. Requires the `mcp-apps` session capability.
     *
     * @param serverName - MCP server hosting the tools.
     * @param options.originServerName - **Required.** Name of the server whose
     *   `ui://` view issued the request. Per SEP-1865 ("callable by the app from
     *   this server only"), an app MUST only list tools on its own server. The
     *   call is rejected when `originServerName !== serverName`, and rejected
     *   outright when this field is missing — the host MUST pass it for every
     *   request that originates from an iframe view.
     */
    listMcpAppTools(serverName: string, options: {
        originServerName: string;
    }): Promise<{
        tools: unknown[];
    }>;
    /**
     * Call an MCP tool from an MCP App view (SEP-1865).
     *
     * Enforces `_meta.ui.visibility`: tools that explicitly exclude `"app"` are
     * rejected. Spec-default visibility is `["model","app"]`, so tools without
     * an explicit visibility array are callable from the app side. This is the
     * security boundary that prevents a rendered iframe from invoking
     * model-only tools. Requires the `mcp-apps` session capability.
     *
     * @param options.originServerName - **Required.** Name of the server whose
     *   `ui://` view issued the request. Per SEP-1865 ("callable by the app from
     *   this server only"), an app MUST only call tools on its own server. The
     *   call is rejected when `originServerName !== serverName`, and rejected
     *   outright when this field is missing — the host MUST pass it for every
     *   request that originates from an iframe view.
     */
    callMcpAppTool(serverName: string, toolName: string, args: Record<string, unknown> | undefined, options: {
        originServerName: string;
    }): Promise<unknown>;
    /**
     * Fetch an MCP resource (typically a `ui://` MCP App bundle) from a connected server.
     * Wraps the underlying `Client.readResource` so SDK consumers can pull resolved
     * UI bundles on demand without going through the HTTP `/mcp-app/resources/read`
     * proxy endpoint. Errors are surfaced via {@link formatError}.
     *
     * Requires the `mcp-apps` session capability.
     */
    readMcpResource(serverName: string, uri: string): Promise<{
        contents: Array<{
            uri: string;
            mimeType?: string;
            text?: string;
            blob?: string;
            _meta?: Record<string, unknown>;
        }>;
    }>;
    /**
     * Diagnose MCP Apps wiring for a specific server. Used by SDK consumers
     * to figure out why interactive UIs aren't appearing — distinguishes
     * "runtime didn't advertise the extension" from "server didn't include
     * `_meta.ui`" from "session lacks the capability".
     *
     * Unlike the rest of the MCP-Apps API surface, this method does NOT
     * require the `mcp-apps` session capability: its whole purpose is to
     * surface the capability state via `sessionHasMcpApps`, so guarding on
     * the capability would make the most informative failure case
     * unreachable. Lazy-loads the MCP host so it works immediately after
     * `session.create` without needing a user message first; when the host
     * cannot be initialized (e.g. no MCP servers configured) the method
     * returns `server.connected: false` rather than throwing.
     */
    diagnoseMcpApps(serverName: string): Promise<{
        capability: {
            sessionHasMcpApps: boolean;
            featureFlagEnabled: boolean;
            advertised: boolean;
        };
        server: {
            connected: boolean;
            toolCount: number;
            toolsWithUiMeta: number;
            sampleToolNames: string[];
        };
    }>;
    /**
     * Reload MCP servers with the given 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).
     */
    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;
    protected setOnServerStatusChanged(host: McpHost): void;
    /** Wire the MCP host's user-abort notification to the session's abort flow. */
    protected setAbortCallback(host: McpHost): void;
    /**
     * Hook invoked when a built-in MCP server requests a user-initiated abort
     * (e.g. computer-use escape). Subclasses override to drop queued work so
     * the abort fully stops the session, not just the current turn.
     */
    protected onUserAbort(): void;
    /** 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 _systemContextMessages: ChatCompletionMessageParam[];
    protected _selectedModel: string | undefined;
    private lastEffectiveModelForHistoryRewrite;
    protected originalUserMessages: string[];
    /** Skills invoked during this session, for preservation across compaction */
    protected invokedSkills: InvokedSkillInfo[];
    /**
     * Per-tool-call message source map populated when assistant.message events
     * are processed (carrying tool_calls) and consumed when the corresponding
     * tool.execution_complete pushes a `role: "tool"` message. Used by the
     * `/usage` attribution path to recognize MCP tool results and sub-agent
     * task results without re-parsing tool arguments.
     */
    private _messageSourceByToolCallId;
    /**
     * Maps toolCallId -> command string for user-requested shell commands.
     * Populated from `tool.user_requested` events so that when `tool.execution_complete`
     * fires, we can inject a user message with the command and its output.
     */
    private _userRequestedCommandByToolCallId;
    /**
     * Maps skill name -> plugin name, populated from `skill.invoked` events so
     * the subsequent skill-injected `user.message` (which only carries a
     * `skill-<name>` source string) can recover the plugin attribution.
     */
    private _skillPluginByName;
    private compactionCheckpointLength;
    private compactionCheckpointMessageRef;
    private compactionCheckpointEventIndex;
    private eventProcessingQueue;
    private processUserRequestedShellContextPartForLlm;
    private eventHandlers;
    private wildcardEventHandlers;
    private usageMetricsTracker;
    protected integrationId: string;
    protected availableTools?: string[];
    protected excludedTools?: string[];
    protected toolFilterPrecedence?: ToolFilterPrecedence;
    protected defaultAgentExcludedTools?: string[];
    protected enableScriptSafety?: boolean;
    protected suppressToolChangedNotice?: boolean;
    protected parentWorkspacePath?: string;
    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;
    protected turnActive: boolean;
    /** Resolver for OTel trace context on MCP tool calls. Provided at construction by the session manager. */
    protected _mcpTraceContextResolver?: TraceContextResolver;
    /**
     * Resolver for OTel parent trace context propagation. Invoked from
     * {@link sendForSchema} so the runtime's OTel lifecycle can attach (or
     * clear) the W3C trace context for the upcoming agent turn. The
     * session manager provides this when the session is created or resumed.
     * Always invoked unconditionally, including when both args are undefined,
     * so prior trace context is cleared rather than inherited.
     */
    protected _otelParentContextResolver?: (traceparent: string | undefined, tracestate: string | undefined) => void;
    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[];
    /** Custom agents explicitly supplied via session options; these are not reloadable discovery cache entries. */
    protected providedCustomAgents?: SweCustomAgent[];
    protected selectedCustomAgent?: SweCustomAgent;
    protected customAgentsLocalOnly: boolean;
    /** When true, skip injecting the selected custom agent's prompt into the user message. */
    protected suppressCustomAgentPrompt: boolean;
    protected instructionDirectories?: string[];
    protected organizationCustomInstructions?: string;
    protected skipCustomInstructions: boolean;
    protected skipEmbeddingRetrieval: boolean;
    protected embeddingCacheStorage: "persistent" | "in-memory";
    protected dynamicInstructionState: DynamicInstructionState;
    protected disabledInstructionSources?: ReadonlySet<string>;
    protected coauthorEnabled?: boolean;
    protected systemMessageConfig?: SystemMessageConfig;
    protected sectionTransformFn?: SectionTransformFn;
    protected workingDir: string;
    protected featureFlags?: FeatureFlags;
    protected featureFlagService: IFeatureFlagService;
    private ownedFeatureFlagService?;
    protected coreServices: CoreServices;
    protected interactionType: "conversation-agent" | "conversation-subagent";
    protected subAgentDepth: number;
    /**
     * Per-invocation agent id (typically the dispatching task tool's `toolCallId`)
     * when this session represents a subagent invocation. Undefined on outer
     * sessions. Distinct from `sessionId` (which identifies the CLI session as a
     * whole and is shared by all subagent invocations under the same root).
     *
     * Used to surface the per-invocation id on hook payloads via
     * `this.agentId ?? this.sessionId`, preserving the existing hook contract
     * after the McpHost/CAPI/OAuth consumers were moved to read the root
     * `sessionId` directly.
     */
    protected readonly agentId?: string;
    protected ifcEngine?: IFCEngine;
    protected skillDirectories?: string[];
    protected enableConfigDiscovery: boolean;
    protected enableOnDemandInstructionDiscovery: boolean;
    private _hostGitOperationsEnabled;
    protected enableSkills?: boolean;
    protected disabledSkills?: Set<string>;
    protected disabledMcpServers?: string[];
    protected _loadedSkills: Skill[];
    protected _skillsLoaded: boolean;
    protected _skillsLoadingPromise?: Promise<void>;
    /** Diagnostics from the most recent skill load (mutated alongside `_loadedSkills`). */
    private _lastSkillLoadDiagnostics;
    /** Bumped by clearLoadedSkills so in-flight loads with a stale generation discard their results. */
    private _skillsGeneration;
    protected _agentsLoadingPromise?: Promise<void>;
    private _reloadAvailableModels?;
    protected _mcpLoadingPromise?: Promise<void>;
    /**
     * Tracks an in-flight MCP restart kicked off by a sandbox toggle in
     * `updateOptions()`. The next turn (`initializeMcpHost()`) awaits this so
     * MCP tools aren't loaded against stdio servers running under a stale
     * sandbox policy.
     */
    protected _pendingSandboxRestart?: Promise<void>;
    protected installedPlugins?: InstalledPlugin[];
    protected _pluginInstructionSourcesPromise?: Promise<InstructionSource[]>;
    protected askUserDisabled?: boolean;
    protected onExitPlanMode?: (request: ExitPlanModeRequest) => Promise<ExitPlanModeResponse>;
    private _directAutoModeSwitchHandlerCount;
    private _autopilotObjectiveRegistry?;
    protected requestedTools?: string[];
    protected deferredToolLoading?: boolean;
    protected extensionController?: ExtensionController;
    /**
     * Whether the `manage_schedule` tool is exposed to the agent. Mirrors
     * {@link SessionOptions.manageScheduleEnabled}. The schedule registry
     * itself is always present so schema callers can list/add/stop entries
     * regardless of this flag; this field only gates tool exposure.
     */
    protected manageScheduleEnabled: boolean;
    protected agentContext?: AgentContext;
    protected sessionTelemetry?: DisposableTelemetrySender;
    protected userMessageSentimentTelemetry?: UserMessageSentimentTelemetry;
    protected runningInInteractiveMode?: boolean;
    protected sessionCapabilities?: Set<SessionCapability>;
    protected additionalContentExclusionPolicies?: ContentExclusionApiResponse[];
    /** Handler that delegates permission requests to a parent session. */
    protected permissionRequestHandler?: (request: PermissionRequest) => Promise<PermissionRequestResult>;
    /** 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;
    /**
     * Sets (or clears) this session's content exclusion service.
     *
     * The service owns a native runtime handle that must be released deterministically,
     * so holders are tracked with retain/dispose refcounting: the creator owns the
     * service (`ownsService = true`, refcount starts at 1) and subagents that inherit it
     * borrow it (`ownsService = false`, bumping the refcount via `retain()`). Replacing or
     * clearing the service releases this holder's reference; the underlying handle is only
     * disposed once the last holder releases it.
     *
     * Note: a replaced/cleared service is deliberately NOT invalidated. Subagents that
     * borrowed it keep using their snapshot (with rules intact) even after the parent
     * reconfigures and creates a fresh service — preserving the original shared-reference
     * semantics rather than poisoning still-live borrowers.
     */
    protected setContentExclusionService(service: ContentExclusionService | undefined, ownsService: boolean): void;
    protected trajectoryFile?: string;
    protected eventsLogDirectory?: string;
    protected transcriptPath?: string;
    /** Virtual filesystem for session-scoped storage (events, workspace, temp files). */
    readonly sessionFs: SessionFs;
    /** Per-session MCP OAuth token/registration store. */
    readonly mcpOAuthStore: MCPOAuthStoreInterface;
    protected authInfo?: AuthInfo;
    protected copilotUrl?: string;
    protected provider?: ProviderConfig;
    /** Auto-mode session manager; provided by `coreServices.autoModeManager` and used to resolve the virtual `"auto"` model selection. */
    protected autoModeManager: AutoModeSessionManager;
    protected modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
    protected contextTier?: ContextTier;
    protected reasoningEffort?: ReasoningEffortOption;
    protected reasoningSummary?: ReasoningSummary;
    protected enableStreaming: boolean;
    protected continueOnAutoMode: boolean;
    protected continueOnAutoModeSettingsLoaded: boolean;
    protected handoffContext?: string;
    protected externalToolDefinitions?: ExternalToolDefinition[];
    /** Bumped when externalToolDefinitions changes, used by refreshTools to detect mid-turn changes */
    protected externalToolsVersion: number;
    /** Bumped on every MCP `tools/list_changed` notification so refreshTools can detect mid-turn changes (#7432) */
    protected mcpToolsVersion: number;
    protected clientName?: string;
    protected clientKind?: SessionClientKind;
    /**
     * Creation-time snapshot of the raw option fields a runtime-spawned
     * remote session inherits from its foreground parent. Runtime-internal;
     * exposed via {@link getSpawnInheritableOptions}. Not part of the wire schema.
     */
    private readonly spawnInheritableOptions;
    protected largeOutputConfig?: LargeToolOutputConfig;
    protected runtimeSettings?: RuntimeSettings;
    protected configDir?: string;
    protected repositoryName?: string;
    protected workspaceContext?: WorkspaceContextInfo;
    readonly taskRegistry: TaskRegistry;
    /** Shell tool context owned by this session, created lazily during tool init. */
    protected shellContext: InteractiveShellToolContext | undefined;
    /** True when shellContext is inherited from a parent session (subagent). Prevents dispose from killing shared shells. */
    protected inheritedShellContext: boolean;
    /** True when sessionFs is inherited from a parent session (subagent). Prevents dispose from closing shared database. */
    protected inheritedSessionFs: boolean;
    /** Inherited sendInboxPublisher for sidekick child sessions. */
    protected sendInboxPublisher?: SendInboxPublisher;
    /** Parent agent task ID for CAPI X-Parent-Agent-Id header. */
    protected parentAgentTaskId?: string;
    /** Set by SessionAgentExecutor when the subagent fails, read by bridge shutdown handler. */
    subagentFailed: boolean;
    /** Error message when subagentFailed is true. */
    subagentError?: string;
    /**
     * Callback set by `createSubagentSession` bridge to emit `subagent.completed` or
     * `subagent.failed` on the parent session. Called by `SessionAgentExecutor.teardown()`
     * as a more reliable alternative to relying on the `session.shutdown` event chain
     * (which can be silently swallowed if `Session.shutdown()` throws during token counting).
     */
    notifySubagentComplete?: () => void;
    protected getSessionShellContext(): SessionShellContext | undefined;
    private _currentSystemMessageContent?;
    private _currentSystemMessageFlat?;
    private _currentCustomInstructionsMessage?;
    private _currentToolMetadata?;
    protected currentNonExternalToolMetadata?: ToolMetadata[];
    protected currentTools?: Tool_2[];
    /** Tools resolved during the last initializeAndValidateTools() call.
     * Used by getInitializedTools() for subagent prompt assembly.
     * Separate from currentTools to avoid interfering with tools_changed_notice
     * detection (which compares currentTools across send() calls). */
    protected initializedTools?: readonly Tool_2[];
    protected previousModelUsed?: string;
    private _currentToolDefinitions?;
    private _currentSystemMessageObj?;
    protected get currentSystemMessage(): string | undefined;
    protected get currentSystemMessageContent(): SystemMessageContent | undefined;
    protected set currentSystemMessage(value: string | undefined);
    /**
     * Sets the current system message from either a plain string (legacy
     * single-block form) or a structured SystemMessageContent (preserves the
     * static/per-user split for cache-shaped compaction calls). The flat
     * string and the wrapped object identity used by
     * getPromptContextMessagesSnapshot are derived lazily from this value.
     */
    protected setCurrentSystemMessageContent(value: SystemMessageContent | undefined): void;
    protected set currentCustomInstructionsMessage(value: string | undefined);
    protected get currentToolMetadata(): ToolMetadata[] | undefined;
    protected set currentToolMetadata(value: ToolMetadata[] | undefined);
    /** Cached model list from CAPI. Inherited by child sessions via createSubagentSession. */
    protected modelListCache: Model[] | undefined;
    /** Get the cached model list (session-scoped CAPI models, if populated). */
    getModelListCache(): readonly Model[] | undefined;
    /** Pre-populate the model list cache (used by createSubagentSession to share parent's model list). */
    setModelListCache(models: Model[]): void;
    protected readonly pendingRequests: PendingRequestStore;
    /**
     * Tracks per-event-type "interest" registrations from out-of-process
     * consumers (SDK clients) and in-process facades that subscribe via the
     * event-log long-poll. These registrations don't appear as listeners on
     * the EventEmitter itself (subscribers get events via the persisted log),
     * so {@link hasEventListeners} ORs them with the EventEmitter listener
     * count to decide which behavior path to take.
     *
     * Counts are per event type; handles map back to their event type so
     * removal is O(1). Both the maps live on the abstract base because every
     * subclass shares the same hasEventListeners semantics.
     */
    private readonly _interestCounts;
    private readonly _interestHandles;
    private _interestHandleCounter;
    /** Register an "interest" in `eventType`. Returns an opaque handle. */
    addEventInterest(eventType: string): {
        handle: string;
    };
    /** Release a previously registered interest. Idempotent. */
    removeEventInterest(handle: string): void;
    /** Check whether any typed handlers are registered for a specific event type. */
    protected hasEventListeners(eventType: string): boolean;
    /**
     * Build the MCP OAuth handler passed to `McpHost`.
     *
     * When a consumer subscribes to `mcp.oauth_required`, delegate the full
     * interactive flow to them. Otherwise install a browserless fallback
     * that silently reuses cached tokens from the shared OAuth store — so a
     * server whose tokens are still valid connects immediately instead of
     * round-tripping through `needs-auth`. When the fallback finds no
     * cached tokens it throws `MCPOAuthBrowserRequiredError`, which the
     * processor converts to `needs-auth` for the caller to drive
     * interactively (via `session.mcp.oauth.login` or `/mcp auth`).
     */
    protected buildMcpOAuthHandler(): NonNullable<McpHostOptions["onOAuthRequired"]>;
    /** Respond to a pending permission request by its ID. Returns true if the response was accepted. */
    respondToPermission(requestId: string, result: PermissionPromptResponse): boolean;
    private requestToolPermissionFromUser;
    private requestPathPermissionFromUser;
    private requestUrlPermissionFromUser;
    /**
     * Evaluates permissionRequest hooks without falling through to any permission flow.
     * Returns a result if hooks produce a decision, or null to let the caller
     * fall through to its own routing (PermissionService, callback, or PendingRequestStore).
     */
    protected evaluatePermissionHooks(permissionRequest: PermissionRequest): Promise<PermissionRequestResult | null>;
    /**
     * Requests permission with hook pre-evaluation, then falls through to
     * the session-owned PermissionService. Used by callers that are NOT already inside the
     * `buildSettingsAndTools` permission block (which runs hooks itself).
     *
     * Callers that have already evaluated hooks should use
     * `requestPermissionDirect()` to avoid running hooks twice.
     */
    requestPermissionWithHooks(permissionRequest: PermissionRequest): Promise<PermissionRequestResult>;
    /**
     * Requests permission via the session-owned PermissionService without running hooks.
     * Use when hooks have already been evaluated by the caller (e.g. the
     * `buildSettingsAndTools` permission block, where hooks already ran).
     */
    requestPermissionDirect(permissionRequest: PermissionRequest): Promise<PermissionRequestResult>;
    /** Respond to a pending user input request by its ID. Returns true if the request was still pending. */
    respondToUserInput(requestId: string, response: {
        answer: string;
        wasFreeform: boolean;
        dismissed?: boolean;
    }): boolean;
    /**
     * Look up a pending user-input request by Mission Control `promptId`.
     * Used by `PromptManager` to drive Mission Control responses when no
     * host-side prompt entry was registered (e.g. SDK-consumer model).
     */
    findUserInputRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    /** Look up a pending elicitation request by Mission Control `promptId`. */
    findElicitationRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    /** Look up a pending exit-plan-mode request by Mission Control `promptId`. */
    findExitPlanModeRequestIdByPromptId(promptId: string): (string & {}) | "already-resolved" | undefined;
    /** Look up a pending permission request by Mission Control `promptId`. */
    findPermissionByPromptId(promptId: string): {
        requestId: string;
        promptRequest: PermissionPromptRequest;
    } | "already-resolved" | undefined;
    /**
     * Exposes this session as a {@link RemotePromptFallback} for
     * `PromptManager` to call when no local TUI-registered prompt exists
     * for a Mission Control steer response. See
     * `src/core/sharedApi/remoteExportContracts.ts` for the contract.
     */
    get promptFallback(): RemotePromptFallback;
    /** Respond to a pending auto-mode switch request by its ID. Returns true if the request was still pending. */
    respondToAutoModeSwitch(requestId: string, response: AutoModeSwitchResponse): boolean;
    /**
     * Public entry point for requesting a permission check.
     * Routes through permission hooks first, then falls back to the
     * interactive permission prompt (or rule-based decision).
     */
    requestPermission(permissionRequest: PermissionRequest): Promise<PermissionRequestResult>;
    /**
     * 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. Returns true if the request was still pending. */
    respondToSampling(requestId: string, response?: CreateMessageResultWithTools): boolean;
    /**
     * 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;
        grantType?: "client_credentials";
    }, redirectPort?: number): 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;
    supportsCanvasRenderer(): 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): boolean;
    /** Reject a pending external tool request (e.g., on dispatch failure). */
    rejectExternalTool(requestId: string, error: Error): boolean;
    private hasRecordedPermissionRequest;
    private hasRecordedPermissionCompletion;
    private findRecordedPermissionToolCallId;
    private hasRecordedExternalToolRequest;
    private hasRecordedExternalToolCompletion;
    protected refreshPendingResumeOrphans(): OrphanedToolResumeInfo[] | undefined;
    protected loadPendingResumeOrphans(): OrphanedToolResumeInfo[] | undefined;
    protected takeResumePermissionResult(toolCallId: string): PermissionRequestResult | undefined;
    protected hasResumePermissionResult(toolCallId: string): boolean;
    private takeResumeExternalToolCompletion;
    private findExternalToolCallId;
    private findPendingExternalToolCallId;
    protected enqueueResumePendingWake(): void;
    private wakeResumePendingWork;
    /**
     * Block until an external permission or tool response changes orphan state.
     *
     * Used by the continuation loop when `_continuePendingWork` is true: instead of
     * deferring and returning early, the loop awaits this promise so that
     * `isProcessing` stays true and user sends are naturally queued.
     *
     * Resolves when `notifyOrphanResolution()` is called (from `respondToPermission`
     * or `respondToExternalTool`) or when the abort signal fires.
     */
    protected waitForOrphanResolution(): Promise<void>;
    /** Wake up the continuation loop blocked in `waitForOrphanResolution()`. */
    protected notifyOrphanResolution(): void;
    /**
     * Respond to a pending queued command request by its ID. Returns true
     * when a pending entry was found and resolved; false when the request
     * was already resolved, cancelled, or unknown.
     */
    respondToQueuedCommand(requestId: string, result: QueuedCommandResult): boolean;
    /** 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. Returns true if the request was still pending (and was resolved by this call), false if the request ID was unknown or already resolved. */
    respondToExitPlanMode(requestId: string, response: ExitPlanModeResponse): boolean;
    /**
     * 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;
    /**
     * Whether a direct (in-process) auto-mode-switch handler is active.
     * When true, the server bridge must NOT independently dispatch the request
     * to remote clients — the in-process handler will respond and a remote
     * dispatch would race for the same requestId.
     */
    hasDirectAutoModeSwitchHandler(): boolean;
    /**
     * Register an in-process handler for auto-mode-switch requests. The caller
     * still attaches the actual listener via `session.on("auto_mode_switch.requested", ...)`;
     * this counter exists solely so the server bridge knows to skip its own dispatch.
     * Returns an unregister function that must be called when the handler is no
     * longer active (e.g., on React effect cleanup).
     */
    registerDirectAutoModeSwitchHandler(): () => void;
    abstract send(options: SendOptions): Promise<void>;
    abstract abort(params?: {
        reason?: AbortReason;
    }): Promise<void>;
    /**
     * Schema-shaped wrapper for {@link send} invoked by the JSON-RPC
     * dispatcher (see `src/core/sharedApi/sessionApi.ts` and
     * `Session.implMethodName` on the `send` schema entry). The wire
     * contract is fire-and-forget: generate a unique `messageId`,
     * dispatch the agent loop in the background, and return
     * immediately with the messageId. Errors that arise during the
     * loop surface as session events.
     *
     * Lives on the abstract base so EVERY session subclass — both
     * `LocalSession` and the `RemoteSession` family (including
     * `LocalRpcSession`) — can be adapted into a `SessionClient` via
     * `sessionToFacadeApi`. The remote-controller foreground swap in
     * `app.tsx`'s `switchSession` depends on this: without an
     * inherited `sendForSchema`, attaching to a `LocalRpcSession`
     * fails the `typeof source.sendForSchema === "function"` check
     * and the swap silently aborts.
     *
     * Field translation:
     * - `traceparent` / `tracestate` are forwarded to the OTel parent
     *   context resolver (always — including when both are undefined,
     *   so previous trace context is cleared rather than inherited).
     * - Only the public `SendOptions` subset listed in `sendParamsSchema`
     *   is forwarded to {@link send}; runtime-only fields (`source`,
     *   `notificationKind`, `prepend`) are deliberately not derivable
     *   from the schema params.
     * - `billable` defaults to `true` when the caller omits the field;
     *   an explicit `false` is honored.
     */
    sendForSchema(params: SendParams): {
        messageId: string;
    } | Promise<{
        messageId: string;
    }>;
    /**
     * Schema-shaped wrapper for {@link abort} invoked by the JSON-RPC
     * dispatcher. Adapts the `Promise<void>` shape of {@link abort}
     * into the `{success, error?}` shape declared by
     * `sessionApiSchema.abort`, catching errors and returning them
     * in-band rather than throwing. Lives on the abstract base for
     * the same reason as {@link sendForSchema}: remote-controller
     * sessions adapted into `SessionClient` instances need this
     * method to be inheritable.
     */
    abortForSchema(params: {
        reason?: AbortReason;
    }): Promise<{
        success: boolean;
        error?: string;
    }>;
    /**
     * Returns the creation-time snapshot of option fields that a
     * runtime-spawned remote session must inherit from this (foreground)
     * session. Runtime-internal accessor consumed by
     * `LocalSessionManager.spawnRemoteSession`; not part of the wire schema.
     */
    getSpawnInheritableOptions(): SpawnInheritableSessionOptions;
    abstract suspend(): Promise<void>;
    abstract ephemeralQuery(question: string, onChunk: (text: string) => void, abortSignal?: AbortSignal): Promise<string>;
    /**
     * 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>;
    executeUserRequestedShellCommand(command: string, options?: UserRequestedShellCommandOptions): Promise<UserRequestedShellCommandResult>;
    constructor(coreServices: CoreServices, options?: SessionOptions);
    abstract getMetadata(): SM;
    private readonly sessionsApi?;
    getSessionsApi(): SessionsApi | undefined;
    /**
     * 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;
    /**
     * Orphaned tool calls whose durable permission/external-tool state still needs to
     * be consumed or preempted. These are resolved at the start of the next
     * `runAgenticLoop()` call, after tools are built and before model inference starts.
     */
    protected _pendingResumeOrphans: OrphanedToolResumeInfo[] | undefined;
    /** Ensures only one internal resume wake-up item is queued at a time. */
    protected _resumePendingWakeQueued: boolean;
    /**
     * Tracks `toolCallId`s of "approved" orphans that were deferred during
     * a {@link resolveResumeOrphans} pass because the corresponding tool
     * wasn't in the supplied `toolMap` (typically because MCP tools
     * hadn't loaded yet on the early pass). On a subsequent pass where
     * the tool is STILL missing, the orphan is marked interrupted
     * instead of being re-deferred indefinitely — `hasAwaitingResumeOrphans()`
     * does not block on the "approved" state, so without this the
     * runtime could exit with the orphan silently unresolved.
     *
     * Held on `this` rather than on the orphan info itself because
     * {@link refreshPendingResumeOrphans} re-classifies orphans from the
     * event log and would otherwise clobber a per-orphan flag.
     */
    protected readonly _approvedOrphansDeferredForMissingTool: Set<string>;
    /** Pre-recorded permission results consumed while continuing resumable orphans. */
    protected readonly _resumePermissionResultsByToolCallId: Map<string, PermissionRequestResult>;
    /**
     * In-memory external tool completions supplied after resume.
     *
     * We intentionally do not serialize these into the event log. If a caller
     * reconnects after suspend, it must hand the result back to the resumed
     * session, which keeps it here just long enough to continue or preempt.
     */
    protected readonly _resumeExternalToolCompletionsByToolCallId: Map<string, {
        status: "success";
        result: string | objectOutputType<    {
        textResultForLlm: ZodString;
        resultType: ZodEnum<["success", "failure", "timeout", "rejected", "denied"]>;
        error: ZodOptional<ZodString>;
        sessionLog: ZodOptional<ZodString>;
        toolTelemetry: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
        binaryResultsForLlm: ZodOptional<ZodArray<ZodObject<    {
        type: ZodEnum<["image", "resource"]>;
        data: ZodString;
        mimeType: ZodString;
        description: ZodOptional<ZodString>;
        metadata: ZodOptional<ZodRecord<ZodString, ZodUnknown>>;
        }, "strip", ZodTypeAny, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
        }, {
        type: "image" | "resource";
        data: string;
        mimeType: string;
        description?: string | undefined;
        metadata?: Record<string, unknown> | undefined;
        }>, "many">>;
        contents: ZodOptional<ZodArray<ZodUnion<[ZodObject<    {
        type: ZodLiteral<"text">;
        text: ZodString;
        }, "strip", ZodTypeAny, {
        type: "text";
        text: string;
        }, {
        type: "text";
        text: string;
        }>, ZodObject<    {
        type: ZodLiteral<"terminal">;
        text: ZodString;
        exitCode: ZodOptional<ZodNumber>;
        cwd: ZodOptional<ZodString>;
        }, "strip", ZodTypeAny, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
        }, {
        type: "terminal";
        text: string;
        cwd?: string | undefined;
        exitCode?: number | undefined;
        }>, ZodObject<    {
        type: ZodLiteral<"image">;
        data: ZodString;
        mimeType: ZodString;
        }, "strip", ZodTypeAny, {
        type: "image";
        data: string;
        mimeType: string;
        }, {
        type: "image";
        data: string;
        mimeType: string;
        }>, ZodObject<    {
        type: ZodLiteral<"audio">;
        data: ZodString;
        mimeType: ZodString;
        }, "strip", ZodTypeAny, {
        type: "audio";
        data: string;
        mimeType: string;
        }, {
        type: "audio";
        data: string;
        mimeType: string;
        }>, ZodObject<    {
        icons: ZodOptional<ZodArray<ZodObject<    {
        src: ZodString;
        mimeType: ZodOptional<ZodString>;
        sizes: ZodOptional<ZodArray<ZodString, "many">>;
        theme: ZodOptional<ZodEnum<["light", "dark"]>>;
        }, "strip", ZodTypeAny, {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        }, {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        }>, "many">>;
        name: ZodString;
        title: ZodOptional<ZodString>;
        uri: ZodString;
        description: ZodOptional<ZodString>;
        mimeType: ZodOptional<ZodString>;
        size: ZodOptional<ZodNumber>;
        } & {
        type: ZodLiteral<"resource_link">;
        }, "strip", ZodTypeAny, {
        type: "resource_link";
        name: string;
        uri: string;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
        }, {
        type: "resource_link";
        name: string;
        uri: string;
        description?: string | undefined;
        title?: string | undefined;
        mimeType?: string | undefined;
        icons?: {
        src: string;
        theme?: "dark" | "light" | undefined;
        mimeType?: string | undefined;
        sizes?: string[] | undefined;
        }[] | undefined;
        size?: number | undefined;
        }>, ZodObject<    {
        type: ZodLiteral<"resource">;
        resource: ZodUnion<[ZodObject<    {
        uri: ZodString;
        mimeType: ZodOptional<ZodString>;
        text: ZodString;
        }, "strip", ZodTypeAny, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
        }, {
        text: string;
        uri: string;
        mimeType?: string | undefined;
        }>, ZodObject<    {
        uri: ZodString;
        mimeType: ZodOptional<ZodString>;
        blob: ZodString;
        }, "strip", ZodTypeAny, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
        }, {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
        }>]>;
        }, "strip", ZodTypeAny, {
        type: "resource";
        resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
        } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
        };
        }, {
        type: "resource";
        resource: {
        text: string;
        uri: string;
        mimeType?: string | undefined;
        } | {
        blob: string;
        uri: string;
        mimeType?: string | undefined;
        };
        }>]>, "many">>;
        }, ZodTypeAny, "passthrough">;
    } | {
        status: "failure";
        error: string;
    } | {
        status: "cancelled";
        message?: string | undefined;
    }>;
    /**
     * In-memory idempotence guard for external tool completions.
     *
     * Once a request has been answered or preempted in this process, we ignore
     * duplicate late responses. The persisted `external_tool.completed` event
     * carries only the requestId; result data lives in
     * `_resumeExternalToolCompletionsByToolCallId` and must be re-supplied by
     * the SDK consumer after a suspend/resume.
     */
    protected readonly _resolvedExternalToolRequestIds: Set<string>;
    /**
     * When true, the session waits for all orphaned tool calls to reach terminal
     * state before processing user messages after resume. The agentic continuation
     * loop blocks (while keeping `isProcessing=true`) so that user sends are
     * naturally queued via the existing `send()` guard.
     *
     * When false (default), the resume handler immediately marks any orphaned
     * tool calls as interrupted, leaving the resumed session in a clean state
     * indistinguishable from a fresh send. No resume-specific code paths run
     * in `runAgenticLoop` in this mode.
     */
    protected _continuePendingWork: boolean;
    /**
     * Resolve callback for the current `waitForOrphanResolution()` promise.
     * Set while the continuation loop is blocked inside `runAgenticLoop()`,
     * waiting for an external permission or tool response to arrive.
     */
    private _orphanResolutionResolver;
    protected abortController?: AbortController;
    /**
     * When true, `sessionEnd` hooks are NOT fired at the end of each `runAgenticLoop()`.
     * Instead, {@link shutdown} fires them once when the session truly ends, so that
     * interactive sessions (where multiple `send()` calls share one logical session
     * lifetime) don't fire `sessionEnd` after every individual turn.
     */
    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. {@link shutdown} fires them
     * exactly once when the session truly ends and awaits their completion.
     *
     * 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 multiple
     * callers race to fire them. Internal-only: external consumers should call
     * {@link shutdown}, which fires deferred hooks and awaits their completion.
     *
     * @param params.reason - Why the session ended
     * @param params.error - Optional error that caused the session to end. Reserved
     *   for internal callers (e.g., {@link shutdown} forwarding an error reason).
     */
    fireSessionEndHooks(params?: {
        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;
    private _shutdownPromise;
    shutdown(params?: ShutdownParams): Promise<void>;
    protected disposeOwnedFeatureFlagService(): Promise<void>;
    private _performShutdown;
    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 the last concrete model auto-mode resolved to, if any. */
    getAutoModeResolvedModel(): string | undefined;
    /** Returns a snapshot of the current sub-agent concurrency state. */
    getSubAgentLimiterInfo(): SubAgentLimiterInfo | undefined;
    /**
     * 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 capability APIs for focused updates
     * await session.auth.setCredentials({ credentials: newAuthInfo });
     * await session.model.switchTo({ modelId: newModel });
     * ```
     */
    updateOptions(options: Partial<UpdatableSessionOptions>, behavior?: UpdateOptionsBehavior): void;
    isSessionTelemetryEnabled(): boolean;
    /**
     * Returns the current telemetry engagement id, if a SessionTelemetry
     * sender is attached and exposes one. Used by the interactive CLI to
     * forward the parent's engagement id to a detached child (rem-agent
     * on shutdown) via env var so the child's telemetry rolls up under
     * the same engagement.
     */
    getEngagementId(): string | undefined;
    setInternalCorrelationIds(internalCorrelationIds: SessionCorrelationIds | undefined): void;
    /** Returns true when a custom (BYOK) provider is configured for this session. */
    hasCustomProvider(): boolean;
    setTelemetryFeatureOverrides(overrides: Record<string, string>): void;
    /** Set the resolver for OTel trace context propagation on MCP tool calls. */
    setMcpTraceContextResolver(resolver: TraceContextResolver | undefined): void;
    protected createMcpToolCallInterceptor(): McpToolCallInterceptor;
    /**
     * 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 disposeUserMessageSentimentTelemetry(): void;
    /**
     * Get list of available custom agents.
     * Returns the loaded custom agents, or session-provided custom agents while the discovery cache is empty.
     *
     * @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;
    getClientKind(): SessionClientKind | undefined;
    getRunningInInteractiveMode(): boolean | undefined;
    getCopilotUrl(): string | undefined;
    getIntegrationId(): string | undefined;
    /** Core services bundle, used to spin up ephemeral generation sessions (e.g. schedule parsing). */
    getCoreServices(): CoreServices;
    /** Custom (BYOK) provider configuration, when one is set. */
    getProviderConfig(): ProviderConfig | 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 tracked task summaries for this session.
     * Returns a unified array with type discriminator for each task.
     *
     * NOTE: Despite the name, this returns both sync and background tasks.
     * Consider renaming to `getTrackedTasks` (along with the `BackgroundTask`
     * type and `session.background_tasks_changed` event) in a follow-up.
     */
    getBackgroundTasks(): BackgroundTask[];
    /**
     * Whether a tracked task can currently be promoted into background mode.
     */
    canPromoteTaskToBackground(taskId: string): boolean;
    /**
     * Get the currently-promotable sync task, if any.
     */
    getCurrentPromotableTask(): PromotableTask | undefined;
    /**
     * Promote a tracked task into background mode.
     *
     * Returns false for unknown tasks or tasks that are not
     * currently eligible for promotion.
     */
    promoteTaskToBackground(taskId: string): boolean;
    /**
     * Promote the currently-awaited sync task into background mode.
     */
    promoteCurrentTaskToBackground(): BackgroundTask | undefined;
    /**
     * 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[];
    /**
     * Emits a notification that the current tool definitions changed.
     */
    notifyToolDefinitionsChanged(): void;
    protected getExternalToolMetadata(definitions: readonly ExternalToolDefinition[] | undefined): ToolMetadata[];
    private getEnabledExternalToolMetadata;
    protected getValidOverridingExternalToolNames(): Set<string>;
    protected filterToolsForSelectedAgent<T extends ToolMetadata>(allTools: T[]): T[];
    /**
     * Returns the agent-tool spec used by `clearDeferralForAgentTools`: either the
     * selected custom agent, or a synthetic spec derived from `requestedTools`
     * when no custom agent is selected. Returns `undefined` when neither is set.
     */
    protected getAgentToolSpec(): {
        tools?: string[] | null;
        deferredToolLoading?: boolean;
    } | undefined;
    protected composeCurrentToolMetadata(nonExternalToolMetadata: readonly ToolMetadata[], externalToolMetadata: readonly ToolMetadata[]): ToolMetadata[];
    private updateCachedExternalToolMetadata;
    /**
     * 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: ToolMetadata[], model: string) => void): () => void;
    private getToolCallSummary;
    private formatBackgroundToolActivity;
    /**
     * Gets progress information for a background task.
     * For agent tasks, derives progress from session events correlated by agent id or parent tool call id.
     * For shell tasks, reads recent output from the live shell session or detached log.
     *
     * @param task - The background task to get progress for
     * @returns Progress information discriminated by task type
     */
    getBackgroundTaskProgress(task: BackgroundTask): Promise<BackgroundTaskProgress>;
    protected emitAssistantIntent(intent: string): void;
    protected refreshIntentFromSessionSql(toolName: string | undefined, toolArgs: unknown, parentToolCallId?: string): Promise<void>;
    /**
     * Returns a richer timeline of bridged events for a subagent task. Unlike
     * {@link getBackgroundTaskProgress} (which only surfaces tool executions
     * and truncates aggressively for the /tasks list view), this accessor
     * returns one entry per logical event suitable for rendering a full
     * scrollable timeline in the /tasks detail view.
     *
     * Coverage matches the bridge in {@link createSubagentSession} -- only
     * events bridged onto the parent session with `agentId` are visible:
     * - `assistant.message` -> `assistant`
     * - `tool.execution_start` (without matching complete) -> `tool_inflight`
     * - `tool.execution_complete` -> `tool_done` (collapses with prior start)
     * - `skill.invoked` -> `skill`
     * - `subagent.started` / `subagent.completed` / `subagent.failed` -> `lifecycle`
     *
     * Entries from `report_intent` and `hook.start` / `hook.end` are dropped
     * because they are protocol/intent noise rather than user-meaningful work.
     *
     * @param task - The agent task whose timeline to derive.
     * @returns Timeline entries in chronological order.
     */
    getSubagentTimeline(task: AgentTask): SubagentTimelineEntry[];
    /**
     * Cancel a background task by ID.
     * For agents, this cancels the execution.
     * For shell tasks, this stops the running command and marks detached or attached
     * shell tasks cancelled.
     *
     * @param taskId - The task ID (agent ID or shell ID)
     * @returns true if the task was found and cancelled, false otherwise
     */
    cancelBackgroundTask(taskId: string): Promise<boolean>;
    /**
     * Refresh the status of all background tasks.
     * This refreshes detached shell status by checking whether their processes are
     * still running. Agent and attached-shell status changes are pushed directly by
     * their runtime callbacks.
     */
    refreshBackgroundTasks(): Promise<void>;
    /**
     * Remove a finalized background task from tracking.
     * Only removes tasks that are not running (completed, failed, or cancelled).
     *
     * @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;
    /**
     * Returns the cached ToolConfig for this session, if available.
     * Override in subclasses that cache tool configuration.
     */
    protected getToolConfig(): ToolConfig | undefined;
    /**
     * Start a background agent task from the SDK/shared API layer.
     *
     * Delegates to {@link registerBackgroundAgent} which is shared with the
     * task tool, avoiding duplication of agent-launch / multi-turn wiring.
     *
     * @returns The generated agent ID for the background task
     * @throws If tools are not initialized or the agent type / model is invalid
     */
    startSubagent(params: {
        agentType: string;
        prompt: string;
        name: string;
        description?: string;
        model?: string;
    }): Promise<string>;
    /**
     * 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;
    /** Public accessor for the effective runtime settings. Merges session-level
     *  feature flags into the returned settings so downstream consumers (e.g.,
     *  MCP host initialization, OAuth store, capability checks) see a unified
     *  view that includes CLI `--experimental`, env-var, and config overrides
     *  resolved by the FeatureFlagService — not just server-provided flags. */
    resolvedRuntimeSettings(): 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;
    /**
     * Attempts to load a built-in YAML agent by normalized id.
     * Matches against `{name}.agent.yaml` ids and bare `{name}` for convenience.
     * Returns undefined if no matching built-in agent is found.
     */
    private tryLoadBuiltinYamlAgent;
    /**
     * 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.
     * @param options - Optional configuration. `includeSubAgents` (default false for typed handlers) controls whether events from sub-agents are delivered.
     * @returns A function that unsubscribes the handler when called
     */
    on<K extends EventType>(eventType: K, handler: EventHandler<K>, options?: {
        includeSubAgents?: boolean;
    }): () => 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>, agentId?: string): 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>, agentId?: string): string;
    protected emitModelCallFailure(event: ModelCallFailureEvent, source: ModelCallFailureSource, agentId?: string): void;
    /** 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[];
    getInitialEvents(): readonly SessionEvent[];
    /**
     * Returns the tools that were resolved during the last `initializeAndValidateTools()` or `send()` call.
     * Prefers currentTools (from send()) when available, falls back to initializedTools (from
     * initializeAndValidateTools()). Returns an empty array if tools have not been initialized yet.
     */
    getInitializedTools(): readonly Tool_2[];
    /**
     * 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 conversation messages reconstructed from session events.
     * Messages are processed asynchronously in order to handle attachments and ensure consistency.
     * Excludes system/developer prompt snapshots, which are available via getSystemContextMessages().
     *
     * @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 replayable conversation context.
     * Useful for displaying the user/assistant conversation without system/developer prompts.
     *
     * @returns A Promise that resolves to an array of user, assistant, and tool messages
     */
    getChatContextMessages(): Promise<ChatCompletionMessageParam[]>;
    /**
     * Returns the latest system/developer prompt snapshots known to the session.
     * Useful for inspecting the instructions sent to the model without mixing them
     * into the replayed conversation history.
     *
     * @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 the exact custom-instructions prompt section included in the current system message.
     *
     * @returns The rendered custom-instructions section, or undefined when it is unavailable or transformed
     */
    getCurrentCustomInstructionsMessage(): string | undefined;
    private getPromptContextMessagesSnapshot;
    private upsertSystemContextMessage;
    /**
     * 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 context tier selected for this session.
     * "default" uses the lower context window, "long_context" uses the full native window.
     *
     * @returns The context tier, or undefined if not set
     */
    getContextTier(): ContextTier | undefined;
    /**
     * Returns the current reasoning summary mode for this session.
     *
     * @returns The reasoning summary mode, or undefined if not set
     */
    getReasoningSummary(): ReasoningSummary | 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 whether on-demand instruction discovery is enabled for this session.
     *
     * @returns True if on-demand instruction discovery is enabled, false otherwise
     */
    getEnableOnDemandInstructionDiscovery(): 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[]>;
    /** Loads and caches instruction sources derived from installed plugin rules. */
    protected getPluginInstructionSources(): Promise<InstructionSource[]>;
    /**
     * Returns instruction sources discovered dynamically via file access.
     */
    getDynamicInstructionSources(): InstructionSource[];
    /**
     * Returns the raw dynamic instruction state for telemetry aggregation.
     */
    getDynamicInstructionState(): DynamicInstructionState;
    /**
     * 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>;
    /**
     * Auto-update the session summary (display name).
     * Base implementation does nothing - only LocalSession has workspaces.
     * Will not overwrite a manually set name when the LocalSession override runs.
     */
    updateSessionSummary(_summary: string): Promise<void>;
    /**
     * Update workspace metadata (cwd, repo, branch) for this session.
     * Base implementation does nothing - LocalSession overrides.
     */
    updateWorkspaceMetadata(_context: WorkspaceContext, _name?: string): Promise<void>;
    /**
     * List checkpoints with their titles for context injection.
     */
    listCheckpointTitles(): Promise<{
        number: number;
        title: string;
        filename: string;
    }[]>;
    /**
     * Read a specific checkpoint by number.
     * Returns null if checkpoint doesn't exist or workspace is not enabled.
     */
    readCheckpoint(_checkpointNumber: number): Promise<string | null>;
    /**
     * Check if a plan.md file exists in the workspace.
     */
    hasPlan(): Promise<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.
     * Base throws because silently discarding the write would be data loss for SDK callers
     * (e.g. via session.plan.update()) on session kinds without a workspace-backed plan.
     * LocalSession overrides.
     */
    writePlan(_content: string): Promise<void>;
    /**
     * Delete the workspace plan.md file.
     * Base throws because silently no-oping would mask the lack of capability for SDK callers
     * (e.g. via session.plan.delete()). LocalSession overrides.
     */
    deletePlan(): Promise<void>;
    /**
     * Get the absolute file path of the autopilot objective state file.
     * Returns null if workspace storage is not enabled.
     */
    getAutopilotObjectivePath(): string | null;
    /**
     * Read the machine-managed autopilot objective state file.
     * Returns null if no objective file exists or workspace storage is not enabled.
     */
    readAutopilotObjective(): Promise<string | null>;
    /**
     * Write the machine-managed autopilot objective state file.
     */
    writeAutopilotObjective(_content: string): Promise<"create" | "update">;
    /**
     * Delete the machine-managed autopilot objective state file.
     */
    deleteAutopilotObjective(): Promise<boolean>;
    /**
     * Check if the machine-managed autopilot objective state file exists.
     */
    autopilotObjectiveExists(): Promise<boolean>;
    /**
     * 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>;
    /**
     * Get the per-session WorkspaceManager, if available.
     * Returns null when workspace features are not enabled (e.g. non-infinite sessions, CCA runtime).
     */
    getWorkspaceManager(): WorkspaceManager | null;
    /**
     * 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
     * @param reasoningSummary - Optional reasoning summary mode
     * @param contextTier - Optional context tier for tiered-pricing models. Omit to use normal model behavior.
     */
    setSelectedModel(model: string, reasoningEffort?: ReasoningEffortOption, modelCapabilitiesOverrides?: ModelCapabilitiesOverride, reasoningSummary?: ReasoningSummary, contextTier?: ContextTier): Promise<void>;
    protected applyModelChange(model: string, options?: {
        reasoningEffort?: ReasoningEffortOption;
        reasoningSummary?: ReasoningSummary;
        modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
        contextTier?: ContextTier;
        cause?: string;
    }): Promise<void>;
    /**
     * Compacts the conversation history into a single summary message.
     * Used by the /compact slash command for manual compaction.
     *
     * @param customInstructions - Optional user-provided instructions to focus the compaction summary
     * @returns Promise that resolves with compaction results
     * @throws Error if compaction fails or is not supported
     */
    abstract compactHistory(customInstructions?: string): 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>;
    /**
     * Classify orphaned tool calls using persisted permission and external tool events.
     *
     * Resume uses the persisted event stream to recover durable request
     * boundaries, then overlays any in-memory external tool completions that a
     * caller handed back after reconnect. We intentionally do not serialize the
     * external tool result itself into the event log.
     */
    private classifyOrphanedToolCalls;
    /**
     * Resolve orphaned tool calls from persisted request boundaries plus any
     * in-memory responses that were handed back after resume. Only invoked when
     * the session was resumed with `continuePendingWork: true`; in the default
     * mode no orphans are tracked, so this method is never reached.
     *
     * Awaiting-* orphans are left in `_pendingResumeOrphans` for the wait-loop
     * in `runAgenticLoop`. Other states are replayed (denied → synthetic failure,
     * approved → re-invoke, external-tool-completed → emit stored result).
     */
    protected resolveResumeOrphans(tools: Tool_2[], settings: RuntimeSettings): Promise<void>;
    protected hasAwaitingResumeOrphans(): boolean;
    private resolveInterruptedResumeOrphansOnExplicitResume;
    private emitInterruptedOrphan;
    private emitResumeWarning;
    private emitPermissionResolvedOrphan;
    private emitCompletedExternalToolOrphan;
    private continueApprovedExternalToolOrphan;
    private emitSyntheticToolResult;
    private emitSyntheticToolFailure;
    private getInterruptedToolMessage;
    protected rewriteChatHistoryForModel(newModel: string): void;
    protected maybeRewriteChatHistoryForEffectiveModel(newModel: string): void;
    /**
     * Process event to update internal state (_chatMessages, _selectedModel, etc.)
     */
    private processEventForState;
    private emitCustomAgentsUpdated;
    private getProvidedCustomAgents;
    private mergeProvidedCustomAgents;
    private loadCustomAgents;
    /**
     * Reload custom agents. Re-runs discovery for discovered agents while preserving
     * session-provided agents, 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;
    /**
     * Resolve an ExP-backed feature flag.
     *
     * Delegates to {@link FeatureFlagService.getFlagWithExpOverride}, which
     * awaits the ExP assignment and falls back to the static feature flag when
     * ExP has no assignment. The service is always present on a Session.
     */
    protected resolveExpFlag(expFlag: Parameters<IFeatureFlagService["getFlagWithExpOverride"]>[0], featureFlag: FeatureFlag): Promise<boolean>;
    protected resolveSqlIntentTrackingEnabled(): Promise<boolean>;
    /**
     * Creates an ephemeral LocalSession configured as a subagent of this session.
     *
     * The child session inherits auth, working directory, feature flags, provider config,
     * custom instructions state, and other parent context. The caller specifies only what
     * differs for the subagent (capabilities, tool restrictions, MCP servers, etc.).
     *
     * The child session uses `interactionType: "conversation-subagent"` and increments
     * `subAgentDepth` to enforce max-depth limits.
     */
    createSubagentSession(agentId: string, options?: SubagentSessionOptions): LocalSession;
}

/** Modes settable on session.currentMode (excludes shell, which is TUI-only) */
export declare const SESSION_MODES: readonly ["interactive", "plan", "autopilot"];

declare type SessionAgentApi = ApiSchemaToInterface<typeof sessionAgentApiSchema>;

declare const sessionAgentApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            agents: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                displayName: z_2.ZodString;
                description: z_2.ZodString;
                path: z_2.ZodOptional<z_2.ZodString>;
                id: z_2.ZodString;
                source: z_2.ZodOptional<z_2.ZodEnum<["user", "project", "inherited", "remote", "plugin", "builtin"]>>;
                userInvocable: z_2.ZodOptional<z_2.ZodBoolean>;
                tools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                model: z_2.ZodOptional<z_2.ZodString>;
                mcpServers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                skills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            agents: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }[];
        }, {
            agents: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }[];
        }>;
    };
    getCurrent: {
        description: string;
        result: z_2.ZodObject<{
            agent: z_2.ZodNullable<z_2.ZodObject<{
                name: z_2.ZodString;
                displayName: z_2.ZodString;
                description: z_2.ZodString;
                path: z_2.ZodOptional<z_2.ZodString>;
                id: z_2.ZodString;
                source: z_2.ZodOptional<z_2.ZodEnum<["user", "project", "inherited", "remote", "plugin", "builtin"]>>;
                userInvocable: z_2.ZodOptional<z_2.ZodBoolean>;
                tools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                model: z_2.ZodOptional<z_2.ZodString>;
                mcpServers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                skills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            agent: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            } | null;
        }, {
            agent: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            } | null;
        }>;
    };
    select: {
        description: string;
        params: z_2.ZodObject<{
            name: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
        }, {
            name: string;
        }>;
        result: z_2.ZodObject<{
            agent: z_2.ZodObject<{
                name: z_2.ZodString;
                displayName: z_2.ZodString;
                description: z_2.ZodString;
                path: z_2.ZodOptional<z_2.ZodString>;
                id: z_2.ZodString;
                source: z_2.ZodOptional<z_2.ZodEnum<["user", "project", "inherited", "remote", "plugin", "builtin"]>>;
                userInvocable: z_2.ZodOptional<z_2.ZodBoolean>;
                tools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                model: z_2.ZodOptional<z_2.ZodString>;
                mcpServers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                skills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            agent: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            };
        }, {
            agent: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            };
        }>;
    };
    deselect: {
        description: string;
    };
    reload: {
        description: string;
        result: z_2.ZodObject<{
            agents: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                displayName: z_2.ZodString;
                description: z_2.ZodString;
                path: z_2.ZodOptional<z_2.ZodString>;
                id: z_2.ZodString;
                source: z_2.ZodOptional<z_2.ZodEnum<["user", "project", "inherited", "remote", "plugin", "builtin"]>>;
                userInvocable: z_2.ZodOptional<z_2.ZodBoolean>;
                tools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                model: z_2.ZodOptional<z_2.ZodString>;
                mcpServers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                skills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }, {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            agents: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }[];
        }, {
            agents: {
                name: string;
                description: string;
                id: string;
                displayName: string;
                path?: string | undefined;
                model?: string | undefined;
                tools?: string[] | undefined;
                source?: "project" | "inherited" | "plugin" | "builtin" | "remote" | "user" | undefined;
                skills?: string[] | undefined;
                mcpServers?: Record<string, unknown> | undefined;
                userInvocable?: boolean | undefined;
            }[];
        }>;
    };
};

/** A session approval that can be persisted and restored. */
declare type SessionApproval = z.infer<typeof SessionApprovalSchema>;

/**
 * A SessionApproval type specific to the kind of UserToolPermissionRequest.
 * This allows us to tie user requests and responses back together with the right approval type.
 */
declare type SessionApprovalFor<K extends UserToolPermissionRequest["kind"]> = Extract<SessionApproval, {
    kind: K;
}>;

/**
 * Zod schema for SessionApproval - the source of truth for the type.
 * Used for validation when loading from persistence.
 */
declare const SessionApprovalSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
    kind: z.ZodLiteral<"commands">;
    commandIdentifiers: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
}, "strip", z.ZodTypeAny, {
    kind: "commands";
    commandIdentifiers: readonly string[];
}, {
    kind: "commands";
    commandIdentifiers: readonly string[];
}>, z.ZodObject<{
    kind: z.ZodLiteral<"read">;
}, "strip", z.ZodTypeAny, {
    kind: "read";
}, {
    kind: "read";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"write">;
}, "strip", z.ZodTypeAny, {
    kind: "write";
}, {
    kind: "write";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"mcp">;
    serverName: z.ZodString;
    toolName: z.ZodNullable<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    toolName: string | null;
    kind: "mcp";
    serverName: string;
}, {
    toolName: string | null;
    kind: "mcp";
    serverName: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"mcp-sampling">;
    serverName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    kind: "mcp-sampling";
    serverName: string;
}, {
    kind: "mcp-sampling";
    serverName: string;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"memory">;
}, "strip", z.ZodTypeAny, {
    kind: "memory";
}, {
    kind: "memory";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"custom-tool">;
    toolName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    toolName: string;
    kind: "custom-tool";
}, {
    toolName: string;
    kind: "custom-tool";
}>, z.ZodObject<{
    kind: z.ZodLiteral<"extension-management">;
    operation: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    kind: "extension-management";
    operation?: string | undefined;
}, {
    kind: "extension-management";
    operation?: string | undefined;
}>, z.ZodObject<{
    kind: z.ZodLiteral<"extension-permission-access">;
    extensionName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    extensionName: string;
    kind: "extension-permission-access";
}, {
    extensionName: string;
    kind: "extension-permission-access";
}>]>;

declare type SessionAuthApi = ApiSchemaToInterface<typeof sessionAuthApiSchema>;

declare const sessionAuthApiSchema: {
    getStatus: {
        description: string;
        result: z_2.ZodObject<{
            isAuthenticated: z_2.ZodBoolean;
            authType: z_2.ZodOptional<z_2.ZodEnum<["hmac", "env", "user", "gh-cli", "api-key", "token", "copilot-api-token"]>>;
            host: z_2.ZodOptional<z_2.ZodString>;
            login: z_2.ZodOptional<z_2.ZodString>;
            statusMessage: z_2.ZodOptional<z_2.ZodString>;
            copilotPlan: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            isAuthenticated: boolean;
            host?: string | undefined;
            login?: string | undefined;
            statusMessage?: string | undefined;
            authType?: "user" | "env" | "token" | "gh-cli" | "hmac" | "api-key" | "copilot-api-token" | undefined;
            copilotPlan?: string | undefined;
        }, {
            isAuthenticated: boolean;
            host?: string | undefined;
            login?: string | undefined;
            statusMessage?: string | undefined;
            authType?: "user" | "env" | "token" | "gh-cli" | "hmac" | "api-key" | "copilot-api-token" | undefined;
            copilotPlan?: string | undefined;
        }>;
    };
    setCredentials: {
        description: string;
        params: z_2.ZodObject<{
            credentials: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
        }, "strip", z_2.ZodTypeAny, {
            credentials?: AuthInfo | undefined;
        }, {
            credentials?: AuthInfo | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
};

export declare type SessionAutopilotObjectiveChangedEvent = z.infer<typeof SessionAutopilotObjectiveChangedEventSchema>;

/**
 * Autopilot objective file changed (created, updated, or cleared).
 */
declare const SessionAutopilotObjectiveChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.autopilot_objective_changed">;
    data: z.ZodObject<{
        operation: z.ZodEnum<["create", "update", "delete"]>;
        id: z.ZodOptional<z.ZodNumber>;
        status: z.ZodOptional<z.ZodEnum<["active", "paused", "cap_reached", "completed"]>>;
    }, "strip", z.ZodTypeAny, {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    }, {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.autopilot_objective_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.autopilot_objective_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type SessionBackgroundTasksChangedEvent = z.infer<typeof SessionBackgroundTasksChangedEventSchema>;

/**
 * Emitted when tracked tasks change (for example when agents or shell commands
 * start, complete, fail, are promoted, or are cancelled). 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.background_tasks_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    type: "session.background_tasks_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}, {
    type: "session.background_tasks_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}>;

declare type SessionCanvasApi = ApiSchemaToInterface<typeof sessionCanvasApiSchema>;

declare const sessionCanvasApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            canvases: z_2.ZodArray<z_2.ZodObject<Omit<{
                id: z_2.ZodString;
                displayName: z_2.ZodString;
                description: z_2.ZodString;
                inputSchema: z_2.ZodOptional<z_2.ZodType<Record<string, unknown>, z_2.ZodTypeDef, Record<string, unknown>>>;
                actions: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    inputSchema: z_2.ZodOptional<z_2.ZodType<Record<string, unknown>, z_2.ZodTypeDef, Record<string, unknown>>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    description?: string | undefined;
                    inputSchema?: Record<string, unknown> | undefined;
                }, {
                    name: string;
                    description?: string | undefined;
                    inputSchema?: Record<string, unknown> | undefined;
                }>, "many">>;
            } & {
                extensionId: z_2.ZodString;
                extensionName: z_2.ZodOptional<z_2.ZodString>;
                canvasId: z_2.ZodString;
            }, "id">, "strip", z_2.ZodTypeAny, {
                description: string;
                displayName: string;
                extensionId: string;
                canvasId: string;
                inputSchema?: Record<string, unknown> | undefined;
                actions?: {
                    name: string;
                    description?: string | undefined;
                    inputSchema?: Record<string, unknown> | undefined;
                }[] | undefined;
                extensionName?: string | undefined;
            }, {
                description: string;
                displayName: string;
                extensionId: string;
                canvasId: string;
                inputSchema?: Record<string, unknown> | undefined;
                actions?: {
                    name: string;
                    description?: string | undefined;
                    inputSchema?: Record<string, unknown> | undefined;
                }[] | undefined;
                extensionName?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            canvases: {
                description: string;
                displayName: string;
                extensionId: string;
                canvasId: string;
                inputSchema?: Record<string, unknown> | undefined;
                actions?: {
                    name: string;
                    description?: string | undefined;
                    inputSchema?: Record<string, unknown> | undefined;
                }[] | undefined;
                extensionName?: string | undefined;
            }[];
        }, {
            canvases: {
                description: string;
                displayName: string;
                extensionId: string;
                canvasId: string;
                inputSchema?: Record<string, unknown> | undefined;
                actions?: {
                    name: string;
                    description?: string | undefined;
                    inputSchema?: Record<string, unknown> | undefined;
                }[] | undefined;
                extensionName?: string | undefined;
            }[];
        }>;
    };
    listOpen: {
        description: string;
        result: z_2.ZodObject<{
            openCanvases: z_2.ZodArray<z_2.ZodObject<{
                instanceId: z_2.ZodString;
                extensionId: z_2.ZodString;
                extensionName: z_2.ZodOptional<z_2.ZodString>;
                canvasId: z_2.ZodString;
                title: z_2.ZodOptional<z_2.ZodString>;
                status: z_2.ZodOptional<z_2.ZodString>;
                url: z_2.ZodOptional<z_2.ZodString>;
                input: z_2.ZodOptional<z_2.ZodUnknown>;
                reopen: z_2.ZodBoolean;
                availability: z_2.ZodEnum<["ready", "stale"]>;
            }, "strip", z_2.ZodTypeAny, {
                instanceId: string;
                extensionId: string;
                canvasId: string;
                reopen: boolean;
                availability: "ready" | "stale";
                status?: string | undefined;
                url?: string | undefined;
                title?: string | undefined;
                extensionName?: string | undefined;
                input?: unknown;
            }, {
                instanceId: string;
                extensionId: string;
                canvasId: string;
                reopen: boolean;
                availability: "ready" | "stale";
                status?: string | undefined;
                url?: string | undefined;
                title?: string | undefined;
                extensionName?: string | undefined;
                input?: unknown;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            openCanvases: {
                instanceId: string;
                extensionId: string;
                canvasId: string;
                reopen: boolean;
                availability: "ready" | "stale";
                status?: string | undefined;
                url?: string | undefined;
                title?: string | undefined;
                extensionName?: string | undefined;
                input?: unknown;
            }[];
        }, {
            openCanvases: {
                instanceId: string;
                extensionId: string;
                canvasId: string;
                reopen: boolean;
                availability: "ready" | "stale";
                status?: string | undefined;
                url?: string | undefined;
                title?: string | undefined;
                extensionName?: string | undefined;
                input?: unknown;
            }[];
        }>;
    };
    open: {
        description: string;
        params: z_2.ZodObject<{
            extensionId: z_2.ZodOptional<z_2.ZodString>;
            canvasId: z_2.ZodString;
            instanceId: z_2.ZodString;
            input: z_2.ZodOptional<z_2.ZodUnknown>;
        }, "strip", z_2.ZodTypeAny, {
            instanceId: string;
            canvasId: string;
            extensionId?: string | undefined;
            input?: unknown;
        }, {
            instanceId: string;
            canvasId: string;
            extensionId?: string | undefined;
            input?: unknown;
        }>;
        result: z_2.ZodObject<{
            instanceId: z_2.ZodString;
            extensionId: z_2.ZodString;
            extensionName: z_2.ZodOptional<z_2.ZodString>;
            canvasId: z_2.ZodString;
            title: z_2.ZodOptional<z_2.ZodString>;
            status: z_2.ZodOptional<z_2.ZodString>;
            url: z_2.ZodOptional<z_2.ZodString>;
            input: z_2.ZodOptional<z_2.ZodUnknown>;
            reopen: z_2.ZodBoolean;
            availability: z_2.ZodEnum<["ready", "stale"]>;
        }, "strip", z_2.ZodTypeAny, {
            instanceId: string;
            extensionId: string;
            canvasId: string;
            reopen: boolean;
            availability: "ready" | "stale";
            status?: string | undefined;
            url?: string | undefined;
            title?: string | undefined;
            extensionName?: string | undefined;
            input?: unknown;
        }, {
            instanceId: string;
            extensionId: string;
            canvasId: string;
            reopen: boolean;
            availability: "ready" | "stale";
            status?: string | undefined;
            url?: string | undefined;
            title?: string | undefined;
            extensionName?: string | undefined;
            input?: unknown;
        }>;
    };
    close: {
        description: string;
        params: z_2.ZodObject<{
            instanceId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            instanceId: string;
        }, {
            instanceId: string;
        }>;
    };
    action: {
        invoke: {
            description: string;
            params: z_2.ZodObject<{
                instanceId: z_2.ZodString;
                actionName: z_2.ZodString;
                input: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                instanceId: string;
                actionName: string;
                input?: unknown;
            }, {
                instanceId: string;
                actionName: string;
                input?: unknown;
            }>;
            result: z_2.ZodObject<{
                result: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                result?: unknown;
            }, {
                result?: unknown;
            }>;
        };
    };
};

export declare type SessionCanvasClosedEvent = z.infer<typeof SessionCanvasClosedEventSchema>;

declare const SessionCanvasClosedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.canvas.closed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        instanceId: z.ZodString;
        extensionId: z.ZodString;
        canvasId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    }, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.canvas.closed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.canvas.closed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    };
    agentId?: string | undefined;
}>;

export declare type SessionCanvasOpenedEvent = z.infer<typeof SessionCanvasOpenedEventSchema>;

declare const SessionCanvasOpenedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.canvas.opened">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        instanceId: z.ZodString;
        extensionId: z.ZodString;
        extensionName: z.ZodOptional<z.ZodString>;
        canvasId: z.ZodString;
        title: z.ZodOptional<z.ZodString>;
        status: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        input: z.ZodOptional<z.ZodUnknown>;
        reopen: z.ZodBoolean;
        availability: z.ZodEnum<["ready", "stale"]>;
    }, "strip", z.ZodTypeAny, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    }, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.canvas.opened";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    };
    agentId?: string | undefined;
}, {
    type: "session.canvas.opened";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    };
    agentId?: string | undefined;
}>;

export declare type SessionCanvasRegistryChangedEvent = z.infer<typeof SessionCanvasRegistryChangedEventSchema>;

declare const SessionCanvasRegistryChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.canvas.registry_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        canvases: z.ZodArray<z.ZodObject<{
            extensionId: z.ZodString;
            extensionName: z.ZodOptional<z.ZodString>;
            canvasId: z.ZodString;
            displayName: z.ZodString;
            description: z.ZodString;
            inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }, {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }>, "many">>;
        }, "strip", z.ZodTypeAny, {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }, {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    }, {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.canvas.registry_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.canvas.registry_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}>;

declare interface SessionCanvasRuntimeApi extends SessionCanvasApi {
    registerProvider(params: {
        connectionId: string;
        connection: CanvasProviderConnection;
        info: CanvasProviderInfo;
        canvases: CanvasContribution[];
    }): void;
    unregisterProvider(connectionId: string): void;
    /**
     * Seeds the open-instance snapshot from a caller (typically `session.resume`)
     * when the runtime has no in-memory state. Seeded instances start as `stale`
     * until their owning provider reconnects or the agent re-opens them.
     */
    seedOpenInstances(instances: OpenCanvasInstance[]): void;
    /**
     * Returns the extension/canvas identity that owns the given canvas
     * instance, or `undefined` if the instance is not tracked.
     */
    getOpenInstanceOwner(instanceId: string): {
        extensionId: string;
        canvasId: string;
    } | undefined;
    /**
     * Releases the per-session state held in the native runtime. Called during
     * session lifecycle cleanup; subsequent calls on the returned API have undefined
     * behaviour.
     */
    dispose(): void;
}

/**
 * # 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          |    ✓    |  ✓  |  ✓  |               |
 * | elicitation                   |    ✓    |     |     |               |
 * | session-store                 |    ✓    |     |  ✓  |       ✓       |
 * | mcp-apps                      |         |     |     |               |[^1]
 * | canvas-renderer               |         |     |     |               |[^2]
 *
 * [^1]: `mcp-apps` is opt-in across all client types (excluded from
 *       `DEFAULT_SESSION_CAPABILITIES`, `SDK_CAPABILITIES`, and
 *       `ACP_CAPABILITIES`). SDK consumers request it via
 *       `session.create({ requestMcpApps: true })`, which is additionally
 *       gated on the `MCP_APPS` feature flag / `COPILOT_MCP_APPS=true` env
 *       override. Embedded hosts (CLI TUI / ACP) request it by adding
 *       `"mcp-apps"` to the constructor-supplied `sessionCapabilities` set.
 *
 * [^2]: `canvas-renderer` is opt-in across all client types. SDK consumers
 *       request it via `session.create({ requestCanvasRenderer: true })` or
 *       `session.resume({ requestCanvasRenderer: true })`.
 *
 * ## 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" | "session-store" | "mcp-apps" | "canvas-renderer";

/**
 * Structured client kind used for behavior gates.
 * Unlike clientName, this is not a telemetry branding identifier and should not depend on a literal name.
 */
export declare type SessionClientKind = "cli" | "acp" | "sdk";

declare type SessionCommandsApi = ApiSchemaToInterface<typeof sessionCommandsApiSchema>;

declare const sessionCommandsApiSchema: {
    list: {
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            includeBuiltins: z_2.ZodOptional<z_2.ZodBoolean>;
            includeSkills: z_2.ZodOptional<z_2.ZodBoolean>;
            includeClientCommands: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            includeBuiltins?: boolean | undefined;
            includeSkills?: boolean | undefined;
            includeClientCommands?: boolean | undefined;
        }, {
            includeBuiltins?: boolean | undefined;
            includeSkills?: boolean | undefined;
            includeClientCommands?: boolean | undefined;
        }>>;
        result: z_2.ZodObject<{
            commands: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                aliases: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                description: z_2.ZodString;
                kind: z_2.ZodEnum<["builtin", "skill", "client"]>;
                input: z_2.ZodOptional<z_2.ZodObject<{
                    hint: z_2.ZodString;
                    required: z_2.ZodOptional<z_2.ZodBoolean>;
                    completion: z_2.ZodOptional<z_2.ZodEnum<["directory"]>>;
                    preserveMultilineInput: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    hint: string;
                    required?: boolean | undefined;
                    completion?: "directory" | undefined;
                    preserveMultilineInput?: boolean | undefined;
                }, {
                    hint: string;
                    required?: boolean | undefined;
                    completion?: "directory" | undefined;
                    preserveMultilineInput?: boolean | undefined;
                }>>;
                allowDuringAgentExecution: z_2.ZodBoolean;
                experimental: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                kind: "builtin" | "client" | "skill";
                allowDuringAgentExecution: boolean;
                experimental?: boolean | undefined;
                input?: {
                    hint: string;
                    required?: boolean | undefined;
                    completion?: "directory" | undefined;
                    preserveMultilineInput?: boolean | undefined;
                } | undefined;
                aliases?: string[] | undefined;
            }, {
                name: string;
                description: string;
                kind: "builtin" | "client" | "skill";
                allowDuringAgentExecution: boolean;
                experimental?: boolean | undefined;
                input?: {
                    hint: string;
                    required?: boolean | undefined;
                    completion?: "directory" | undefined;
                    preserveMultilineInput?: boolean | undefined;
                } | undefined;
                aliases?: string[] | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            commands: {
                name: string;
                description: string;
                kind: "builtin" | "client" | "skill";
                allowDuringAgentExecution: boolean;
                experimental?: boolean | undefined;
                input?: {
                    hint: string;
                    required?: boolean | undefined;
                    completion?: "directory" | undefined;
                    preserveMultilineInput?: boolean | undefined;
                } | undefined;
                aliases?: string[] | undefined;
            }[];
        }, {
            commands: {
                name: string;
                description: string;
                kind: "builtin" | "client" | "skill";
                allowDuringAgentExecution: boolean;
                experimental?: boolean | undefined;
                input?: {
                    hint: string;
                    required?: boolean | undefined;
                    completion?: "directory" | undefined;
                    preserveMultilineInput?: boolean | undefined;
                } | undefined;
                aliases?: string[] | undefined;
            }[];
        }>;
    };
    invoke: {
        description: string;
        params: z_2.ZodObject<{
            name: z_2.ZodString;
            input: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            input?: string | undefined;
        }, {
            name: string;
            input?: string | undefined;
        }>;
        result: z_2.ZodDiscriminatedUnion<"kind", [z_2.ZodObject<{
            kind: z_2.ZodLiteral<"text">;
            text: z_2.ZodString;
            markdown: z_2.ZodOptional<z_2.ZodBoolean>;
            preserveAnsi: z_2.ZodOptional<z_2.ZodBoolean>;
            runtimeSettingsChanged: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            text: string;
            kind: "text";
            markdown?: boolean | undefined;
            preserveAnsi?: boolean | undefined;
            runtimeSettingsChanged?: boolean | undefined;
        }, {
            text: string;
            kind: "text";
            markdown?: boolean | undefined;
            preserveAnsi?: boolean | undefined;
            runtimeSettingsChanged?: boolean | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"agent-prompt">;
            prompt: z_2.ZodString;
            displayPrompt: z_2.ZodString;
            mode: z_2.ZodOptional<z_2.ZodEnum<["interactive", "plan", "autopilot"]>>;
            runtimeSettingsChanged: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            prompt: string;
            displayPrompt: string;
            kind: "agent-prompt";
            mode?: "interactive" | "autopilot" | "plan" | undefined;
            runtimeSettingsChanged?: boolean | undefined;
        }, {
            prompt: string;
            displayPrompt: string;
            kind: "agent-prompt";
            mode?: "interactive" | "autopilot" | "plan" | undefined;
            runtimeSettingsChanged?: boolean | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"completed">;
            message: z_2.ZodOptional<z_2.ZodString>;
            runtimeSettingsChanged: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            kind: "completed";
            message?: string | undefined;
            runtimeSettingsChanged?: boolean | undefined;
        }, {
            kind: "completed";
            message?: string | undefined;
            runtimeSettingsChanged?: boolean | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"select-subcommand">;
            command: z_2.ZodString;
            title: z_2.ZodString;
            options: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                description: z_2.ZodString;
                group: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                group?: string | undefined;
            }, {
                name: string;
                description: string;
                group?: string | undefined;
            }>, "many">;
            runtimeSettingsChanged: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            options: {
                name: string;
                description: string;
                group?: string | undefined;
            }[];
            command: string;
            title: string;
            kind: "select-subcommand";
            runtimeSettingsChanged?: boolean | undefined;
        }, {
            options: {
                name: string;
                description: string;
                group?: string | undefined;
            }[];
            command: string;
            title: string;
            kind: "select-subcommand";
            runtimeSettingsChanged?: boolean | undefined;
        }>]>;
    };
    handlePendingCommand: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            error: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            error?: string | undefined;
        }, {
            requestId: string;
            error?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    execute: {
        description: string;
        params: z_2.ZodObject<{
            commandName: z_2.ZodString;
            args: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            args: string;
            commandName: string;
        }, {
            args: string;
            commandName: string;
        }>;
        result: z_2.ZodObject<{
            error: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            error?: string | undefined;
        }, {
            error?: string | undefined;
        }>;
    };
    enqueue: {
        description: string;
        params: z_2.ZodObject<{
            command: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            command: string;
        }, {
            command: string;
        }>;
        result: z_2.ZodObject<{
            queued: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            queued: boolean;
        }, {
            queued: boolean;
        }>;
    };
    respondToQueuedCommand: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            result: z_2.ZodDiscriminatedUnion<"handled", [z_2.ZodObject<{
                handled: z_2.ZodLiteral<true>;
                stopProcessingQueue: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                handled: true;
                stopProcessingQueue?: boolean | undefined;
            }, {
                handled: true;
                stopProcessingQueue?: boolean | undefined;
            }>, z_2.ZodObject<{
                handled: z_2.ZodLiteral<false>;
            }, "strip", z_2.ZodTypeAny, {
                handled: false;
            }, {
                handled: false;
            }>]>;
        }, "strip", z_2.ZodTypeAny, {
            result: {
                handled: true;
                stopProcessingQueue?: boolean | undefined;
            } | {
                handled: false;
            };
            requestId: string;
        }, {
            result: {
                handled: true;
                stopProcessingQueue?: boolean | undefined;
            } | {
                handled: false;
            };
            requestId: string;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
};

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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>;
        customInstructions: z.ZodOptional<z.ZodString>;
        summaryContent: z.ZodOptional<z.ZodString>;
        checkpointNumber: z.ZodOptional<z.ZodNumber>;
        checkpointPath: z.ZodOptional<z.ZodString>;
        compactionTokensUsed: z.ZodOptional<z.ZodObject<{
            inputTokens: z.ZodOptional<z.ZodNumber>;
            outputTokens: z.ZodOptional<z.ZodNumber>;
            cacheReadTokens: z.ZodOptional<z.ZodNumber>;
            cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
            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, {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            }, {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            }>>;
            duration: z.ZodOptional<z.ZodNumber>;
            model: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        }, {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        }>>;
        requestId: z.ZodOptional<z.ZodString>;
        serviceRequestId: 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;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    }, {
        success: boolean;
        error?: string | undefined;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.compaction_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        error?: string | undefined;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.compaction_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        error?: string | undefined;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "session.compaction_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.compaction_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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"]>>;
        repositoryHost: z.ZodOptional<z.ZodString>;
        branch: z.ZodOptional<z.ZodString>;
        headCommit: z.ZodOptional<z.ZodString>;
        baseCommit: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }, {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.context_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.context_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionCorrelationIds = Record<string, string>;

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>;
    agentId: z.ZodOptional<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.ZodNullable<z.ZodArray<z.ZodString, "many">>;
            userInvocable: z.ZodBoolean;
            model: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }, {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: 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: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    }, {
        agents: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.custom_agents_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        agents: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    };
    agentId?: string | undefined;
}, {
    type: "session.custom_agents_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        agents: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    };
    agentId?: string | undefined;
}>;

/**
 * Wraps {@link SessionFs} sqlite methods with default-table initialization
 * and convenience query helpers (table listing, todo status, etc.).
 *
 * SQL strings and the `getTodoStatus` aggregation live in the Rust runtime
 * (`session_database.rs` / `api_session_database.rs`); this class is a thin
 * TS orchestrator that dispatches through the polymorphic `SessionFs`
 * (local sqlite file or SDK-registered remote provider).
 */
declare class SessionDatabase {
    private readonly sessionFs;
    private initPromise;
    constructor(sessionFs: SessionFs);
    /**
     * Execute a SQL query and return the results.
     *
     * Delegates to the owning SessionFs's `sqliteQuery()` method.
     *
     * @param queryType - How to execute: 'exec' (DDL), 'query' (SELECT), or 'run' (INSERT/UPDATE/DELETE)
     * @param query - The SQL query to execute
     * @returns Query results
     */
    execute(queryType: SqliteQueryType, query: string): Promise<SqlResult | undefined>;
    /**
     * Execute multiple SQL statements in a batch.
     * Useful for transactions or multi-statement operations.
     *
     * @param queries - Array of `[queryType, sql]` pairs to execute
     * @returns Array of results for each query
     */
    batch(queries: [SqliteQueryType, string][]): Promise<(SqlResult | undefined)[]>;
    /**
     * Get the list of all table names in the database.
     * If the database doesn't exist yet, it will be initialized (creating default tables).
     */
    getTableNames(): Promise<string[]>;
    /**
     * Get the list of all table names in the database if it already exists.
     * Returns an empty array if the database hasn't been created yet (without creating it).
     */
    getTableNamesIfExists(): Promise<string[]>;
    /**
     * Get todo status counts from the todos table.
     * Returns null if the database doesn't exist or has no todos.
     */
    getTodoStatus(): Promise<{
        pending: number;
        in_progress: number;
        done: number;
        blocked: number;
        total: number;
    } | null>;
    /**
     * Derive the current user-visible intent from the todo list.
     * Returns null if the database doesn't exist or there is no candidate intent.
     */
    getCurrentIntent(): Promise<string | null>;
    private ensureInitialized;
}

export declare type SessionEndHook = Hook<SessionEndHookInput, SessionEndHookOutput>;

/**
 * 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.error">;
    data: z.ZodObject<{
        errorType: z.ZodString;
        errorCode: z.ZodOptional<z.ZodString>;
        eligibleForAutoSwitch: z.ZodOptional<z.ZodBoolean>;
        message: z.ZodString;
        stack: z.ZodOptional<z.ZodString>;
        statusCode: z.ZodOptional<z.ZodNumber>;
        providerCallId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    }, {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.error";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.error";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

/**
 * Union of all session event types
 */
export declare type SessionEvent = z.infer<typeof SessionEventSchema>;

declare type SessionEventsApi = ApiSchemaToInterface<typeof sessionEventsApiSchema>;

declare const sessionEventsApiSchema: {
    read: {
        description: string;
        params: z_2.ZodObject<{
            cursor: z_2.ZodOptional<z_2.ZodString>;
            max: z_2.ZodOptional<z_2.ZodNumber>;
            waitMs: z_2.ZodOptional<z_2.ZodNumber>;
            types: z_2.ZodOptional<z_2.ZodUnion<[z_2.ZodLiteral<"*">, z_2.ZodArray<z_2.ZodString, "atleastone">]>>;
            agentScope: z_2.ZodOptional<z_2.ZodEnum<["primary", "all"]>>;
        }, "strip", z_2.ZodTypeAny, {
            max?: number | undefined;
            cursor?: string | undefined;
            waitMs?: number | undefined;
            types?: "*" | [string, ...string[]] | undefined;
            agentScope?: "all" | "primary" | undefined;
        }, {
            max?: number | undefined;
            cursor?: string | undefined;
            waitMs?: number | undefined;
            types?: "*" | [string, ...string[]] | undefined;
            agentScope?: "all" | "primary" | undefined;
        }>;
        result: z_2.ZodObject<{
            events: z_2.ZodArray<z_2.ZodType<{
                type: "session.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    version: number;
                    sessionId: string;
                    producer: string;
                    copilotVersion: string;
                    startTime: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    detachedFromSpawningParentSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.resume";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    resumeTime: string;
                    eventCount: number;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    eventsFileSizeBytes?: number | undefined;
                    sessionWasActive?: boolean | undefined;
                    continuePendingWork?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.remote_steerable_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    remoteSteerable: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.error";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    errorType: string;
                    url?: string | undefined;
                    errorCode?: string | undefined;
                    eligibleForAutoSwitch?: boolean | undefined;
                    stack?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.idle";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    aborted?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.title_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    title: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.schedule_created";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    prompt: string;
                    id: number;
                    at?: number | undefined;
                    intervalMs?: number | undefined;
                    cron?: string | undefined;
                    tz?: string | undefined;
                    recurring?: boolean | undefined;
                    displayPrompt?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.schedule_cancelled";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    id: number;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.autopilot_objective_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                    status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
                    id?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.info";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    infoType: string;
                    url?: string | undefined;
                    tip?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.warning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    warningType: string;
                    url?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.model_change";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    newModel: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    reasoningEffort?: string | null | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    previousModel?: string | undefined;
                    previousReasoningEffort?: string | undefined;
                    previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    cause?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.mode_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousMode: "interactive" | "autopilot" | "plan";
                    newMode: "interactive" | "autopilot" | "plan";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.permissions_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousAllowAllPermissions: boolean;
                    allowAllPermissions: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.plan_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.workspace_file_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    operation: "create" | "update";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.handoff";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    handoffTime: string;
                    sourceType: "remote" | "local";
                    repository?: {
                        name: string;
                        owner: string;
                        branch?: string | undefined;
                    } | undefined;
                    host?: string | undefined;
                    context?: string | undefined;
                    summary?: string | undefined;
                    remoteSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.truncation";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    preTruncationTokensInMessages: number;
                    preTruncationMessagesLength: number;
                    postTruncationTokensInMessages: number;
                    postTruncationMessagesLength: number;
                    tokensRemovedDuringTruncation: number;
                    messagesRemovedDuringTruncation: number;
                    performedBy: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.snapshot_rewind";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    eventsRemoved: number;
                    upToEventId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.shutdown";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    shutdownType: "error" | "routine";
                    totalApiDurationMs: number;
                    sessionStartTime: number;
                    codeChanges: {
                        linesAdded: number;
                        linesRemoved: number;
                        filesModified: string[];
                    };
                    modelMetrics: Record<string, {
                        usage: {
                            inputTokens: number;
                            outputTokens: number;
                            cacheReadTokens: number;
                            cacheWriteTokens: number;
                            reasoningTokens?: number | undefined;
                        };
                        requests: {
                            count?: number | undefined;
                            cost?: number | undefined;
                        };
                        totalNanoAiu?: number | undefined;
                        tokenDetails?: Record<string, {
                            tokenCount: number;
                        }> | undefined;
                    }>;
                    eventsFileSizeBytes?: number | undefined;
                    errorReason?: string | undefined;
                    totalPremiumRequests?: number | undefined;
                    totalNanoAiu?: number | undefined;
                    tokenDetails?: Record<string, {
                        tokenCount: number;
                    }> | undefined;
                    currentModel?: string | undefined;
                    currentTokens?: number | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.context_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    repositoryHost?: string | undefined;
                    branch?: string | undefined;
                    headCommit?: string | undefined;
                    baseCommit?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.usage_info";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    currentTokens: number;
                    messagesLength: number;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    isInitial?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.compaction_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.compaction_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    error?: string | undefined;
                    serviceRequestId?: string | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    preCompactionTokens?: number | undefined;
                    postCompactionTokens?: number | undefined;
                    preCompactionMessagesLength?: number | undefined;
                    messagesRemoved?: number | undefined;
                    tokensRemoved?: number | undefined;
                    customInstructions?: string | undefined;
                    summaryContent?: string | undefined;
                    checkpointNumber?: number | undefined;
                    checkpointPath?: string | undefined;
                    compactionTokensUsed?: {
                        model?: string | undefined;
                        duration?: number | undefined;
                        inputTokens?: number | undefined;
                        outputTokens?: number | undefined;
                        cacheReadTokens?: number | undefined;
                        cacheWriteTokens?: number | undefined;
                        copilotUsage?: {
                            totalNanoAiu: number;
                            tokenDetails: {
                                tokenCount: number;
                                batchSize: number;
                                costPerBatch: number;
                                tokenType: string;
                            }[];
                        } | undefined;
                    } | undefined;
                    requestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.task_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    summary: string;
                    success?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    source?: string | undefined;
                    transformedContent?: string | undefined;
                    attachments?: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[] | undefined;
                    supportedNativeDocumentMimeTypes?: string[] | undefined;
                    nativeDocumentPathFallbackPaths?: string[] | undefined;
                    agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
                    isAutopilotContinuation?: boolean | undefined;
                    interactionId?: string | undefined;
                    parentAgentTaskId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "pending_messages.modified";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                    interactionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.intent";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    intent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    reasoningId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reasoningId: string;
                    deltaContent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.streaming_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    totalResponseSizeBytes: number;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    messageId: string;
                    model?: string | undefined;
                    serviceRequestId?: string | undefined;
                    outputTokens?: number | undefined;
                    requestId?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    toolRequests?: {
                        name: string;
                        toolCallId: string;
                        type?: "function" | "custom" | undefined;
                        mcpServerName?: string | undefined;
                        mcpToolName?: string | undefined;
                        arguments?: unknown;
                        toolTitle?: string | undefined;
                        intentionSummary?: string | null | undefined;
                    }[] | undefined;
                    reasoningOpaque?: string | undefined;
                    reasoningText?: string | undefined;
                    encryptedContent?: string | undefined;
                    phase?: string | undefined;
                    apiCallId?: string | undefined;
                    anthropicAdvisorBlocks?: unknown[] | undefined;
                    anthropicAdvisorModel?: string | undefined;
                    parentToolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.message_start";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    messageId: string;
                    phase?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    deltaContent: string;
                    messageId: string;
                    parentToolCallId?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.usage";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                    duration?: number | undefined;
                    reasoningEffort?: string | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    cost?: number | undefined;
                    inputTokens?: number | undefined;
                    outputTokens?: number | undefined;
                    cacheReadTokens?: number | undefined;
                    cacheWriteTokens?: number | undefined;
                    reasoningTokens?: number | undefined;
                    copilotUsage?: {
                        totalNanoAiu: number;
                        tokenDetails: {
                            tokenCount: number;
                            batchSize: number;
                            costPerBatch: number;
                            tokenType: string;
                        }[];
                    } | undefined;
                    apiCallId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    timeToFirstTokenMs?: number | undefined;
                    interTokenLatencyMs?: number | undefined;
                    initiator?: string | undefined;
                    apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
                    quotaSnapshots?: Record<string, {
                        isUnlimitedEntitlement: boolean;
                        entitlementRequests: number;
                        usedRequests: number;
                        usageAllowedWithExhaustedQuota: boolean;
                        overage: number;
                        overageAllowedWithExhaustedQuota: boolean;
                        remainingPercentage: number;
                        resetDate?: Date | undefined;
                    }> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "model.call_failure";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    source: "top_level" | "subagent" | "mcp_sampling";
                    model?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    apiCallId?: string | undefined;
                    initiator?: string | undefined;
                    durationMs?: number | undefined;
                    errorMessage?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "abort";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reason: "user_initiated" | "remote_command" | "user_abort";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.user_requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    arguments?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    mcpServerName?: string | undefined;
                    mcpToolName?: string | undefined;
                    model?: string | undefined;
                    turnId?: string | undefined;
                    arguments?: unknown;
                    parentToolCallId?: string | undefined;
                    displayVerbatim?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_partial_result";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    partialOutput: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    progressMessage: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    toolCallId: string;
                    result?: {
                        content: string;
                        detailedContent?: string | undefined;
                        contents?: ({
                            type: "text";
                            text: string;
                        } | {
                            type: "terminal";
                            text: string;
                            cwd?: string | undefined;
                            exitCode?: number | undefined;
                        } | {
                            type: "image";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "audio";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "resource_link";
                            name: string;
                            uri: string;
                            description?: string | undefined;
                            title?: string | undefined;
                            mimeType?: string | undefined;
                            icons?: {
                                src: string;
                                theme?: "dark" | "light" | undefined;
                                mimeType?: string | undefined;
                                sizes?: string[] | undefined;
                            }[] | undefined;
                            size?: number | undefined;
                        } | {
                            type: "resource";
                            resource: {
                                text: string;
                                uri: string;
                                mimeType?: string | undefined;
                            } | {
                                blob: string;
                                uri: string;
                                mimeType?: string | undefined;
                            };
                        })[] | undefined;
                        uiResource?: {
                            mimeType: string;
                            uri: string;
                            blob?: string | undefined;
                            text?: string | undefined;
                            _meta?: {
                                ui?: {
                                    permissions?: {
                                        camera?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        microphone?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        geolocation?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        clipboardWrite?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                    } | undefined;
                                    csp?: {
                                        connectDomains?: string[] | undefined;
                                        resourceDomains?: string[] | undefined;
                                        frameDomains?: string[] | undefined;
                                        baseUriDomains?: string[] | undefined;
                                    } | undefined;
                                    domain?: string | undefined;
                                    prefersBorder?: boolean | undefined;
                                } | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    error?: {
                        message: string;
                        code?: string | undefined;
                    } | undefined;
                    model?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    isUserRequested?: boolean | undefined;
                    toolTelemetry?: Record<string, unknown> | undefined;
                    toolDescription?: {
                        name: string;
                        description?: string | undefined;
                        _meta?: {
                            ui?: {
                                resourceUri?: string | undefined;
                                visibility?: ("model" | "app")[] | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    sandboxed?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "skill.invoked";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    name: string;
                    content: string;
                    description?: string | undefined;
                    source?: string | undefined;
                    allowedTools?: string[] | undefined;
                    pluginName?: string | undefined;
                    pluginVersion?: string | undefined;
                    trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.started";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    agentDescription: string;
                    model?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.failed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    error: string;
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.selected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tools: string[] | null;
                    agentName: string;
                    agentDisplayName: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.deselected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    hookInvocationId: string;
                    hookType: string;
                    input?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    hookInvocationId: string;
                    hookType: string;
                    error?: {
                        message: string;
                        source?: string | undefined;
                        stack?: string | undefined;
                    } | undefined;
                    output?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    temporary?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "system.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    role: "developer" | "system";
                    name?: string | undefined;
                    metadata?: {
                        promptVersion?: string | undefined;
                        variables?: Record<string, unknown> | undefined;
                    } | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "system.notification";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    kind: {
                        status: "completed" | "failed";
                        type: "agent_completed";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                        prompt?: string | undefined;
                    } | {
                        type: "agent_idle";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                    } | {
                        type: "new_inbox_message";
                        summary: string;
                        entryId: string;
                        senderName: string;
                        senderType: string;
                    } | {
                        type: "shell_completed";
                        shellId: string;
                        description?: string | undefined;
                        exitCode?: number | undefined;
                    } | {
                        type: "shell_detached_completed";
                        shellId: string;
                        description?: string | undefined;
                    } | {
                        type: "instruction_discovered";
                        sourcePath: string;
                        triggerFile: string;
                        triggerTool: string;
                        description?: string | undefined;
                    };
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    permissionRequest: {
                        commands: readonly {
                            identifier: string;
                            readOnly: boolean;
                        }[];
                        kind: "shell";
                        fullCommandText: string;
                        intention: string;
                        possiblePaths: readonly string[];
                        possibleUrls: readonly {
                            url: string;
                        }[];
                        hasWriteFileRedirection: boolean;
                        canOfferSessionApproval: boolean;
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        readOnly: boolean;
                        serverName: string;
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    };
                    requestId: string;
                    promptRequest?: {
                        kind: "commands";
                        fullCommandText: string;
                        intention: string;
                        canOfferSessionApproval: boolean;
                        commandIdentifiers: readonly string[];
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        serverName: string;
                        args?: unknown;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        paths: readonly string[];
                        kind: "path";
                        accessKind: "read" | "write" | "shell";
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    } | undefined;
                    resolvedByHook?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    result: {
                        kind: "approved";
                    } | {
                        kind: "approved-for-session";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                    } | {
                        kind: "approved-for-location";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                        locationKey: string;
                    } | {
                        kind: "cancelled";
                        reason?: string | undefined;
                    } | {
                        rules: readonly Rule[];
                        kind: "denied-by-rules";
                    } | {
                        kind: "denied-no-approval-rule-and-could-not-request-from-user";
                    } | {
                        kind: "denied-interactively-by-user";
                        feedback?: string | undefined;
                        forceReject?: boolean | undefined;
                    } | {
                        path: string;
                        message: string;
                        kind: "denied-by-content-exclusion-policy";
                    } | {
                        kind: "denied-by-permission-request-hook";
                        message?: string | undefined;
                        interrupt?: boolean | undefined;
                    };
                    requestId: string;
                    toolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user_input.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    question: string;
                    choices?: string[] | undefined;
                    toolCallId?: string | undefined;
                    allowFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "user_input.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    answer?: string | undefined;
                    wasFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    requestId: string;
                    url?: string | undefined;
                    mode?: "url" | "form" | undefined;
                    toolCallId?: string | undefined;
                    elicitationSource?: string | undefined;
                    requestedSchema?: {
                        type: "object";
                        properties: Record<string, unknown>;
                        required?: string[] | undefined;
                    } | undefined;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    content?: Record<string, string | number | boolean | string[]> | undefined;
                    action?: "accept" | "decline" | "cancel" | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    serverName: string;
                    mcpRequestId: string | number;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_required";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    serverUrl: string;
                    requestId: string;
                    serverName: string;
                    staticClientConfig?: {
                        clientId: string;
                        publicClient?: boolean | undefined;
                        grantType?: "client_credentials" | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_notification";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    name: string;
                    source: string;
                    payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
                    version?: number | undefined;
                    subject?: Record<string, string> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "external_tool.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    sessionId: string;
                    requestId: string;
                    toolCallId: string;
                    toolName: string;
                    workingDirectory?: string | undefined;
                    arguments?: unknown;
                    traceparent?: string | undefined;
                    tracestate?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "external_tool.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                ephemeral?: true | undefined;
                agentId?: string | undefined;
            } | {
                type: "command.queued";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.execute";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    args: string;
                    requestId: string;
                    commandName: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    errorCode?: string | undefined;
                    retryAfterSeconds?: number | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    response: "yes" | "yes_always" | "no";
                };
                agentId?: string | undefined;
            } | {
                type: "commands.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    commands: {
                        name: string;
                        description?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "capabilities.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    ui?: {
                        canvases?: boolean | undefined;
                        elicitation?: boolean | undefined;
                        mcpApps?: boolean | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
                    summary: string;
                    requestId: string;
                    planContent: string;
                    recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    approved?: boolean | undefined;
                    feedback?: string | undefined;
                    selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                    autoApproveEdits?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.tools_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.background_tasks_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "session.skills_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    skills: {
                        name: string;
                        description: string;
                        source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                        enabled: boolean;
                        userInvocable: boolean;
                        path?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_agents_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    agents: {
                        name: string;
                        description: string;
                        tools: string[] | null;
                        source: string;
                        id: string;
                        displayName: string;
                        userInvocable: boolean;
                        model?: string | undefined;
                    }[];
                    errors: string[];
                    warnings: string[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_servers_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    servers: {
                        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                        name: string;
                        error?: string | undefined;
                        source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
                        pluginName?: string | undefined;
                        pluginVersion?: string | undefined;
                        transport?: "stdio" | "http" | "sse" | "memory" | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_server_status_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                    serverName: string;
                    error?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    extensions: {
                        status: "disabled" | "failed" | "running" | "starting";
                        name: string;
                        source: "project" | "user";
                        id: string;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.opened";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                    reopen: boolean;
                    availability: "ready" | "stale";
                    status?: string | undefined;
                    url?: string | undefined;
                    title?: string | undefined;
                    extensionName?: string | undefined;
                    input?: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.registry_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    canvases: {
                        description: string;
                        displayName: string;
                        extensionId: string;
                        canvasId: string;
                        inputSchema?: Record<string, unknown> | undefined;
                        actions?: {
                            name: string;
                            description?: string | undefined;
                            inputSchema?: Record<string, unknown> | undefined;
                        }[] | undefined;
                        extensionName?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.closed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions.attachments_pushed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    attachments: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[];
                };
                agentId?: string | undefined;
            } | {
                type: "mcp_app.tool_call_complete";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    durationMs: number;
                    toolName: string;
                    serverName: string;
                    result?: Record<string, unknown> | undefined;
                    error?: {
                        message: string;
                    } | undefined;
                    arguments?: Record<string, unknown> | undefined;
                    toolMeta?: z_2.objectOutputType<{
                        ui: z_2.ZodOptional<z_2.ZodObject<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">>>;
                    }, z_2.ZodTypeAny, "passthrough"> | undefined;
                };
                agentId?: string | undefined;
            }, z_2.ZodTypeDef, {
                type: "session.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    version: number;
                    sessionId: string;
                    producer: string;
                    copilotVersion: string;
                    startTime: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    detachedFromSpawningParentSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.resume";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    resumeTime: string;
                    eventCount: number;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    eventsFileSizeBytes?: number | undefined;
                    sessionWasActive?: boolean | undefined;
                    continuePendingWork?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.remote_steerable_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    remoteSteerable: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.error";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    errorType: string;
                    url?: string | undefined;
                    errorCode?: string | undefined;
                    eligibleForAutoSwitch?: boolean | undefined;
                    stack?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.idle";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    aborted?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.title_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    title: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.schedule_created";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    prompt: string;
                    id: number;
                    at?: number | undefined;
                    intervalMs?: number | undefined;
                    cron?: string | undefined;
                    tz?: string | undefined;
                    recurring?: boolean | undefined;
                    displayPrompt?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.schedule_cancelled";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    id: number;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.autopilot_objective_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                    status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
                    id?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.info";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    infoType: string;
                    url?: string | undefined;
                    tip?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.warning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    warningType: string;
                    url?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.model_change";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    newModel: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    reasoningEffort?: string | null | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    previousModel?: string | undefined;
                    previousReasoningEffort?: string | undefined;
                    previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    cause?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.mode_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousMode: "interactive" | "autopilot" | "plan";
                    newMode: "interactive" | "autopilot" | "plan";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.permissions_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousAllowAllPermissions: boolean;
                    allowAllPermissions: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.plan_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.workspace_file_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    operation: "create" | "update";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.handoff";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    handoffTime: string;
                    sourceType: "remote" | "local";
                    repository?: {
                        name: string;
                        owner: string;
                        branch?: string | undefined;
                    } | undefined;
                    host?: string | undefined;
                    context?: string | undefined;
                    summary?: string | undefined;
                    remoteSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.truncation";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    preTruncationTokensInMessages: number;
                    preTruncationMessagesLength: number;
                    postTruncationTokensInMessages: number;
                    postTruncationMessagesLength: number;
                    tokensRemovedDuringTruncation: number;
                    messagesRemovedDuringTruncation: number;
                    performedBy: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.snapshot_rewind";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    eventsRemoved: number;
                    upToEventId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.shutdown";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    shutdownType: "error" | "routine";
                    totalApiDurationMs: number;
                    sessionStartTime: number;
                    codeChanges: {
                        linesAdded: number;
                        linesRemoved: number;
                        filesModified: string[];
                    };
                    modelMetrics: Record<string, {
                        usage: {
                            inputTokens: number;
                            outputTokens: number;
                            cacheReadTokens: number;
                            cacheWriteTokens: number;
                            reasoningTokens?: number | undefined;
                        };
                        requests: {
                            count?: number | undefined;
                            cost?: number | undefined;
                        };
                        totalNanoAiu?: number | undefined;
                        tokenDetails?: Record<string, {
                            tokenCount: number;
                        }> | undefined;
                    }>;
                    eventsFileSizeBytes?: number | undefined;
                    errorReason?: string | undefined;
                    totalPremiumRequests?: number | undefined;
                    totalNanoAiu?: number | undefined;
                    tokenDetails?: Record<string, {
                        tokenCount: number;
                    }> | undefined;
                    currentModel?: string | undefined;
                    currentTokens?: number | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.context_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    repositoryHost?: string | undefined;
                    branch?: string | undefined;
                    headCommit?: string | undefined;
                    baseCommit?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.usage_info";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    currentTokens: number;
                    messagesLength: number;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    isInitial?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.compaction_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.compaction_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    error?: string | undefined;
                    serviceRequestId?: string | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    preCompactionTokens?: number | undefined;
                    postCompactionTokens?: number | undefined;
                    preCompactionMessagesLength?: number | undefined;
                    messagesRemoved?: number | undefined;
                    tokensRemoved?: number | undefined;
                    customInstructions?: string | undefined;
                    summaryContent?: string | undefined;
                    checkpointNumber?: number | undefined;
                    checkpointPath?: string | undefined;
                    compactionTokensUsed?: {
                        model?: string | undefined;
                        duration?: number | undefined;
                        inputTokens?: number | undefined;
                        outputTokens?: number | undefined;
                        cacheReadTokens?: number | undefined;
                        cacheWriteTokens?: number | undefined;
                        copilotUsage?: {
                            totalNanoAiu: number;
                            tokenDetails: {
                                tokenCount: number;
                                batchSize: number;
                                costPerBatch: number;
                                tokenType: string;
                            }[];
                        } | undefined;
                    } | undefined;
                    requestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.task_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    summary: string;
                    success?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    source?: string | undefined;
                    transformedContent?: string | undefined;
                    attachments?: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[] | undefined;
                    supportedNativeDocumentMimeTypes?: string[] | undefined;
                    nativeDocumentPathFallbackPaths?: string[] | undefined;
                    agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
                    isAutopilotContinuation?: boolean | undefined;
                    interactionId?: string | undefined;
                    parentAgentTaskId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "pending_messages.modified";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                    interactionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.intent";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    intent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    reasoningId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reasoningId: string;
                    deltaContent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.streaming_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    totalResponseSizeBytes: number;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    messageId: string;
                    model?: string | undefined;
                    serviceRequestId?: string | undefined;
                    outputTokens?: number | undefined;
                    requestId?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    toolRequests?: {
                        name: string;
                        toolCallId: string;
                        type?: "function" | "custom" | undefined;
                        mcpServerName?: string | undefined;
                        mcpToolName?: string | undefined;
                        arguments?: unknown;
                        toolTitle?: string | undefined;
                        intentionSummary?: string | null | undefined;
                    }[] | undefined;
                    reasoningOpaque?: string | undefined;
                    reasoningText?: string | undefined;
                    encryptedContent?: string | undefined;
                    phase?: string | undefined;
                    apiCallId?: string | undefined;
                    anthropicAdvisorBlocks?: unknown[] | undefined;
                    anthropicAdvisorModel?: string | undefined;
                    parentToolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.message_start";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    messageId: string;
                    phase?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    deltaContent: string;
                    messageId: string;
                    parentToolCallId?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.usage";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                    duration?: number | undefined;
                    reasoningEffort?: string | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    cost?: number | undefined;
                    inputTokens?: number | undefined;
                    outputTokens?: number | undefined;
                    cacheReadTokens?: number | undefined;
                    cacheWriteTokens?: number | undefined;
                    reasoningTokens?: number | undefined;
                    copilotUsage?: {
                        totalNanoAiu: number;
                        tokenDetails: {
                            tokenCount: number;
                            batchSize: number;
                            costPerBatch: number;
                            tokenType: string;
                        }[];
                    } | undefined;
                    apiCallId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    timeToFirstTokenMs?: number | undefined;
                    interTokenLatencyMs?: number | undefined;
                    initiator?: string | undefined;
                    apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
                    quotaSnapshots?: Record<string, {
                        isUnlimitedEntitlement: boolean;
                        entitlementRequests: number;
                        usedRequests: number;
                        usageAllowedWithExhaustedQuota: boolean;
                        overage: number;
                        overageAllowedWithExhaustedQuota: boolean;
                        remainingPercentage: number;
                        resetDate?: Date | undefined;
                    }> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "model.call_failure";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    source: "top_level" | "subagent" | "mcp_sampling";
                    model?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    apiCallId?: string | undefined;
                    initiator?: string | undefined;
                    durationMs?: number | undefined;
                    errorMessage?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "abort";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reason: "user_initiated" | "remote_command" | "user_abort";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.user_requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    arguments?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    mcpServerName?: string | undefined;
                    mcpToolName?: string | undefined;
                    model?: string | undefined;
                    turnId?: string | undefined;
                    arguments?: unknown;
                    parentToolCallId?: string | undefined;
                    displayVerbatim?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_partial_result";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    partialOutput: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    progressMessage: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    toolCallId: string;
                    result?: {
                        content: string;
                        detailedContent?: string | undefined;
                        contents?: ({
                            type: "text";
                            text: string;
                        } | {
                            type: "terminal";
                            text: string;
                            cwd?: string | undefined;
                            exitCode?: number | undefined;
                        } | {
                            type: "image";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "audio";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "resource_link";
                            name: string;
                            uri: string;
                            description?: string | undefined;
                            title?: string | undefined;
                            mimeType?: string | undefined;
                            icons?: {
                                src: string;
                                theme?: "dark" | "light" | undefined;
                                mimeType?: string | undefined;
                                sizes?: string[] | undefined;
                            }[] | undefined;
                            size?: number | undefined;
                        } | {
                            type: "resource";
                            resource: {
                                text: string;
                                uri: string;
                                mimeType?: string | undefined;
                            } | {
                                blob: string;
                                uri: string;
                                mimeType?: string | undefined;
                            };
                        })[] | undefined;
                        uiResource?: {
                            mimeType: string;
                            uri: string;
                            blob?: string | undefined;
                            text?: string | undefined;
                            _meta?: {
                                ui?: {
                                    permissions?: {
                                        camera?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        microphone?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        geolocation?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        clipboardWrite?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                    } | undefined;
                                    csp?: {
                                        connectDomains?: string[] | undefined;
                                        resourceDomains?: string[] | undefined;
                                        frameDomains?: string[] | undefined;
                                        baseUriDomains?: string[] | undefined;
                                    } | undefined;
                                    domain?: string | undefined;
                                    prefersBorder?: boolean | undefined;
                                } | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    error?: {
                        message: string;
                        code?: string | undefined;
                    } | undefined;
                    model?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    isUserRequested?: boolean | undefined;
                    toolTelemetry?: Record<string, unknown> | undefined;
                    toolDescription?: {
                        name: string;
                        description?: string | undefined;
                        _meta?: {
                            ui?: {
                                resourceUri?: string | undefined;
                                visibility?: ("model" | "app")[] | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    sandboxed?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "skill.invoked";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    name: string;
                    content: string;
                    description?: string | undefined;
                    source?: string | undefined;
                    allowedTools?: string[] | undefined;
                    pluginName?: string | undefined;
                    pluginVersion?: string | undefined;
                    trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.started";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    agentDescription: string;
                    model?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.failed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    error: string;
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.selected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tools: string[] | null;
                    agentName: string;
                    agentDisplayName: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.deselected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    hookInvocationId: string;
                    hookType: string;
                    input?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    hookInvocationId: string;
                    hookType: string;
                    error?: {
                        message: string;
                        source?: string | undefined;
                        stack?: string | undefined;
                    } | undefined;
                    output?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    temporary?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "system.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    role: "developer" | "system";
                    name?: string | undefined;
                    metadata?: {
                        promptVersion?: string | undefined;
                        variables?: Record<string, unknown> | undefined;
                    } | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "system.notification";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    kind: {
                        status: "completed" | "failed";
                        type: "agent_completed";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                        prompt?: string | undefined;
                    } | {
                        type: "agent_idle";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                    } | {
                        type: "new_inbox_message";
                        summary: string;
                        entryId: string;
                        senderName: string;
                        senderType: string;
                    } | {
                        type: "shell_completed";
                        shellId: string;
                        description?: string | undefined;
                        exitCode?: number | undefined;
                    } | {
                        type: "shell_detached_completed";
                        shellId: string;
                        description?: string | undefined;
                    } | {
                        type: "instruction_discovered";
                        sourcePath: string;
                        triggerFile: string;
                        triggerTool: string;
                        description?: string | undefined;
                    };
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    permissionRequest: {
                        commands: readonly {
                            identifier: string;
                            readOnly: boolean;
                        }[];
                        kind: "shell";
                        fullCommandText: string;
                        intention: string;
                        possiblePaths: readonly string[];
                        possibleUrls: readonly {
                            url: string;
                        }[];
                        hasWriteFileRedirection: boolean;
                        canOfferSessionApproval: boolean;
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        readOnly: boolean;
                        serverName: string;
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    };
                    requestId: string;
                    promptRequest?: {
                        kind: "commands";
                        fullCommandText: string;
                        intention: string;
                        canOfferSessionApproval: boolean;
                        commandIdentifiers: readonly string[];
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        serverName: string;
                        args?: unknown;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        paths: readonly string[];
                        kind: "path";
                        accessKind: "read" | "write" | "shell";
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    } | undefined;
                    resolvedByHook?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    result: {
                        kind: "approved";
                    } | {
                        kind: "approved-for-session";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                    } | {
                        kind: "approved-for-location";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                        locationKey: string;
                    } | {
                        kind: "cancelled";
                        reason?: string | undefined;
                    } | {
                        rules: readonly Rule[];
                        kind: "denied-by-rules";
                    } | {
                        kind: "denied-no-approval-rule-and-could-not-request-from-user";
                    } | {
                        kind: "denied-interactively-by-user";
                        feedback?: string | undefined;
                        forceReject?: boolean | undefined;
                    } | {
                        path: string;
                        message: string;
                        kind: "denied-by-content-exclusion-policy";
                    } | {
                        kind: "denied-by-permission-request-hook";
                        message?: string | undefined;
                        interrupt?: boolean | undefined;
                    };
                    requestId: string;
                    toolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user_input.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    question: string;
                    choices?: string[] | undefined;
                    toolCallId?: string | undefined;
                    allowFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "user_input.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    answer?: string | undefined;
                    wasFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    requestId: string;
                    url?: string | undefined;
                    mode?: "url" | "form" | undefined;
                    toolCallId?: string | undefined;
                    elicitationSource?: string | undefined;
                    requestedSchema?: {
                        type: "object";
                        properties: Record<string, unknown>;
                        required?: string[] | undefined;
                    } | undefined;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    content?: Record<string, string | number | boolean | string[]> | undefined;
                    action?: "accept" | "decline" | "cancel" | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    serverName: string;
                    mcpRequestId: string | number;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_required";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    serverUrl: string;
                    requestId: string;
                    serverName: string;
                    staticClientConfig?: {
                        clientId: string;
                        publicClient?: boolean | undefined;
                        grantType?: "client_credentials" | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_notification";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    name: string;
                    source: string;
                    payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
                    version?: number | undefined;
                    subject?: Record<string, string> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "external_tool.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    sessionId: string;
                    requestId: string;
                    toolCallId: string;
                    toolName: string;
                    workingDirectory?: string | undefined;
                    arguments?: unknown;
                    traceparent?: string | undefined;
                    tracestate?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "external_tool.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                ephemeral?: true | undefined;
                agentId?: string | undefined;
            } | {
                type: "command.queued";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.execute";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    args: string;
                    requestId: string;
                    commandName: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    errorCode?: string | undefined;
                    retryAfterSeconds?: number | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    response: "yes" | "yes_always" | "no";
                };
                agentId?: string | undefined;
            } | {
                type: "commands.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    commands: {
                        name: string;
                        description?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "capabilities.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    ui?: {
                        canvases?: boolean | undefined;
                        elicitation?: boolean | undefined;
                        mcpApps?: boolean | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
                    summary: string;
                    requestId: string;
                    planContent: string;
                    recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    approved?: boolean | undefined;
                    feedback?: string | undefined;
                    selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                    autoApproveEdits?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.tools_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.background_tasks_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "session.skills_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    skills: {
                        name: string;
                        description: string;
                        source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                        enabled: boolean;
                        userInvocable: boolean;
                        path?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_agents_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    agents: {
                        name: string;
                        description: string;
                        tools: string[] | null;
                        source: string;
                        id: string;
                        displayName: string;
                        userInvocable: boolean;
                        model?: string | undefined;
                    }[];
                    errors: string[];
                    warnings: string[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_servers_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    servers: {
                        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                        name: string;
                        error?: string | undefined;
                        source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
                        pluginName?: string | undefined;
                        pluginVersion?: string | undefined;
                        transport?: "stdio" | "http" | "sse" | "memory" | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_server_status_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                    serverName: string;
                    error?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    extensions: {
                        status: "disabled" | "failed" | "running" | "starting";
                        name: string;
                        source: "project" | "user";
                        id: string;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.opened";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                    reopen: boolean;
                    availability: "ready" | "stale";
                    status?: string | undefined;
                    url?: string | undefined;
                    title?: string | undefined;
                    extensionName?: string | undefined;
                    input?: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.registry_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    canvases: {
                        description: string;
                        displayName: string;
                        extensionId: string;
                        canvasId: string;
                        inputSchema?: Record<string, unknown> | undefined;
                        actions?: {
                            name: string;
                            description?: string | undefined;
                            inputSchema?: Record<string, unknown> | undefined;
                        }[] | undefined;
                        extensionName?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.closed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions.attachments_pushed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    attachments: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[];
                };
                agentId?: string | undefined;
            } | {
                type: "mcp_app.tool_call_complete";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    durationMs: number;
                    toolName: string;
                    serverName: string;
                    result?: Record<string, unknown> | undefined;
                    error?: {
                        message: string;
                    } | undefined;
                    arguments?: Record<string, unknown> | undefined;
                    toolMeta?: z_2.objectOutputType<{
                        ui: z_2.ZodOptional<z_2.ZodObject<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">>>;
                    }, z_2.ZodTypeAny, "passthrough"> | undefined;
                };
                agentId?: string | undefined;
            }>, "many">;
            cursor: z_2.ZodString;
            hasMore: z_2.ZodBoolean;
            cursorStatus: z_2.ZodEnum<["ok", "expired"]>;
        }, "strip", z_2.ZodTypeAny, {
            cursor: string;
            events: ({
                type: "session.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    version: number;
                    sessionId: string;
                    producer: string;
                    copilotVersion: string;
                    startTime: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    detachedFromSpawningParentSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.resume";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    resumeTime: string;
                    eventCount: number;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    eventsFileSizeBytes?: number | undefined;
                    sessionWasActive?: boolean | undefined;
                    continuePendingWork?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.remote_steerable_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    remoteSteerable: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.error";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    errorType: string;
                    url?: string | undefined;
                    errorCode?: string | undefined;
                    eligibleForAutoSwitch?: boolean | undefined;
                    stack?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.idle";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    aborted?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.title_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    title: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.schedule_created";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    prompt: string;
                    id: number;
                    at?: number | undefined;
                    intervalMs?: number | undefined;
                    cron?: string | undefined;
                    tz?: string | undefined;
                    recurring?: boolean | undefined;
                    displayPrompt?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.schedule_cancelled";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    id: number;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.autopilot_objective_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                    status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
                    id?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.info";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    infoType: string;
                    url?: string | undefined;
                    tip?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.warning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    warningType: string;
                    url?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.model_change";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    newModel: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    reasoningEffort?: string | null | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    previousModel?: string | undefined;
                    previousReasoningEffort?: string | undefined;
                    previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    cause?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.mode_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousMode: "interactive" | "autopilot" | "plan";
                    newMode: "interactive" | "autopilot" | "plan";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.permissions_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousAllowAllPermissions: boolean;
                    allowAllPermissions: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.plan_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.workspace_file_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    operation: "create" | "update";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.handoff";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    handoffTime: string;
                    sourceType: "remote" | "local";
                    repository?: {
                        name: string;
                        owner: string;
                        branch?: string | undefined;
                    } | undefined;
                    host?: string | undefined;
                    context?: string | undefined;
                    summary?: string | undefined;
                    remoteSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.truncation";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    preTruncationTokensInMessages: number;
                    preTruncationMessagesLength: number;
                    postTruncationTokensInMessages: number;
                    postTruncationMessagesLength: number;
                    tokensRemovedDuringTruncation: number;
                    messagesRemovedDuringTruncation: number;
                    performedBy: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.snapshot_rewind";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    eventsRemoved: number;
                    upToEventId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.shutdown";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    shutdownType: "error" | "routine";
                    totalApiDurationMs: number;
                    sessionStartTime: number;
                    codeChanges: {
                        linesAdded: number;
                        linesRemoved: number;
                        filesModified: string[];
                    };
                    modelMetrics: Record<string, {
                        usage: {
                            inputTokens: number;
                            outputTokens: number;
                            cacheReadTokens: number;
                            cacheWriteTokens: number;
                            reasoningTokens?: number | undefined;
                        };
                        requests: {
                            count?: number | undefined;
                            cost?: number | undefined;
                        };
                        totalNanoAiu?: number | undefined;
                        tokenDetails?: Record<string, {
                            tokenCount: number;
                        }> | undefined;
                    }>;
                    eventsFileSizeBytes?: number | undefined;
                    errorReason?: string | undefined;
                    totalPremiumRequests?: number | undefined;
                    totalNanoAiu?: number | undefined;
                    tokenDetails?: Record<string, {
                        tokenCount: number;
                    }> | undefined;
                    currentModel?: string | undefined;
                    currentTokens?: number | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.context_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    repositoryHost?: string | undefined;
                    branch?: string | undefined;
                    headCommit?: string | undefined;
                    baseCommit?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.usage_info";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    currentTokens: number;
                    messagesLength: number;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    isInitial?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.compaction_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.compaction_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    error?: string | undefined;
                    serviceRequestId?: string | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    preCompactionTokens?: number | undefined;
                    postCompactionTokens?: number | undefined;
                    preCompactionMessagesLength?: number | undefined;
                    messagesRemoved?: number | undefined;
                    tokensRemoved?: number | undefined;
                    customInstructions?: string | undefined;
                    summaryContent?: string | undefined;
                    checkpointNumber?: number | undefined;
                    checkpointPath?: string | undefined;
                    compactionTokensUsed?: {
                        model?: string | undefined;
                        duration?: number | undefined;
                        inputTokens?: number | undefined;
                        outputTokens?: number | undefined;
                        cacheReadTokens?: number | undefined;
                        cacheWriteTokens?: number | undefined;
                        copilotUsage?: {
                            totalNanoAiu: number;
                            tokenDetails: {
                                tokenCount: number;
                                batchSize: number;
                                costPerBatch: number;
                                tokenType: string;
                            }[];
                        } | undefined;
                    } | undefined;
                    requestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.task_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    summary: string;
                    success?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    source?: string | undefined;
                    transformedContent?: string | undefined;
                    attachments?: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[] | undefined;
                    supportedNativeDocumentMimeTypes?: string[] | undefined;
                    nativeDocumentPathFallbackPaths?: string[] | undefined;
                    agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
                    isAutopilotContinuation?: boolean | undefined;
                    interactionId?: string | undefined;
                    parentAgentTaskId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "pending_messages.modified";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                    interactionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.intent";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    intent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    reasoningId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reasoningId: string;
                    deltaContent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.streaming_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    totalResponseSizeBytes: number;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    messageId: string;
                    model?: string | undefined;
                    serviceRequestId?: string | undefined;
                    outputTokens?: number | undefined;
                    requestId?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    toolRequests?: {
                        name: string;
                        toolCallId: string;
                        type?: "function" | "custom" | undefined;
                        mcpServerName?: string | undefined;
                        mcpToolName?: string | undefined;
                        arguments?: unknown;
                        toolTitle?: string | undefined;
                        intentionSummary?: string | null | undefined;
                    }[] | undefined;
                    reasoningOpaque?: string | undefined;
                    reasoningText?: string | undefined;
                    encryptedContent?: string | undefined;
                    phase?: string | undefined;
                    apiCallId?: string | undefined;
                    anthropicAdvisorBlocks?: unknown[] | undefined;
                    anthropicAdvisorModel?: string | undefined;
                    parentToolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.message_start";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    messageId: string;
                    phase?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    deltaContent: string;
                    messageId: string;
                    parentToolCallId?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.usage";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                    duration?: number | undefined;
                    reasoningEffort?: string | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    cost?: number | undefined;
                    inputTokens?: number | undefined;
                    outputTokens?: number | undefined;
                    cacheReadTokens?: number | undefined;
                    cacheWriteTokens?: number | undefined;
                    reasoningTokens?: number | undefined;
                    copilotUsage?: {
                        totalNanoAiu: number;
                        tokenDetails: {
                            tokenCount: number;
                            batchSize: number;
                            costPerBatch: number;
                            tokenType: string;
                        }[];
                    } | undefined;
                    apiCallId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    timeToFirstTokenMs?: number | undefined;
                    interTokenLatencyMs?: number | undefined;
                    initiator?: string | undefined;
                    apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
                    quotaSnapshots?: Record<string, {
                        isUnlimitedEntitlement: boolean;
                        entitlementRequests: number;
                        usedRequests: number;
                        usageAllowedWithExhaustedQuota: boolean;
                        overage: number;
                        overageAllowedWithExhaustedQuota: boolean;
                        remainingPercentage: number;
                        resetDate?: Date | undefined;
                    }> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "model.call_failure";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    source: "top_level" | "subagent" | "mcp_sampling";
                    model?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    apiCallId?: string | undefined;
                    initiator?: string | undefined;
                    durationMs?: number | undefined;
                    errorMessage?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "abort";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reason: "user_initiated" | "remote_command" | "user_abort";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.user_requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    arguments?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    mcpServerName?: string | undefined;
                    mcpToolName?: string | undefined;
                    model?: string | undefined;
                    turnId?: string | undefined;
                    arguments?: unknown;
                    parentToolCallId?: string | undefined;
                    displayVerbatim?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_partial_result";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    partialOutput: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    progressMessage: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    toolCallId: string;
                    result?: {
                        content: string;
                        detailedContent?: string | undefined;
                        contents?: ({
                            type: "text";
                            text: string;
                        } | {
                            type: "terminal";
                            text: string;
                            cwd?: string | undefined;
                            exitCode?: number | undefined;
                        } | {
                            type: "image";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "audio";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "resource_link";
                            name: string;
                            uri: string;
                            description?: string | undefined;
                            title?: string | undefined;
                            mimeType?: string | undefined;
                            icons?: {
                                src: string;
                                theme?: "dark" | "light" | undefined;
                                mimeType?: string | undefined;
                                sizes?: string[] | undefined;
                            }[] | undefined;
                            size?: number | undefined;
                        } | {
                            type: "resource";
                            resource: {
                                text: string;
                                uri: string;
                                mimeType?: string | undefined;
                            } | {
                                blob: string;
                                uri: string;
                                mimeType?: string | undefined;
                            };
                        })[] | undefined;
                        uiResource?: {
                            mimeType: string;
                            uri: string;
                            blob?: string | undefined;
                            text?: string | undefined;
                            _meta?: {
                                ui?: {
                                    permissions?: {
                                        camera?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        microphone?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        geolocation?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        clipboardWrite?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                    } | undefined;
                                    csp?: {
                                        connectDomains?: string[] | undefined;
                                        resourceDomains?: string[] | undefined;
                                        frameDomains?: string[] | undefined;
                                        baseUriDomains?: string[] | undefined;
                                    } | undefined;
                                    domain?: string | undefined;
                                    prefersBorder?: boolean | undefined;
                                } | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    error?: {
                        message: string;
                        code?: string | undefined;
                    } | undefined;
                    model?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    isUserRequested?: boolean | undefined;
                    toolTelemetry?: Record<string, unknown> | undefined;
                    toolDescription?: {
                        name: string;
                        description?: string | undefined;
                        _meta?: {
                            ui?: {
                                resourceUri?: string | undefined;
                                visibility?: ("model" | "app")[] | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    sandboxed?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "skill.invoked";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    name: string;
                    content: string;
                    description?: string | undefined;
                    source?: string | undefined;
                    allowedTools?: string[] | undefined;
                    pluginName?: string | undefined;
                    pluginVersion?: string | undefined;
                    trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.started";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    agentDescription: string;
                    model?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.failed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    error: string;
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.selected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tools: string[] | null;
                    agentName: string;
                    agentDisplayName: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.deselected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    hookInvocationId: string;
                    hookType: string;
                    input?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    hookInvocationId: string;
                    hookType: string;
                    error?: {
                        message: string;
                        source?: string | undefined;
                        stack?: string | undefined;
                    } | undefined;
                    output?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    temporary?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "system.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    role: "developer" | "system";
                    name?: string | undefined;
                    metadata?: {
                        promptVersion?: string | undefined;
                        variables?: Record<string, unknown> | undefined;
                    } | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "system.notification";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    kind: {
                        status: "completed" | "failed";
                        type: "agent_completed";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                        prompt?: string | undefined;
                    } | {
                        type: "agent_idle";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                    } | {
                        type: "new_inbox_message";
                        summary: string;
                        entryId: string;
                        senderName: string;
                        senderType: string;
                    } | {
                        type: "shell_completed";
                        shellId: string;
                        description?: string | undefined;
                        exitCode?: number | undefined;
                    } | {
                        type: "shell_detached_completed";
                        shellId: string;
                        description?: string | undefined;
                    } | {
                        type: "instruction_discovered";
                        sourcePath: string;
                        triggerFile: string;
                        triggerTool: string;
                        description?: string | undefined;
                    };
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    permissionRequest: {
                        commands: readonly {
                            identifier: string;
                            readOnly: boolean;
                        }[];
                        kind: "shell";
                        fullCommandText: string;
                        intention: string;
                        possiblePaths: readonly string[];
                        possibleUrls: readonly {
                            url: string;
                        }[];
                        hasWriteFileRedirection: boolean;
                        canOfferSessionApproval: boolean;
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        readOnly: boolean;
                        serverName: string;
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    };
                    requestId: string;
                    promptRequest?: {
                        kind: "commands";
                        fullCommandText: string;
                        intention: string;
                        canOfferSessionApproval: boolean;
                        commandIdentifiers: readonly string[];
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        serverName: string;
                        args?: unknown;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        paths: readonly string[];
                        kind: "path";
                        accessKind: "read" | "write" | "shell";
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    } | undefined;
                    resolvedByHook?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    result: {
                        kind: "approved";
                    } | {
                        kind: "approved-for-session";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                    } | {
                        kind: "approved-for-location";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                        locationKey: string;
                    } | {
                        kind: "cancelled";
                        reason?: string | undefined;
                    } | {
                        rules: readonly Rule[];
                        kind: "denied-by-rules";
                    } | {
                        kind: "denied-no-approval-rule-and-could-not-request-from-user";
                    } | {
                        kind: "denied-interactively-by-user";
                        feedback?: string | undefined;
                        forceReject?: boolean | undefined;
                    } | {
                        path: string;
                        message: string;
                        kind: "denied-by-content-exclusion-policy";
                    } | {
                        kind: "denied-by-permission-request-hook";
                        message?: string | undefined;
                        interrupt?: boolean | undefined;
                    };
                    requestId: string;
                    toolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user_input.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    question: string;
                    choices?: string[] | undefined;
                    toolCallId?: string | undefined;
                    allowFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "user_input.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    answer?: string | undefined;
                    wasFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    requestId: string;
                    url?: string | undefined;
                    mode?: "url" | "form" | undefined;
                    toolCallId?: string | undefined;
                    elicitationSource?: string | undefined;
                    requestedSchema?: {
                        type: "object";
                        properties: Record<string, unknown>;
                        required?: string[] | undefined;
                    } | undefined;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    content?: Record<string, string | number | boolean | string[]> | undefined;
                    action?: "accept" | "decline" | "cancel" | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    serverName: string;
                    mcpRequestId: string | number;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_required";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    serverUrl: string;
                    requestId: string;
                    serverName: string;
                    staticClientConfig?: {
                        clientId: string;
                        publicClient?: boolean | undefined;
                        grantType?: "client_credentials" | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_notification";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    name: string;
                    source: string;
                    payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
                    version?: number | undefined;
                    subject?: Record<string, string> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "external_tool.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    sessionId: string;
                    requestId: string;
                    toolCallId: string;
                    toolName: string;
                    workingDirectory?: string | undefined;
                    arguments?: unknown;
                    traceparent?: string | undefined;
                    tracestate?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "external_tool.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                ephemeral?: true | undefined;
                agentId?: string | undefined;
            } | {
                type: "command.queued";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.execute";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    args: string;
                    requestId: string;
                    commandName: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    errorCode?: string | undefined;
                    retryAfterSeconds?: number | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    response: "yes" | "yes_always" | "no";
                };
                agentId?: string | undefined;
            } | {
                type: "commands.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    commands: {
                        name: string;
                        description?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "capabilities.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    ui?: {
                        canvases?: boolean | undefined;
                        elicitation?: boolean | undefined;
                        mcpApps?: boolean | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
                    summary: string;
                    requestId: string;
                    planContent: string;
                    recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    approved?: boolean | undefined;
                    feedback?: string | undefined;
                    selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                    autoApproveEdits?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.tools_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.background_tasks_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "session.skills_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    skills: {
                        name: string;
                        description: string;
                        source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                        enabled: boolean;
                        userInvocable: boolean;
                        path?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_agents_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    agents: {
                        name: string;
                        description: string;
                        tools: string[] | null;
                        source: string;
                        id: string;
                        displayName: string;
                        userInvocable: boolean;
                        model?: string | undefined;
                    }[];
                    errors: string[];
                    warnings: string[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_servers_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    servers: {
                        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                        name: string;
                        error?: string | undefined;
                        source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
                        pluginName?: string | undefined;
                        pluginVersion?: string | undefined;
                        transport?: "stdio" | "http" | "sse" | "memory" | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_server_status_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                    serverName: string;
                    error?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    extensions: {
                        status: "disabled" | "failed" | "running" | "starting";
                        name: string;
                        source: "project" | "user";
                        id: string;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.opened";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                    reopen: boolean;
                    availability: "ready" | "stale";
                    status?: string | undefined;
                    url?: string | undefined;
                    title?: string | undefined;
                    extensionName?: string | undefined;
                    input?: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.registry_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    canvases: {
                        description: string;
                        displayName: string;
                        extensionId: string;
                        canvasId: string;
                        inputSchema?: Record<string, unknown> | undefined;
                        actions?: {
                            name: string;
                            description?: string | undefined;
                            inputSchema?: Record<string, unknown> | undefined;
                        }[] | undefined;
                        extensionName?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.closed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions.attachments_pushed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    attachments: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[];
                };
                agentId?: string | undefined;
            } | {
                type: "mcp_app.tool_call_complete";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    durationMs: number;
                    toolName: string;
                    serverName: string;
                    result?: Record<string, unknown> | undefined;
                    error?: {
                        message: string;
                    } | undefined;
                    arguments?: Record<string, unknown> | undefined;
                    toolMeta?: z_2.objectOutputType<{
                        ui: z_2.ZodOptional<z_2.ZodObject<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">>>;
                    }, z_2.ZodTypeAny, "passthrough"> | undefined;
                };
                agentId?: string | undefined;
            })[];
            hasMore: boolean;
            cursorStatus: "ok" | "expired";
        }, {
            cursor: string;
            events: ({
                type: "session.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    version: number;
                    sessionId: string;
                    producer: string;
                    copilotVersion: string;
                    startTime: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    detachedFromSpawningParentSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.resume";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    resumeTime: string;
                    eventCount: number;
                    contextTier?: "default" | "long_context" | null | undefined;
                    selectedModel?: string | undefined;
                    reasoningEffort?: string | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    context?: {
                        cwd: string;
                        repository?: string | undefined;
                        gitRoot?: string | undefined;
                        hostType?: "github" | "ado" | undefined;
                        repositoryHost?: string | undefined;
                        branch?: string | undefined;
                        headCommit?: string | undefined;
                        baseCommit?: string | undefined;
                    } | undefined;
                    alreadyInUse?: boolean | undefined;
                    remoteSteerable?: boolean | undefined;
                    eventsFileSizeBytes?: number | undefined;
                    sessionWasActive?: boolean | undefined;
                    continuePendingWork?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.remote_steerable_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    remoteSteerable: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.error";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    errorType: string;
                    url?: string | undefined;
                    errorCode?: string | undefined;
                    eligibleForAutoSwitch?: boolean | undefined;
                    stack?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.idle";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    aborted?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.title_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    title: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.schedule_created";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    prompt: string;
                    id: number;
                    at?: number | undefined;
                    intervalMs?: number | undefined;
                    cron?: string | undefined;
                    tz?: string | undefined;
                    recurring?: boolean | undefined;
                    displayPrompt?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.schedule_cancelled";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    id: number;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.autopilot_objective_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                    status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
                    id?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.info";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    infoType: string;
                    url?: string | undefined;
                    tip?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.warning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    warningType: string;
                    url?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.model_change";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    newModel: string;
                    contextTier?: "default" | "long_context" | null | undefined;
                    reasoningEffort?: string | null | undefined;
                    reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    previousModel?: string | undefined;
                    previousReasoningEffort?: string | undefined;
                    previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
                    cause?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.mode_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousMode: "interactive" | "autopilot" | "plan";
                    newMode: "interactive" | "autopilot" | "plan";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.permissions_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    previousAllowAllPermissions: boolean;
                    allowAllPermissions: boolean;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.plan_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    operation: "create" | "update" | "delete";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.workspace_file_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    operation: "create" | "update";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.handoff";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    handoffTime: string;
                    sourceType: "remote" | "local";
                    repository?: {
                        name: string;
                        owner: string;
                        branch?: string | undefined;
                    } | undefined;
                    host?: string | undefined;
                    context?: string | undefined;
                    summary?: string | undefined;
                    remoteSessionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.truncation";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    preTruncationTokensInMessages: number;
                    preTruncationMessagesLength: number;
                    postTruncationTokensInMessages: number;
                    postTruncationMessagesLength: number;
                    tokensRemovedDuringTruncation: number;
                    messagesRemovedDuringTruncation: number;
                    performedBy: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.snapshot_rewind";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    eventsRemoved: number;
                    upToEventId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.shutdown";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    shutdownType: "error" | "routine";
                    totalApiDurationMs: number;
                    sessionStartTime: number;
                    codeChanges: {
                        linesAdded: number;
                        linesRemoved: number;
                        filesModified: string[];
                    };
                    modelMetrics: Record<string, {
                        usage: {
                            inputTokens: number;
                            outputTokens: number;
                            cacheReadTokens: number;
                            cacheWriteTokens: number;
                            reasoningTokens?: number | undefined;
                        };
                        requests: {
                            count?: number | undefined;
                            cost?: number | undefined;
                        };
                        totalNanoAiu?: number | undefined;
                        tokenDetails?: Record<string, {
                            tokenCount: number;
                        }> | undefined;
                    }>;
                    eventsFileSizeBytes?: number | undefined;
                    errorReason?: string | undefined;
                    totalPremiumRequests?: number | undefined;
                    totalNanoAiu?: number | undefined;
                    tokenDetails?: Record<string, {
                        tokenCount: number;
                    }> | undefined;
                    currentModel?: string | undefined;
                    currentTokens?: number | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.context_changed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    repositoryHost?: string | undefined;
                    branch?: string | undefined;
                    headCommit?: string | undefined;
                    baseCommit?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.usage_info";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tokenLimit: number;
                    currentTokens: number;
                    messagesLength: number;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    isInitial?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.compaction_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.compaction_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    error?: string | undefined;
                    serviceRequestId?: string | undefined;
                    systemTokens?: number | undefined;
                    conversationTokens?: number | undefined;
                    toolDefinitionsTokens?: number | undefined;
                    preCompactionTokens?: number | undefined;
                    postCompactionTokens?: number | undefined;
                    preCompactionMessagesLength?: number | undefined;
                    messagesRemoved?: number | undefined;
                    tokensRemoved?: number | undefined;
                    customInstructions?: string | undefined;
                    summaryContent?: string | undefined;
                    checkpointNumber?: number | undefined;
                    checkpointPath?: string | undefined;
                    compactionTokensUsed?: {
                        model?: string | undefined;
                        duration?: number | undefined;
                        inputTokens?: number | undefined;
                        outputTokens?: number | undefined;
                        cacheReadTokens?: number | undefined;
                        cacheWriteTokens?: number | undefined;
                        copilotUsage?: {
                            totalNanoAiu: number;
                            tokenDetails: {
                                tokenCount: number;
                                batchSize: number;
                                costPerBatch: number;
                                tokenType: string;
                            }[];
                        } | undefined;
                    } | undefined;
                    requestId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "session.task_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    summary: string;
                    success?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    source?: string | undefined;
                    transformedContent?: string | undefined;
                    attachments?: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[] | undefined;
                    supportedNativeDocumentMimeTypes?: string[] | undefined;
                    nativeDocumentPathFallbackPaths?: string[] | undefined;
                    agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
                    isAutopilotContinuation?: boolean | undefined;
                    interactionId?: string | undefined;
                    parentAgentTaskId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "pending_messages.modified";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                    interactionId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.intent";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    intent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    reasoningId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.reasoning_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reasoningId: string;
                    deltaContent: string;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.streaming_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    totalResponseSizeBytes: number;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    messageId: string;
                    model?: string | undefined;
                    serviceRequestId?: string | undefined;
                    outputTokens?: number | undefined;
                    requestId?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    toolRequests?: {
                        name: string;
                        toolCallId: string;
                        type?: "function" | "custom" | undefined;
                        mcpServerName?: string | undefined;
                        mcpToolName?: string | undefined;
                        arguments?: unknown;
                        toolTitle?: string | undefined;
                        intentionSummary?: string | null | undefined;
                    }[] | undefined;
                    reasoningOpaque?: string | undefined;
                    reasoningText?: string | undefined;
                    encryptedContent?: string | undefined;
                    phase?: string | undefined;
                    apiCallId?: string | undefined;
                    anthropicAdvisorBlocks?: unknown[] | undefined;
                    anthropicAdvisorModel?: string | undefined;
                    parentToolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.message_start";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    messageId: string;
                    phase?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.message_delta";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    deltaContent: string;
                    messageId: string;
                    parentToolCallId?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "assistant.turn_end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    turnId: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "assistant.usage";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                    duration?: number | undefined;
                    reasoningEffort?: string | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    cost?: number | undefined;
                    inputTokens?: number | undefined;
                    outputTokens?: number | undefined;
                    cacheReadTokens?: number | undefined;
                    cacheWriteTokens?: number | undefined;
                    reasoningTokens?: number | undefined;
                    copilotUsage?: {
                        totalNanoAiu: number;
                        tokenDetails: {
                            tokenCount: number;
                            batchSize: number;
                            costPerBatch: number;
                            tokenType: string;
                        }[];
                    } | undefined;
                    apiCallId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    timeToFirstTokenMs?: number | undefined;
                    interTokenLatencyMs?: number | undefined;
                    initiator?: string | undefined;
                    apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
                    quotaSnapshots?: Record<string, {
                        isUnlimitedEntitlement: boolean;
                        entitlementRequests: number;
                        usedRequests: number;
                        usageAllowedWithExhaustedQuota: boolean;
                        overage: number;
                        overageAllowedWithExhaustedQuota: boolean;
                        remainingPercentage: number;
                        resetDate?: Date | undefined;
                    }> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "model.call_failure";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    source: "top_level" | "subagent" | "mcp_sampling";
                    model?: string | undefined;
                    statusCode?: number | undefined;
                    providerCallId?: string | undefined;
                    serviceRequestId?: string | undefined;
                    apiCallId?: string | undefined;
                    initiator?: string | undefined;
                    durationMs?: number | undefined;
                    errorMessage?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "abort";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    reason: "user_initiated" | "remote_command" | "user_abort";
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.user_requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    arguments?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    toolName: string;
                    mcpServerName?: string | undefined;
                    mcpToolName?: string | undefined;
                    model?: string | undefined;
                    turnId?: string | undefined;
                    arguments?: unknown;
                    parentToolCallId?: string | undefined;
                    displayVerbatim?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "tool.execution_partial_result";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    partialOutput: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    progressMessage: string;
                };
                agentId?: string | undefined;
            } | {
                type: "tool.execution_complete";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    toolCallId: string;
                    result?: {
                        content: string;
                        detailedContent?: string | undefined;
                        contents?: ({
                            type: "text";
                            text: string;
                        } | {
                            type: "terminal";
                            text: string;
                            cwd?: string | undefined;
                            exitCode?: number | undefined;
                        } | {
                            type: "image";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "audio";
                            data: string;
                            mimeType: string;
                        } | {
                            type: "resource_link";
                            name: string;
                            uri: string;
                            description?: string | undefined;
                            title?: string | undefined;
                            mimeType?: string | undefined;
                            icons?: {
                                src: string;
                                theme?: "dark" | "light" | undefined;
                                mimeType?: string | undefined;
                                sizes?: string[] | undefined;
                            }[] | undefined;
                            size?: number | undefined;
                        } | {
                            type: "resource";
                            resource: {
                                text: string;
                                uri: string;
                                mimeType?: string | undefined;
                            } | {
                                blob: string;
                                uri: string;
                                mimeType?: string | undefined;
                            };
                        })[] | undefined;
                        uiResource?: {
                            mimeType: string;
                            uri: string;
                            blob?: string | undefined;
                            text?: string | undefined;
                            _meta?: {
                                ui?: {
                                    permissions?: {
                                        camera?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        microphone?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        geolocation?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                        clipboardWrite?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
                                    } | undefined;
                                    csp?: {
                                        connectDomains?: string[] | undefined;
                                        resourceDomains?: string[] | undefined;
                                        frameDomains?: string[] | undefined;
                                        baseUriDomains?: string[] | undefined;
                                    } | undefined;
                                    domain?: string | undefined;
                                    prefersBorder?: boolean | undefined;
                                } | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    error?: {
                        message: string;
                        code?: string | undefined;
                    } | undefined;
                    model?: string | undefined;
                    interactionId?: string | undefined;
                    turnId?: string | undefined;
                    parentToolCallId?: string | undefined;
                    isUserRequested?: boolean | undefined;
                    toolTelemetry?: Record<string, unknown> | undefined;
                    toolDescription?: {
                        name: string;
                        description?: string | undefined;
                        _meta?: {
                            ui?: {
                                resourceUri?: string | undefined;
                                visibility?: ("model" | "app")[] | undefined;
                            } | undefined;
                        } | undefined;
                    } | undefined;
                    sandboxed?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "skill.invoked";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    path: string;
                    name: string;
                    content: string;
                    description?: string | undefined;
                    source?: string | undefined;
                    allowedTools?: string[] | undefined;
                    pluginName?: string | undefined;
                    pluginVersion?: string | undefined;
                    trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.started";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    agentDescription: string;
                    model?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.failed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    error: string;
                    toolCallId: string;
                    agentName: string;
                    agentDisplayName: string;
                    model?: string | undefined;
                    durationMs?: number | undefined;
                    totalToolCalls?: number | undefined;
                    totalTokens?: number | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.selected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    tools: string[] | null;
                    agentName: string;
                    agentDisplayName: string;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "subagent.deselected";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.start";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    hookInvocationId: string;
                    hookType: string;
                    input?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.end";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    hookInvocationId: string;
                    hookType: string;
                    error?: {
                        message: string;
                        source?: string | undefined;
                        stack?: string | undefined;
                    } | undefined;
                    output?: unknown;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "hook.progress";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    temporary?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "system.message";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    role: "developer" | "system";
                    name?: string | undefined;
                    metadata?: {
                        promptVersion?: string | undefined;
                        variables?: Record<string, unknown> | undefined;
                    } | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "system.notification";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    content: string;
                    kind: {
                        status: "completed" | "failed";
                        type: "agent_completed";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                        prompt?: string | undefined;
                    } | {
                        type: "agent_idle";
                        agentId: string;
                        agentType: string;
                        description?: string | undefined;
                    } | {
                        type: "new_inbox_message";
                        summary: string;
                        entryId: string;
                        senderName: string;
                        senderType: string;
                    } | {
                        type: "shell_completed";
                        shellId: string;
                        description?: string | undefined;
                        exitCode?: number | undefined;
                    } | {
                        type: "shell_detached_completed";
                        shellId: string;
                        description?: string | undefined;
                    } | {
                        type: "instruction_discovered";
                        sourcePath: string;
                        triggerFile: string;
                        triggerTool: string;
                        description?: string | undefined;
                    };
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    permissionRequest: {
                        commands: readonly {
                            identifier: string;
                            readOnly: boolean;
                        }[];
                        kind: "shell";
                        fullCommandText: string;
                        intention: string;
                        possiblePaths: readonly string[];
                        possibleUrls: readonly {
                            url: string;
                        }[];
                        hasWriteFileRedirection: boolean;
                        canOfferSessionApproval: boolean;
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        readOnly: boolean;
                        serverName: string;
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    };
                    requestId: string;
                    promptRequest?: {
                        kind: "commands";
                        fullCommandText: string;
                        intention: string;
                        canOfferSessionApproval: boolean;
                        commandIdentifiers: readonly string[];
                        warning?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        kind: "write";
                        intention: string;
                        canOfferSessionApproval: boolean;
                        fileName: string;
                        diff: string;
                        toolCallId?: string | undefined;
                        newFileContents?: string | undefined;
                    } | {
                        path: string;
                        kind: "read";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        toolTitle: string;
                        toolName: string;
                        kind: "mcp";
                        serverName: string;
                        args?: unknown;
                        toolCallId?: string | undefined;
                    } | {
                        url: string;
                        kind: "url";
                        intention: string;
                        toolCallId?: string | undefined;
                    } | {
                        action: "store" | "vote";
                        kind: "memory";
                        fact: string;
                        toolCallId?: string | undefined;
                        reason?: string | undefined;
                        subject?: string | undefined;
                        citations?: string | undefined;
                        direction?: "upvote" | "downvote" | undefined;
                    } | {
                        toolName: string;
                        toolDescription: string;
                        kind: "custom-tool";
                        args?: any;
                        toolCallId?: string | undefined;
                    } | {
                        paths: readonly string[];
                        kind: "path";
                        accessKind: "read" | "write" | "shell";
                        toolCallId?: string | undefined;
                    } | {
                        toolName: string;
                        kind: "hook";
                        toolCallId?: string | undefined;
                        toolArgs?: unknown;
                        hookMessage?: string | undefined;
                    } | {
                        operation: string;
                        kind: "extension-management";
                        extensionName?: string | undefined;
                        toolCallId?: string | undefined;
                    } | {
                        extensionName: string;
                        capabilities: string[];
                        kind: "extension-permission-access";
                        toolCallId?: string | undefined;
                    } | undefined;
                    resolvedByHook?: boolean | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "permission.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    result: {
                        kind: "approved";
                    } | {
                        kind: "approved-for-session";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                    } | {
                        kind: "approved-for-location";
                        approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                        locationKey: string;
                    } | {
                        kind: "cancelled";
                        reason?: string | undefined;
                    } | {
                        rules: readonly Rule[];
                        kind: "denied-by-rules";
                    } | {
                        kind: "denied-no-approval-rule-and-could-not-request-from-user";
                    } | {
                        kind: "denied-interactively-by-user";
                        feedback?: string | undefined;
                        forceReject?: boolean | undefined;
                    } | {
                        path: string;
                        message: string;
                        kind: "denied-by-content-exclusion-policy";
                    } | {
                        kind: "denied-by-permission-request-hook";
                        message?: string | undefined;
                        interrupt?: boolean | undefined;
                    };
                    requestId: string;
                    toolCallId?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "user_input.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    question: string;
                    choices?: string[] | undefined;
                    toolCallId?: string | undefined;
                    allowFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "user_input.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    answer?: string | undefined;
                    wasFreeform?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    message: string;
                    requestId: string;
                    url?: string | undefined;
                    mode?: "url" | "form" | undefined;
                    toolCallId?: string | undefined;
                    elicitationSource?: string | undefined;
                    requestedSchema?: {
                        type: "object";
                        properties: Record<string, unknown>;
                        required?: string[] | undefined;
                    } | undefined;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "elicitation.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    content?: Record<string, string | number | boolean | string[]> | undefined;
                    action?: "accept" | "decline" | "cancel" | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    serverName: string;
                    mcpRequestId: string | number;
                } & {
                    [k: string]: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "sampling.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_required";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    serverUrl: string;
                    requestId: string;
                    serverName: string;
                    staticClientConfig?: {
                        clientId: string;
                        publicClient?: boolean | undefined;
                        grantType?: "client_credentials" | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "mcp.oauth_completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_notification";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    name: string;
                    source: string;
                    payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
                    version?: number | undefined;
                    subject?: Record<string, string> | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "external_tool.requested";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    sessionId: string;
                    requestId: string;
                    toolCallId: string;
                    toolName: string;
                    workingDirectory?: string | undefined;
                    arguments?: unknown;
                    traceparent?: string | undefined;
                    tracestate?: string | undefined;
                };
                ephemeral?: boolean | undefined;
                agentId?: string | undefined;
            } | {
                type: "external_tool.completed";
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                ephemeral?: true | undefined;
                agentId?: string | undefined;
            } | {
                type: "command.queued";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.execute";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    command: string;
                    args: string;
                    requestId: string;
                    commandName: string;
                };
                agentId?: string | undefined;
            } | {
                type: "command.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    errorCode?: string | undefined;
                    retryAfterSeconds?: number | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "auto_mode_switch.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    response: "yes" | "yes_always" | "no";
                };
                agentId?: string | undefined;
            } | {
                type: "commands.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    commands: {
                        name: string;
                        description?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "capabilities.changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    ui?: {
                        canvases?: boolean | undefined;
                        elicitation?: boolean | undefined;
                        mcpApps?: boolean | undefined;
                    } | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.requested";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
                    summary: string;
                    requestId: string;
                    planContent: string;
                    recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
                };
                agentId?: string | undefined;
            } | {
                type: "exit_plan_mode.completed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    requestId: string;
                    approved?: boolean | undefined;
                    feedback?: string | undefined;
                    selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                    autoApproveEdits?: boolean | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.tools_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    model: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.background_tasks_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {};
                agentId?: string | undefined;
            } | {
                type: "session.skills_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    skills: {
                        name: string;
                        description: string;
                        source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                        enabled: boolean;
                        userInvocable: boolean;
                        path?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.custom_agents_updated";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    agents: {
                        name: string;
                        description: string;
                        tools: string[] | null;
                        source: string;
                        id: string;
                        displayName: string;
                        userInvocable: boolean;
                        model?: string | undefined;
                    }[];
                    errors: string[];
                    warnings: string[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_servers_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    servers: {
                        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                        name: string;
                        error?: string | undefined;
                        source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
                        pluginName?: string | undefined;
                        pluginVersion?: string | undefined;
                        transport?: "stdio" | "http" | "sse" | "memory" | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.mcp_server_status_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                    serverName: string;
                    error?: string | undefined;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions_loaded";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    extensions: {
                        status: "disabled" | "failed" | "running" | "starting";
                        name: string;
                        source: "project" | "user";
                        id: string;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.opened";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                    reopen: boolean;
                    availability: "ready" | "stale";
                    status?: string | undefined;
                    url?: string | undefined;
                    title?: string | undefined;
                    extensionName?: string | undefined;
                    input?: unknown;
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.registry_changed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    canvases: {
                        description: string;
                        displayName: string;
                        extensionId: string;
                        canvasId: string;
                        inputSchema?: Record<string, unknown> | undefined;
                        actions?: {
                            name: string;
                            description?: string | undefined;
                            inputSchema?: Record<string, unknown> | undefined;
                        }[] | undefined;
                        extensionName?: string | undefined;
                    }[];
                };
                agentId?: string | undefined;
            } | {
                type: "session.canvas.closed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    instanceId: string;
                    extensionId: string;
                    canvasId: string;
                };
                agentId?: string | undefined;
            } | {
                type: "session.extensions.attachments_pushed";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    attachments: ({
                        path: string;
                        type: "file";
                        displayName: string;
                        lineRange?: {
                            start: number;
                            end: number;
                        } | undefined;
                    } | {
                        path: string;
                        type: "directory";
                        displayName: string;
                    } | {
                        type: "selection";
                        displayName: string;
                        selection: {
                            start: {
                                line: number;
                                character: number;
                            };
                            end: {
                                line: number;
                                character: number;
                            };
                        };
                        filePath: string;
                        text: string;
                    } | {
                        number: number;
                        type: "github_reference";
                        url: string;
                        state: string;
                        title: string;
                        referenceType: "pr" | "issue" | "discussion";
                    } | {
                        type: "blob";
                        data: string;
                        mimeType: string;
                        displayName?: string | undefined;
                    } | {
                        type: "extension_context";
                        title: string;
                        extensionId: string;
                        capturedAt: string;
                        instanceId?: string | undefined;
                        canvasId?: string | undefined;
                        payload?: unknown;
                    })[];
                };
                agentId?: string | undefined;
            } | {
                type: "mcp_app.tool_call_complete";
                ephemeral: true;
                id: string;
                timestamp: string;
                parentId: string | null;
                data: {
                    success: boolean;
                    durationMs: number;
                    toolName: string;
                    serverName: string;
                    result?: Record<string, unknown> | undefined;
                    error?: {
                        message: string;
                    } | undefined;
                    arguments?: Record<string, unknown> | undefined;
                    toolMeta?: z_2.objectOutputType<{
                        ui: z_2.ZodOptional<z_2.ZodObject<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
                            resourceUri: z_2.ZodOptional<z_2.ZodString>;
                            visibility: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, z_2.ZodTypeAny, "passthrough">>>;
                    }, z_2.ZodTypeAny, "passthrough"> | undefined;
                };
                agentId?: string | undefined;
            })[];
            hasMore: boolean;
            cursorStatus: "ok" | "expired";
        }>;
    };
    tail: {
        description: string;
        result: z_2.ZodObject<{
            cursor: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            cursor: string;
        }, {
            cursor: string;
        }>;
    };
    registerInterest: {
        description: string;
        params: z_2.ZodObject<{
            eventType: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            eventType: string;
        }, {
            eventType: string;
        }>;
        result: z_2.ZodObject<{
            handle: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            handle: string;
        }, {
            handle: string;
        }>;
    };
    releaseInterest: {
        description: string;
        params: z_2.ZodObject<{
            handle: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            handle: string;
        }, {
            handle: string;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
};

/**
 * 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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>;
        reasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        contextTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<["default", "long_context"]>>>;
        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"]>>;
            repositoryHost: z.ZodOptional<z.ZodString>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
        detachedFromSpawningParentSessionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    }, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.resume">;
    data: z.ZodObject<{
        resumeTime: z.ZodString;
        eventCount: z.ZodNumber;
        eventsFileSizeBytes: z.ZodOptional<z.ZodNumber>;
        selectedModel: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
        reasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        contextTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<["default", "long_context"]>>>;
        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"]>>;
            repositoryHost: z.ZodOptional<z.ZodString>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        sessionWasActive: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
        continuePendingWork: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    }, {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.resume";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.resume";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.remote_steerable_changed">;
    data: z.ZodObject<{
        remoteSteerable: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        remoteSteerable: boolean;
    }, {
        remoteSteerable: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.remote_steerable_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        remoteSteerable: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.remote_steerable_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        remoteSteerable: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.error">;
    data: z.ZodObject<{
        errorType: z.ZodString;
        errorCode: z.ZodOptional<z.ZodString>;
        eligibleForAutoSwitch: z.ZodOptional<z.ZodBoolean>;
        message: z.ZodString;
        stack: z.ZodOptional<z.ZodString>;
        statusCode: z.ZodOptional<z.ZodNumber>;
        providerCallId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    }, {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.error";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.error";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        errorType: string;
        url?: string | undefined;
        errorCode?: string | undefined;
        eligibleForAutoSwitch?: boolean | undefined;
        stack?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "session.idle";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        aborted?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.idle";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        aborted?: boolean | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "session.title_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        title: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.title_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        title: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.schedule_created">;
    data: z.ZodObject<{
        id: z.ZodNumber;
        intervalMs: z.ZodOptional<z.ZodNumber>;
        cron: z.ZodOptional<z.ZodString>;
        tz: z.ZodOptional<z.ZodString>;
        at: z.ZodOptional<z.ZodNumber>;
        prompt: z.ZodString;
        recurring: z.ZodOptional<z.ZodBoolean>;
        displayPrompt: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    }, {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.schedule_created";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.schedule_created";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.schedule_cancelled">;
    data: z.ZodObject<{
        id: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        id: number;
    }, {
        id: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.schedule_cancelled";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        id: number;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.schedule_cancelled";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        id: number;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.autopilot_objective_changed">;
    data: z.ZodObject<{
        operation: z.ZodEnum<["create", "update", "delete"]>;
        id: z.ZodOptional<z.ZodNumber>;
        status: z.ZodOptional<z.ZodEnum<["active", "paused", "cap_reached", "completed"]>>;
    }, "strip", z.ZodTypeAny, {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    }, {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.autopilot_objective_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.autopilot_objective_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
        status?: "completed" | "active" | "paused" | "cap_reached" | undefined;
        id?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.info">;
    data: z.ZodObject<{
        infoType: z.ZodString;
        message: z.ZodString;
        url: z.ZodOptional<z.ZodString>;
        tip: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    }, {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.info";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.info";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "session.warning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.warning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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.ZodNullable<z.ZodString>>;
        previousReasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        reasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        contextTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<["default", "long_context"]>>>;
        cause: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    }, {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.model_change";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.model_change";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.mode_changed">;
    data: z.ZodObject<{
        previousMode: z.ZodEnum<["interactive", "plan", "autopilot"]>;
        newMode: z.ZodEnum<["interactive", "plan", "autopilot"]>;
    }, "strip", z.ZodTypeAny, {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    }, {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.mode_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.mode_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.permissions_changed">;
    data: z.ZodObject<{
        previousAllowAllPermissions: z.ZodBoolean;
        allowAllPermissions: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    }, {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.permissions_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.permissions_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.plan_changed">;
    data: z.ZodObject<{
        operation: z.ZodEnum<["create", "update", "delete"]>;
    }, "strip", z.ZodTypeAny, {
        operation: "create" | "update" | "delete";
    }, {
        operation: "create" | "update" | "delete";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.plan_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.plan_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.workspace_file_changed">;
    data: z.ZodObject<{
        path: z.ZodString;
        operation: z.ZodEnum<["create", "update"]>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        operation: "create" | "update";
    }, {
        path: string;
        operation: "create" | "update";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.workspace_file_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        operation: "create" | "update";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.workspace_file_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        operation: "create" | "update";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    }, {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.handoff";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.handoff";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.truncation">;
    data: z.ZodObject<{
        tokenLimit: z.ZodNumber;
        preTruncationTokensInMessages: z.ZodNumber;
        preTruncationMessagesLength: z.ZodNumber;
        postTruncationTokensInMessages: z.ZodNumber;
        postTruncationMessagesLength: z.ZodNumber;
        tokensRemovedDuringTruncation: z.ZodNumber;
        messagesRemovedDuringTruncation: z.ZodNumber;
        performedBy: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.truncation";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.truncation";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "session.snapshot_rewind";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.snapshot_rewind";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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.ZodOptional<z.ZodNumber>;
        /** Session-wide accumulated nano-AI units cost */
        totalNanoAiu: z.ZodOptional<z.ZodNumber>;
        /** Session-wide token count details per type */
        tokenDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            tokenCount: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            tokenCount: number;
        }, {
            tokenCount: number;
        }>>>;
        /** Total time spent in API calls (milliseconds) */
        totalApiDurationMs: z.ZodNumber;
        /** Session start time (Unix timestamp) */
        sessionStartTime: z.ZodNumber;
        /** On-disk byte size of the session's persisted events.jsonl file at shutdown */
        eventsFileSizeBytes: z.ZodOptional<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.ZodOptional<z.ZodNumber>;
                cost: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                count?: number | undefined;
                cost?: number | undefined;
            }, {
                count?: number | undefined;
                cost?: number | undefined;
            }>;
            usage: z.ZodObject<{
                inputTokens: z.ZodNumber;
                outputTokens: z.ZodNumber;
                cacheReadTokens: z.ZodNumber;
                cacheWriteTokens: z.ZodNumber;
                reasoningTokens: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }>;
            totalNanoAiu: z.ZodOptional<z.ZodNumber>;
            tokenDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
                tokenCount: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                tokenCount: number;
            }, {
                tokenCount: number;
            }>>>;
        }, "strip", z.ZodTypeAny, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>>;
        /** 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";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }, {
        shutdownType: "error" | "routine";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.shutdown";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        shutdownType: "error" | "routine";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.shutdown";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        shutdownType: "error" | "routine";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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"]>>;
        repositoryHost: z.ZodOptional<z.ZodString>;
        branch: z.ZodOptional<z.ZodString>;
        headCommit: z.ZodOptional<z.ZodString>;
        baseCommit: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }, {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.context_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.context_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        cwd: string;
        repository?: string | undefined;
        gitRoot?: string | undefined;
        hostType?: "github" | "ado" | undefined;
        repositoryHost?: string | undefined;
        branch?: string | undefined;
        headCommit?: string | undefined;
        baseCommit?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "session.usage_info";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.usage_info";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "session.compaction_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.compaction_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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>;
        customInstructions: z.ZodOptional<z.ZodString>;
        summaryContent: z.ZodOptional<z.ZodString>;
        checkpointNumber: z.ZodOptional<z.ZodNumber>;
        checkpointPath: z.ZodOptional<z.ZodString>;
        compactionTokensUsed: z.ZodOptional<z.ZodObject<{
            inputTokens: z.ZodOptional<z.ZodNumber>;
            outputTokens: z.ZodOptional<z.ZodNumber>;
            cacheReadTokens: z.ZodOptional<z.ZodNumber>;
            cacheWriteTokens: z.ZodOptional<z.ZodNumber>;
            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, {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            }, {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            }>>;
            duration: z.ZodOptional<z.ZodNumber>;
            model: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        }, {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        }>>;
        requestId: z.ZodOptional<z.ZodString>;
        serviceRequestId: 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;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    }, {
        success: boolean;
        error?: string | undefined;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.compaction_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        error?: string | undefined;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.compaction_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        error?: string | undefined;
        serviceRequestId?: string | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        preCompactionTokens?: number | undefined;
        postCompactionTokens?: number | undefined;
        preCompactionMessagesLength?: number | undefined;
        messagesRemoved?: number | undefined;
        tokensRemoved?: number | undefined;
        customInstructions?: string | undefined;
        summaryContent?: string | undefined;
        checkpointNumber?: number | undefined;
        checkpointPath?: string | undefined;
        compactionTokensUsed?: {
            model?: string | undefined;
            duration?: number | undefined;
            inputTokens?: number | undefined;
            outputTokens?: number | undefined;
            cacheReadTokens?: number | undefined;
            cacheWriteTokens?: number | undefined;
            copilotUsage?: {
                totalNanoAiu: number;
                tokenDetails: {
                    tokenCount: number;
                    batchSize: number;
                    costPerBatch: number;
                    tokenType: string;
                }[];
            } | undefined;
        } | undefined;
        requestId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.task_complete">;
    data: z.ZodObject<{
        summary: z.ZodDefault<z.ZodString>;
        success: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        summary: string;
        success?: boolean | undefined;
    }, {
        summary?: string | undefined;
        success?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.task_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        summary: string;
        success?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.task_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        summary?: string | undefined;
        success?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
                start: number;
                end: number;
            }, {
                start: number;
                end: number;
            }>>;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"directory">;
            path: z.ZodString;
            displayName: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "directory";
            displayName: string;
        }, {
            path: string;
            type: "directory";
            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, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }>;
        }, "strip", z.ZodTypeAny, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"github_reference">;
            number: z.ZodNumber;
            title: z.ZodString;
            referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
            state: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            number: number;
            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, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"extension_context">;
            extensionId: z.ZodString;
            canvasId: z.ZodOptional<z.ZodString>;
            instanceId: z.ZodOptional<z.ZodString>;
            title: z.ZodString;
            payload: z.ZodUnknown;
            capturedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }>]>, "many">>;
        supportedNativeDocumentMimeTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        nativeDocumentPathFallbackPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        source: z.ZodOptional<z.ZodString>;
        /** The agent mode active when this message was sent */
        agentMode: z.ZodOptional<z.ZodEnum<["interactive", "plan", "autopilot", "shell"]>>;
        isAutopilotContinuation: z.ZodOptional<z.ZodBoolean>;
        /** The CAPI interaction ID for this user message turn */
        interactionId: z.ZodOptional<z.ZodString>;
        /** Parent agent task ID for background telemetry correlated to this user turn */
        parentAgentTaskId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    }, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "user.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "user.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"pending_messages.modified">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    type: "pending_messages.modified";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}, {
    type: "pending_messages.modified";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "assistant.turn_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.turn_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
        interactionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "assistant.intent";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        intent: string;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.intent";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        intent: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "assistant.reasoning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        reasoningId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.reasoning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        reasoningId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "assistant.reasoning_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.reasoning_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reasoningId: string;
        deltaContent: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "assistant.streaming_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        totalResponseSizeBytes: number;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.streaming_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        totalResponseSizeBytes: number;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.message">;
    data: z.ZodObject<{
        messageId: z.ZodString;
        model: z.ZodOptional<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>;
            mcpToolName: 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;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }, {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }>, "many">>;
        reasoningOpaque: z.ZodOptional<z.ZodString>;
        reasoningText: z.ZodOptional<z.ZodString>;
        encryptedContent: z.ZodOptional<z.ZodString>;
        /** Phase of generation for phased-output models (e.g. gpt-5.3-codex). */
        phase: z.ZodOptional<z.ZodString>;
        /** Actual output token count from the API response (completion_tokens).
         *  Used for accurate token counting instead of estimation. Optional for
         *  backwards compatibility with existing sessions that don't have this field. */
        outputTokens: z.ZodOptional<z.ZodNumber>;
        /** The CAPI interaction ID for this message */
        interactionId: z.ZodOptional<z.ZodString>;
        requestId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        /** Provider's completion / response identifier. Shared across all chunks
         *  of a single API call when the model emits multi-chunk responses (e.g.
         *  gpt-5.5 with tool_search). Used to group multi-chunk assistant
         *  utterances for coalescing in telemetry, cross-transport normalization,
         *  and UI. */
        apiCallId: z.ZodOptional<z.ZodString>;
        /** Raw Anthropic content blocks containing advisor tool_use/result pairs.
         *  Stored so they can be round-tripped verbatim on subsequent turns. */
        anthropicAdvisorBlocks: z.ZodOptional<z.ZodArray<z.ZodUnknown, "many">>;
        /** Model ID of the advisor used for this message (e.g. "claude-opus-4-7"). */
        anthropicAdvisorModel: z.ZodOptional<z.ZodString>;
        /** Identifier for the agent loop turn this message was produced in. */
        turnId: z.ZodOptional<z.ZodString>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    }, {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        messageId: string;
        model?: string | undefined;
        serviceRequestId?: string | undefined;
        outputTokens?: number | undefined;
        requestId?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        toolRequests?: {
            name: string;
            toolCallId: string;
            type?: "function" | "custom" | undefined;
            mcpServerName?: string | undefined;
            mcpToolName?: string | undefined;
            arguments?: unknown;
            toolTitle?: string | undefined;
            intentionSummary?: string | null | undefined;
        }[] | undefined;
        reasoningOpaque?: string | undefined;
        reasoningText?: string | undefined;
        encryptedContent?: string | undefined;
        phase?: string | undefined;
        apiCallId?: string | undefined;
        anthropicAdvisorBlocks?: unknown[] | undefined;
        anthropicAdvisorModel?: string | undefined;
        parentToolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.message_start">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        messageId: z.ZodString;
        phase: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        messageId: string;
        phase?: string | undefined;
    }, {
        messageId: string;
        phase?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.message_start";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        messageId: string;
        phase?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.message_start";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        messageId: string;
        phase?: string | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "assistant.message_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.message_delta";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        deltaContent: string;
        messageId: string;
        parentToolCallId?: string | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"assistant.turn_end">;
    data: z.ZodObject<{
        turnId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        turnId: string;
    }, {
        turnId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.turn_end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "assistant.turn_end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        turnId: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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>;
        timeToFirstTokenMs: z.ZodOptional<z.ZodNumber>;
        interTokenLatencyMs: z.ZodOptional<z.ZodNumber>;
        initiator: z.ZodOptional<z.ZodString>;
        apiCallId: z.ZodOptional<z.ZodString>;
        providerCallId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        apiEndpoint: z.ZodOptional<z.ZodEnum<["/chat/completions", "/v1/messages", "/responses", "ws:/responses"]>>;
        /** @deprecated Use `agentId` on the event envelope instead. */
        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, {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        }, {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        }>>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    }, {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "assistant.usage";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "assistant.usage";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
        duration?: number | undefined;
        reasoningEffort?: string | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        cost?: number | undefined;
        inputTokens?: number | undefined;
        outputTokens?: number | undefined;
        cacheReadTokens?: number | undefined;
        cacheWriteTokens?: number | undefined;
        reasoningTokens?: number | undefined;
        copilotUsage?: {
            totalNanoAiu: number;
            tokenDetails: {
                tokenCount: number;
                batchSize: number;
                costPerBatch: number;
                tokenType: string;
            }[];
        } | undefined;
        apiCallId?: string | undefined;
        parentToolCallId?: string | undefined;
        timeToFirstTokenMs?: number | undefined;
        interTokenLatencyMs?: number | undefined;
        initiator?: string | undefined;
        apiEndpoint?: "/chat/completions" | "/v1/messages" | "/responses" | "ws:/responses" | undefined;
        quotaSnapshots?: Record<string, {
            isUnlimitedEntitlement: boolean;
            entitlementRequests: number;
            usedRequests: number;
            usageAllowedWithExhaustedQuota: boolean;
            overage: number;
            overageAllowedWithExhaustedQuota: boolean;
            remainingPercentage: number;
            resetDate?: Date | undefined;
        }> | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"model.call_failure">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        model: z.ZodOptional<z.ZodString>;
        initiator: z.ZodOptional<z.ZodString>;
        apiCallId: z.ZodOptional<z.ZodString>;
        providerCallId: z.ZodOptional<z.ZodString>;
        serviceRequestId: z.ZodOptional<z.ZodString>;
        statusCode: z.ZodOptional<z.ZodNumber>;
        durationMs: z.ZodOptional<z.ZodNumber>;
        source: z.ZodEnum<["top_level", "subagent", "mcp_sampling"]>;
        /**
         * Raw provider/runtime error string. This may contain prompt fragments or other
         * sensitive context and must only be emitted through restricted telemetry.
         */
        errorMessage: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    }, {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "model.call_failure";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "model.call_failure";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        source: "top_level" | "subagent" | "mcp_sampling";
        model?: string | undefined;
        statusCode?: number | undefined;
        providerCallId?: string | undefined;
        serviceRequestId?: string | undefined;
        apiCallId?: string | undefined;
        initiator?: string | undefined;
        durationMs?: number | undefined;
        errorMessage?: string | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"abort">;
    data: z.ZodObject<{
        reason: z.ZodEnum<["user_initiated", "remote_command", "user_abort"]>;
    }, "strip", z.ZodTypeAny, {
        reason: "user_initiated" | "remote_command" | "user_abort";
    }, {
        reason: "user_initiated" | "remote_command" | "user_abort";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "abort";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reason: "user_initiated" | "remote_command" | "user_abort";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "abort";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        reason: "user_initiated" | "remote_command" | "user_abort";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "tool.user_requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "tool.user_requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"tool.execution_start">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        /** The model that generated the tool call. */
        model: z.ZodOptional<z.ZodString>;
        mcpServerName: z.ZodOptional<z.ZodString>;
        mcpToolName: z.ZodOptional<z.ZodString>;
        /** Identifier for the agent loop turn this tool was invoked in. */
        turnId: z.ZodOptional<z.ZodString>;
        displayVerbatim: z.ZodOptional<z.ZodBoolean>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    }, {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "tool.execution_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "tool.execution_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "tool.execution_partial_result";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    agentId?: string | undefined;
}, {
    type: "tool.execution_partial_result";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "tool.execution_progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    agentId?: string | undefined;
}, {
    type: "tool.execution_progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
                type: "text";
                text: string;
            }, {
                type: "text";
                text: string;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"terminal">;
                text: z.ZodString;
                exitCode: z.ZodOptional<z.ZodNumber>;
                cwd: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            }, {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"image">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                type: "image";
                data: string;
                mimeType: string;
            }, {
                type: "image";
                data: string;
                mimeType: string;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"audio">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                type: "audio";
                data: string;
                mimeType: string;
            }, {
                type: "audio";
                data: string;
                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?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }, {
                    src: string;
                    theme?: "dark" | "light" | 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;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            }, {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"resource">;
                resource: z.ZodUnion<[z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>, z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    blob: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>]>;
            }, "strip", z.ZodTypeAny, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }>]>, "many">>;
            /**
             * MCP Apps (SEP-1865) UI resource resolved alongside the tool result.
             * Present when the tool declared `_meta.ui.resourceUri` and the host
             * fetched the resource. Hosts render this in a sandboxed iframe per
             * the SEP-1865 security model.
             */
            uiResource: z.ZodOptional<z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodString;
                text: z.ZodOptional<z.ZodString>;
                blob: z.ZodOptional<z.ZodString>;
                _meta: z.ZodOptional<z.ZodObject<{
                    ui: z.ZodOptional<z.ZodObject<{
                        csp: z.ZodOptional<z.ZodObject<{
                            connectDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            resourceDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            frameDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            baseUriDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        }, "strip", z.ZodTypeAny, {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        }, {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        }>>;
                        permissions: z.ZodOptional<z.ZodObject<{
                            camera: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                            microphone: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                            geolocation: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                            clipboardWrite: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                        }, "strip", z.ZodTypeAny, {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        }, {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        }>>;
                        domain: z.ZodOptional<z.ZodString>;
                        prefersBorder: z.ZodOptional<z.ZodBoolean>;
                    }, "strip", z.ZodTypeAny, {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    }, {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    }>>;
                }, "strip", z.ZodTypeAny, {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                }, {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                }>>;
            }, "strip", z.ZodTypeAny, {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            }, {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            }>>;
        }, "strip", z.ZodTypeAny, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        }, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        }>>;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
            code: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            code?: string | undefined;
        }, {
            message: string;
            code?: string | undefined;
        }>>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        /** Identifier for the agent loop turn this tool was invoked in. */
        turnId: z.ZodOptional<z.ZodString>;
        /**
         * MCP Apps (SEP-1865) tool definition metadata for the completed tool.
         * Populated for MCP tools that declare `_meta.ui` so consumers can locate
         * the linked UI resource without an extra lookup.
         */
        toolDescription: z.ZodOptional<z.ZodObject<{
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            _meta: z.ZodOptional<z.ZodObject<{
                ui: z.ZodOptional<z.ZodObject<{
                    resourceUri: z.ZodOptional<z.ZodString>;
                    visibility: z.ZodOptional<z.ZodArray<z.ZodEnum<["model", "app"]>, "many">>;
                }, "strip", z.ZodTypeAny, {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                }, {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                }>>;
            }, "strip", z.ZodTypeAny, {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            }, {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            }>>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        }, {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        }>>;
        /** Whether this tool was executed inside a sandbox container. */
        sandboxed: z.ZodOptional<z.ZodBoolean>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    }, {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "tool.execution_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "tool.execution_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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">>;
        /** Source identifier for where the skill was discovered. Known values include: project, inherited, personal-copilot, personal-agents, personal-claude, custom, plugin, builtin, and remote. */
        source: z.ZodOptional<z.ZodString>;
        /** 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>;
        /** What triggered this skill invocation (`user-invoked` | `agent-invoked` | `context-load`). */
        trigger: z.ZodOptional<z.ZodEnum<["user-invoked", "agent-invoked", "context-load"]>>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    }, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "skill.invoked";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "skill.invoked";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"subagent.started">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        agentDescription: z.ZodString;
        model: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "subagent.started";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.started";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "subagent.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "subagent.failed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.failed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "subagent.selected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.selected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"subagent.deselected">;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    type: "subagent.deselected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.deselected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "hook.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "hook.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        hookInvocationId: string;
        hookType: string;
        input?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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>;
            source: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        }, {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }, {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "hook.end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "hook.end";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        hookInvocationId: string;
        hookType: string;
        error?: {
            message: string;
            source?: string | undefined;
            stack?: string | undefined;
        } | undefined;
        output?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"hook.progress">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        message: z.ZodString;
        temporary: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        temporary?: boolean | undefined;
    }, {
        message: string;
        temporary?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "hook.progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        temporary?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "hook.progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        temporary?: boolean | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }, {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "system.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "system.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"system.notification">;
    data: z.ZodObject<{
        content: z.ZodString;
        kind: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
            type: z.ZodLiteral<"agent_completed">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            status: z.ZodEnum<["completed", "failed"]>;
            description: z.ZodOptional<z.ZodString>;
            prompt: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"agent_idle">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"new_inbox_message">;
            entryId: z.ZodString;
            senderName: z.ZodString;
            senderType: z.ZodString;
            summary: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        }, {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        }>, 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;
            description?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | 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;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"instruction_discovered">;
            sourcePath: z.ZodString;
            triggerFile: z.ZodString;
            triggerTool: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        }, {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    }, {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "system.notification";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "system.notification";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.requested">;
    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, {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: 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";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"read">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            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, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        }, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        }>, 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;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        }, {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | 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, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }>, 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, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-management">;
            toolCallId: z.ZodOptional<z.ZodString>;
            operation: z.ZodString;
            extensionName: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-permission-access">;
            toolCallId: z.ZodOptional<z.ZodString>;
            extensionName: z.ZodString;
            capabilities: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }>]>;
        promptRequest: z.ZodOptional<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
            kind: z.ZodLiteral<"commands">;
            toolCallId: z.ZodOptional<z.ZodString>;
            fullCommandText: z.ZodString;
            intention: z.ZodString;
            commandIdentifiers: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
            canOfferSessionApproval: z.ZodBoolean;
            warning: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            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";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }, {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"read">;
            toolCallId: z.ZodOptional<z.ZodString>;
            intention: z.ZodString;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            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.ZodNullable<z.ZodUnknown>;
        }, "strip", z.ZodTypeAny, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        }, {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        }>, 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;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        }, {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"custom-tool">;
            toolCallId: z.ZodOptional<z.ZodString>;
            toolName: z.ZodString;
            toolDescription: z.ZodString;
            args: z.ZodOptional<z.ZodAny>;
        }, "strip", z.ZodTypeAny, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }, {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"path">;
            toolCallId: z.ZodOptional<z.ZodString>;
            accessKind: z.ZodEnum<["read", "shell", "write"]>;
            paths: z.ZodReadonly<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        }, {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        }>, 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, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }, {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-management">;
            toolCallId: z.ZodOptional<z.ZodString>;
            operation: z.ZodString;
            extensionName: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }, {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"extension-permission-access">;
            toolCallId: z.ZodOptional<z.ZodString>;
            extensionName: z.ZodString;
            capabilities: z.ZodArray<z.ZodString, "many">;
        }, "strip", z.ZodTypeAny, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }, {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        }>]>>;
        resolvedByHook: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    }, {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "permission.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            action: "store" | "vote";
            kind: "memory";
            fact: string;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "permission.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        permissionRequest: {
            commands: readonly {
                identifier: string;
                readOnly: boolean;
            }[];
            kind: "shell";
            fullCommandText: string;
            intention: string;
            possiblePaths: readonly string[];
            possibleUrls: readonly {
                url: string;
            }[];
            hasWriteFileRedirection: boolean;
            canOfferSessionApproval: boolean;
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            readOnly: boolean;
            serverName: string;
            args?: any;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        };
        requestId: string;
        promptRequest?: {
            kind: "commands";
            fullCommandText: string;
            intention: string;
            canOfferSessionApproval: boolean;
            commandIdentifiers: readonly string[];
            warning?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            kind: "write";
            intention: string;
            canOfferSessionApproval: boolean;
            fileName: string;
            diff: string;
            toolCallId?: string | undefined;
            newFileContents?: string | undefined;
        } | {
            path: string;
            kind: "read";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            toolTitle: string;
            toolName: string;
            kind: "mcp";
            serverName: string;
            args?: unknown;
            toolCallId?: string | undefined;
        } | {
            url: string;
            kind: "url";
            intention: string;
            toolCallId?: string | undefined;
        } | {
            kind: "memory";
            fact: string;
            action?: "store" | "vote" | undefined;
            toolCallId?: string | undefined;
            reason?: string | undefined;
            subject?: string | undefined;
            citations?: string | undefined;
            direction?: "upvote" | "downvote" | undefined;
        } | {
            toolName: string;
            toolDescription: string;
            kind: "custom-tool";
            args?: any;
            toolCallId?: string | undefined;
        } | {
            paths: readonly string[];
            kind: "path";
            accessKind: "read" | "write" | "shell";
            toolCallId?: string | undefined;
        } | {
            toolName: string;
            kind: "hook";
            toolCallId?: string | undefined;
            toolArgs?: unknown;
            hookMessage?: string | undefined;
        } | {
            operation: string;
            kind: "extension-management";
            extensionName?: string | undefined;
            toolCallId?: string | undefined;
        } | {
            extensionName: string;
            capabilities: string[];
            kind: "extension-permission-access";
            toolCallId?: string | undefined;
        } | undefined;
        resolvedByHook?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"permission.completed">;
    data: z.ZodObject<{
        requestId: z.ZodString;
        toolCallId: z.ZodOptional<z.ZodString>;
        result: z.ZodDiscriminatedUnion<"kind", readonly [z.ZodObject<{
            kind: z.ZodLiteral<"approved">;
        }, "strip", z.ZodTypeAny, {
            kind: "approved";
        }, {
            kind: "approved";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"approved-for-session">;
            approval: z.ZodType<SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">, z.ZodTypeDef, SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">>;
        }, "strip", z.ZodTypeAny, {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        }, {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"approved-for-location">;
            approval: z.ZodType<SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">, z.ZodTypeDef, SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">>;
            locationKey: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        }, {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"cancelled">;
            reason: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            kind: "cancelled";
            reason?: string | undefined;
        }, {
            kind: "cancelled";
            reason?: string | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-by-rules">;
            rules: z.ZodReadonly<z.ZodArray<z.ZodType<Rule, z.ZodTypeDef, Rule>, "many">>;
        }, "strip", z.ZodTypeAny, {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        }, {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-no-approval-rule-and-could-not-request-from-user">;
        }, "strip", z.ZodTypeAny, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        }, {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-interactively-by-user">;
            feedback: z.ZodOptional<z.ZodString>;
            forceReject: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        }, {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-by-content-exclusion-policy">;
            path: z.ZodString;
            message: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        }, {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        }>, z.ZodObject<{
            kind: z.ZodLiteral<"denied-by-permission-request-hook">;
            message: z.ZodOptional<z.ZodString>;
            interrupt: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.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", z.ZodTypeAny, {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    }, {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "permission.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "permission.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        result: {
            kind: "approved";
        } | {
            kind: "approved-for-session";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
        } | {
            kind: "approved-for-location";
            approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            locationKey: string;
        } | {
            kind: "cancelled";
            reason?: string | undefined;
        } | {
            rules: readonly Rule[];
            kind: "denied-by-rules";
        } | {
            kind: "denied-no-approval-rule-and-could-not-request-from-user";
        } | {
            kind: "denied-interactively-by-user";
            feedback?: string | undefined;
            forceReject?: boolean | undefined;
        } | {
            path: string;
            message: string;
            kind: "denied-by-content-exclusion-policy";
        } | {
            kind: "denied-by-permission-request-hook";
            message?: string | undefined;
            interrupt?: boolean | undefined;
        };
        requestId: string;
        toolCallId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "user_input.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "user_input.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "user_input.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "user_input.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "elicitation.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}, {
    type: "elicitation.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        requestId: string;
        url?: string | undefined;
        mode?: "url" | "form" | undefined;
        toolCallId?: string | undefined;
        elicitationSource?: string | undefined;
        requestedSchema?: {
            type: "object";
            properties: Record<string, unknown>;
            required?: string[] | undefined;
        } | undefined;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    }, {
        requestId: string;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "elicitation.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "elicitation.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        content?: Record<string, string | number | boolean | string[]> | undefined;
        action?: "accept" | "decline" | "cancel" | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "sampling.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}, {
    type: "sampling.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        serverName: string;
        mcpRequestId: string | number;
    } & {
        [k: string]: unknown;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "sampling.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "sampling.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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>;
            grantType: z.ZodOptional<z.ZodLiteral<"client_credentials">>;
        }, "strip", z.ZodTypeAny, {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        }, {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    }, {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "mcp.oauth_required";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "mcp.oauth_required";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        serverUrl: string;
        requestId: string;
        serverName: string;
        staticClientConfig?: {
            clientId: string;
            publicClient?: boolean | undefined;
            grantType?: "client_credentials" | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "mcp.oauth_completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "mcp.oauth_completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.custom_notification">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        source: z.ZodString;
        name: z.ZodString;
        version: z.ZodOptional<z.ZodNumber>;
        subject: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        payload: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodNull, z.ZodArray<z.ZodUnknown, "many">, z.ZodRecord<z.ZodString, z.ZodUnknown>]>, string | number | boolean | unknown[] | Record<string, unknown> | null, string | number | boolean | unknown[] | Record<string, unknown> | null>;
    }, "strip", z.ZodTypeAny, {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    }, {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.custom_notification";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.custom_notification";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        name: string;
        source: string;
        payload: string | number | boolean | unknown[] | Record<string, unknown> | null;
        version?: number | undefined;
        subject?: Record<string, string> | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.requested">;
    data: z.ZodObject<{
        requestId: z.ZodString;
        sessionId: z.ZodString;
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        workingDirectory: z.ZodOptional<z.ZodString>;
        traceparent: z.ZodOptional<z.ZodString>;
        tracestate: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }, {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "external_tool.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "external_tool.requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        sessionId: string;
        requestId: string;
        toolCallId: string;
        toolName: string;
        workingDirectory?: string | undefined;
        arguments?: unknown;
        traceparent?: string | undefined;
        tracestate?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"external_tool.completed">;
    ephemeral: z.ZodOptional<z.ZodLiteral<true>>;
    data: z.ZodObject<{
        requestId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
    }, {
        requestId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "external_tool.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    ephemeral?: true | undefined;
    agentId?: string | undefined;
}, {
    type: "external_tool.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    ephemeral?: true | undefined;
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "command.queued";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "command.queued";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        requestId: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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;
        args: string;
        requestId: string;
        commandName: string;
    }, {
        command: string;
        args: string;
        requestId: string;
        commandName: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "command.execute";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        args: string;
        requestId: string;
        commandName: string;
    };
    agentId?: string | undefined;
}, {
    type: "command.execute";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        command: string;
        args: string;
        requestId: string;
        commandName: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "command.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}, {
    type: "command.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"auto_mode_switch.requested">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        errorCode: z.ZodOptional<z.ZodString>;
        retryAfterSeconds: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    }, {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "auto_mode_switch.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "auto_mode_switch.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        errorCode?: string | undefined;
        retryAfterSeconds?: number | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"auto_mode_switch.completed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        requestId: z.ZodString;
        response: z.ZodEnum<["yes", "yes_always", "no"]>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    }, {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "auto_mode_switch.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    };
    agentId?: string | undefined;
}, {
    type: "auto_mode_switch.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        response: "yes" | "yes_always" | "no";
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "commands.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "commands.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        commands: {
            name: string;
            description?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"capabilities.changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        ui: z.ZodOptional<z.ZodObject<{
            elicitation: z.ZodOptional<z.ZodBoolean>;
            mcpApps: z.ZodOptional<z.ZodBoolean>;
            canvases: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        }, {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        }>>;
    }, "strip", z.ZodTypeAny, {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    }, {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "capabilities.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "capabilities.changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        ui?: {
            canvases?: boolean | undefined;
            elicitation?: boolean | undefined;
            mcpApps?: boolean | undefined;
        } | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>, "many">;
        recommendedAction: z.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>;
    }, "strip", z.ZodTypeAny, {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    }, {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "exit_plan_mode.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    };
    agentId?: string | undefined;
}, {
    type: "exit_plan_mode.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        actions: ("exit_only" | "interactive" | "autopilot" | "autopilot_fleet")[];
        summary: string;
        requestId: string;
        planContent: string;
        recommendedAction: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet";
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>>;
        autoApproveEdits: z.ZodOptional<z.ZodBoolean>;
        feedback: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    }, {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "exit_plan_mode.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "exit_plan_mode.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        approved?: boolean | undefined;
        feedback?: string | undefined;
        selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
        autoApproveEdits?: boolean | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "session.tools_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.tools_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.background_tasks_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    type: "session.background_tasks_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}, {
    type: "session.background_tasks_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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.ZodEnum<["project", "inherited", "personal-copilot", "personal-agents", "plugin", "custom", "builtin"]>;
            userInvocable: z.ZodBoolean;
            enabled: z.ZodBoolean;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }, {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }, {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.skills_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.skills_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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.ZodNullable<z.ZodArray<z.ZodString, "many">>;
            userInvocable: z.ZodBoolean;
            model: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }, {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: 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: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    }, {
        agents: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.custom_agents_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        agents: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    };
    agentId?: string | undefined;
}, {
    type: "session.custom_agents_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        agents: {
            name: string;
            description: string;
            tools: string[] | null;
            source: string;
            id: string;
            displayName: string;
            userInvocable: boolean;
            model?: string | undefined;
        }[];
        errors: string[];
        warnings: string[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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.ZodEnum<["user", "workspace", "plugin", "builtin"]>>;
            error: z.ZodOptional<z.ZodString>;
            transport: z.ZodOptional<z.ZodEnum<["stdio", "http", "sse", "memory"]>>;
            pluginName: z.ZodOptional<z.ZodString>;
            pluginVersion: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }, {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    }, {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.mcp_servers_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.mcp_servers_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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"]>;
        error: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    }, {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.mcp_server_status_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.mcp_server_status_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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";
            name: string;
            source: "project" | "user";
            id: string;
        }, {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    }, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.extensions_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.extensions_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.canvas.opened">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        instanceId: z.ZodString;
        extensionId: z.ZodString;
        extensionName: z.ZodOptional<z.ZodString>;
        canvasId: z.ZodString;
        title: z.ZodOptional<z.ZodString>;
        status: z.ZodOptional<z.ZodString>;
        url: z.ZodOptional<z.ZodString>;
        input: z.ZodOptional<z.ZodUnknown>;
        reopen: z.ZodBoolean;
        availability: z.ZodEnum<["ready", "stale"]>;
    }, "strip", z.ZodTypeAny, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    }, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.canvas.opened";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    };
    agentId?: string | undefined;
}, {
    type: "session.canvas.opened";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
        reopen: boolean;
        availability: "ready" | "stale";
        status?: string | undefined;
        url?: string | undefined;
        title?: string | undefined;
        extensionName?: string | undefined;
        input?: unknown;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.canvas.registry_changed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        canvases: z.ZodArray<z.ZodObject<{
            extensionId: z.ZodString;
            extensionName: z.ZodOptional<z.ZodString>;
            canvasId: z.ZodString;
            displayName: z.ZodString;
            description: z.ZodString;
            inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            actions: z.ZodOptional<z.ZodArray<z.ZodObject<{
                name: z.ZodString;
                description: z.ZodOptional<z.ZodString>;
                inputSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            }, "strip", z.ZodTypeAny, {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }, {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }>, "many">>;
        }, "strip", z.ZodTypeAny, {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }, {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    }, {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.canvas.registry_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.canvas.registry_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        canvases: {
            description: string;
            displayName: string;
            extensionId: string;
            canvasId: string;
            inputSchema?: Record<string, unknown> | undefined;
            actions?: {
                name: string;
                description?: string | undefined;
                inputSchema?: Record<string, unknown> | undefined;
            }[] | undefined;
            extensionName?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.canvas.closed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        instanceId: z.ZodString;
        extensionId: z.ZodString;
        canvasId: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    }, {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.canvas.closed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.canvas.closed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        instanceId: string;
        extensionId: string;
        canvasId: string;
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.extensions.attachments_pushed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        attachments: 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, {
                start: number;
                end: number;
            }, {
                start: number;
                end: number;
            }>>;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"directory">;
            path: z.ZodString;
            displayName: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "directory";
            displayName: string;
        }, {
            path: string;
            type: "directory";
            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, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }>;
        }, "strip", z.ZodTypeAny, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"github_reference">;
            number: z.ZodNumber;
            title: z.ZodString;
            referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
            state: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            number: number;
            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, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"extension_context">;
            extensionId: z.ZodString;
            canvasId: z.ZodOptional<z.ZodString>;
            instanceId: z.ZodOptional<z.ZodString>;
            title: z.ZodString;
            payload: z.ZodUnknown;
            capturedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }>]>, "many">;
    }, "strip", z.ZodTypeAny, {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    }, {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.extensions.attachments_pushed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    };
    agentId?: string | undefined;
}, {
    type: "session.extensions.attachments_pushed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    };
    agentId?: string | undefined;
}>, z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"mcp_app.tool_call_complete">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        serverName: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        success: z.ZodBoolean;
        durationMs: z.ZodNumber;
        result: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            message: string;
        }, {
            message: string;
        }>>;
        toolMeta: z.ZodOptional<z.ZodObject<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">>>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectOutputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    }, {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectInputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "mcp_app.tool_call_complete";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectOutputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "mcp_app.tool_call_complete";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        durationMs: number;
        toolName: string;
        serverName: string;
        result?: Record<string, unknown> | undefined;
        error?: {
            message: string;
        } | undefined;
        arguments?: Record<string, unknown> | undefined;
        toolMeta?: z.objectInputType<{
            ui: z.ZodOptional<z.ZodObject<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                resourceUri: z.ZodOptional<z.ZodString>;
                visibility: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
    };
    agentId?: string | undefined;
}>]>;

/**
 * All possible session event type strings
 */
export declare type SessionEventType = SessionEvent["type"];

declare type SessionExtensionsApi = ApiSchemaToInterface<typeof sessionExtensionsApiSchema>;

declare const sessionExtensionsApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            extensions: z_2.ZodArray<z_2.ZodObject<{
                id: z_2.ZodString;
                name: z_2.ZodString;
                source: z_2.ZodEnum<["project", "user"]>;
                status: z_2.ZodEnum<["running", "disabled", "failed", "starting"]>;
                pid: z_2.ZodOptional<z_2.ZodNumber>;
            }, "strip", z_2.ZodTypeAny, {
                status: "disabled" | "failed" | "running" | "starting";
                name: string;
                source: "project" | "user";
                id: string;
                pid?: number | undefined;
            }, {
                status: "disabled" | "failed" | "running" | "starting";
                name: string;
                source: "project" | "user";
                id: string;
                pid?: number | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            extensions: {
                status: "disabled" | "failed" | "running" | "starting";
                name: string;
                source: "project" | "user";
                id: string;
                pid?: number | undefined;
            }[];
        }, {
            extensions: {
                status: "disabled" | "failed" | "running" | "starting";
                name: string;
                source: "project" | "user";
                id: string;
                pid?: number | undefined;
            }[];
        }>;
    };
    enable: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
    };
    disable: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
    };
    reload: {
        description: string;
    };
    sendAttachmentsToMessage: {
        description: string;
        params: z_2.ZodObject<{
            instanceId: z_2.ZodOptional<z_2.ZodString>;
            attachments: z_2.ZodArray<z_2.ZodDiscriminatedUnion<"type", [z_2.ZodObject<{
                type: z_2.ZodLiteral<"file">;
                path: z_2.ZodString;
                displayName: z_2.ZodString;
                lineRange: z_2.ZodOptional<z_2.ZodObject<{
                    start: z_2.ZodNumber;
                    end: z_2.ZodNumber;
                }, "strip", z_2.ZodTypeAny, {
                    start: number;
                    end: number;
                }, {
                    start: number;
                    end: number;
                }>>;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
                type: "file";
                displayName: string;
                lineRange?: {
                    start: number;
                    end: number;
                } | undefined;
            }, {
                path: string;
                type: "file";
                displayName: string;
                lineRange?: {
                    start: number;
                    end: number;
                } | undefined;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"directory">;
                path: z_2.ZodString;
                displayName: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
                type: "directory";
                displayName: string;
            }, {
                path: string;
                type: "directory";
                displayName: string;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"selection">;
                filePath: z_2.ZodString;
                displayName: z_2.ZodString;
                text: z_2.ZodString;
                selection: z_2.ZodObject<{
                    start: z_2.ZodObject<{
                        line: z_2.ZodNumber;
                        character: z_2.ZodNumber;
                    }, "strip", z_2.ZodTypeAny, {
                        line: number;
                        character: number;
                    }, {
                        line: number;
                        character: number;
                    }>;
                    end: z_2.ZodObject<{
                        line: z_2.ZodNumber;
                        character: z_2.ZodNumber;
                    }, "strip", z_2.ZodTypeAny, {
                        line: number;
                        character: number;
                    }, {
                        line: number;
                        character: number;
                    }>;
                }, "strip", z_2.ZodTypeAny, {
                    start: {
                        line: number;
                        character: number;
                    };
                    end: {
                        line: number;
                        character: number;
                    };
                }, {
                    start: {
                        line: number;
                        character: number;
                    };
                    end: {
                        line: number;
                        character: number;
                    };
                }>;
            }, "strip", z_2.ZodTypeAny, {
                type: "selection";
                displayName: string;
                selection: {
                    start: {
                        line: number;
                        character: number;
                    };
                    end: {
                        line: number;
                        character: number;
                    };
                };
                filePath: string;
                text: string;
            }, {
                type: "selection";
                displayName: string;
                selection: {
                    start: {
                        line: number;
                        character: number;
                    };
                    end: {
                        line: number;
                        character: number;
                    };
                };
                filePath: string;
                text: string;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"github_reference">;
                number: z_2.ZodNumber;
                title: z_2.ZodString;
                referenceType: z_2.ZodEnum<["issue", "pr", "discussion"]>;
                state: z_2.ZodString;
                url: z_2.ZodString;
            }, "strip", z_2.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_2.ZodObject<{
                type: z_2.ZodLiteral<"blob">;
                data: z_2.ZodString;
                mimeType: z_2.ZodString;
                displayName: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                type: "blob";
                data: string;
                mimeType: string;
                displayName?: string | undefined;
            }, {
                type: "blob";
                data: string;
                mimeType: string;
                displayName?: string | undefined;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"extension_context">;
                title: z_2.ZodString;
                payload: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
            }, "strip", z_2.ZodTypeAny, {
                type: "extension_context";
                title: string;
                payload?: unknown;
            }, {
                type: "extension_context";
                title: string;
                payload?: unknown;
            }>]>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            attachments: ({
                path: string;
                type: "file";
                displayName: string;
                lineRange?: {
                    start: number;
                    end: number;
                } | undefined;
            } | {
                path: string;
                type: "directory";
                displayName: string;
            } | {
                type: "selection";
                displayName: string;
                selection: {
                    start: {
                        line: number;
                        character: number;
                    };
                    end: {
                        line: number;
                        character: number;
                    };
                };
                filePath: string;
                text: string;
            } | {
                number: number;
                type: "github_reference";
                url: string;
                state: string;
                title: string;
                referenceType: "pr" | "issue" | "discussion";
            } | {
                type: "blob";
                data: string;
                mimeType: string;
                displayName?: string | undefined;
            } | {
                type: "extension_context";
                title: string;
                payload?: unknown;
            })[];
            instanceId?: string | undefined;
        }, {
            attachments: ({
                path: string;
                type: "file";
                displayName: string;
                lineRange?: {
                    start: number;
                    end: number;
                } | undefined;
            } | {
                path: string;
                type: "directory";
                displayName: string;
            } | {
                type: "selection";
                displayName: string;
                selection: {
                    start: {
                        line: number;
                        character: number;
                    };
                    end: {
                        line: number;
                        character: number;
                    };
                };
                filePath: string;
                text: string;
            } | {
                number: number;
                type: "github_reference";
                url: string;
                state: string;
                title: string;
                referenceType: "pr" | "issue" | "discussion";
            } | {
                type: "blob";
                data: string;
                mimeType: string;
                displayName?: string | undefined;
            } | {
                type: "extension_context";
                title: string;
                payload?: unknown;
            })[];
            instanceId?: string | undefined;
        }>;
    };
};

export declare type SessionExtensionsAttachmentsPushedEvent = z.infer<typeof SessionExtensionsAttachmentsPushedEventSchema>;

declare const SessionExtensionsAttachmentsPushedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.extensions.attachments_pushed">;
    ephemeral: z.ZodLiteral<true>;
    data: z.ZodObject<{
        attachments: 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, {
                start: number;
                end: number;
            }, {
                start: number;
                end: number;
            }>>;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"directory">;
            path: z.ZodString;
            displayName: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "directory";
            displayName: string;
        }, {
            path: string;
            type: "directory";
            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, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }>;
        }, "strip", z.ZodTypeAny, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"github_reference">;
            number: z.ZodNumber;
            title: z.ZodString;
            referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
            state: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            number: number;
            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, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"extension_context">;
            extensionId: z.ZodString;
            canvasId: z.ZodOptional<z.ZodString>;
            instanceId: z.ZodOptional<z.ZodString>;
            title: z.ZodString;
            payload: z.ZodUnknown;
            capturedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }>]>, "many">;
    }, "strip", z.ZodTypeAny, {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    }, {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.extensions.attachments_pushed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    };
    agentId?: string | undefined;
}, {
    type: "session.extensions.attachments_pushed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        attachments: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[];
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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";
            name: string;
            source: "project" | "user";
            id: string;
        }, {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    }, {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.extensions_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.extensions_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        extensions: {
            status: "disabled" | "failed" | "running" | "starting";
            name: string;
            source: "project" | "user";
            id: string;
        }[];
    };
    agentId?: string | undefined;
}>;

export declare type SessionFeatureFlagService = IFeatureFlagService & Disposable_2;

declare type SessionFleetApi = ApiSchemaToInterface<typeof sessionFleetApiSchema>;

declare const sessionFleetApiSchema: {
    start: {
        description: string;
        params: z_2.ZodObject<{
            prompt: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            prompt?: string | undefined;
        }, {
            prompt?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            started: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            started: boolean;
        }, {
            started: boolean;
        }>;
    };
};

/**
 * 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 {
    /**
     * Per-session SQLite database, or `undefined` when the underlying
     * filesystem provider does not support SQLite.
     */
    readonly sessionDatabase: SessionDatabase | undefined;
    constructor(sqliteSupported: boolean);
    /**
     * 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;
    /**
     * Returns the mutex key that should protect exclusive access to this
     * filesystem path. Local filesystems use the path directly; virtual
     * filesystems may override this to namespace identical virtual paths.
     */
    lockKey(path: string): string;
    /** Read a file's content as a UTF-8 string. */
    abstract readFile(path: string): Promise<string>;
    /** Stream a file's content split into lines, omitting the final empty line when the file ends with a newline. */
    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>;
    /**
     * Release resources held by this instance (e.g., open SQLite connections).
     * Called during session shutdown. Subclasses that hold resources should override
     * and call `super.dispose()`.
     */
    dispose(): Promise<void>;
    /** Execute a SQLite query against this session's database. */
    abstract sqliteQuery(queryType: SqliteQueryType, query: string, params?: Record<string, string | number | null>): Promise<SessionFsSqliteResult | undefined>;
    /** Check whether the session database already exists (without creating it). */
    abstract sqliteExists(): Promise<boolean>;
    /**
     * Reverse-call handler for native code that needs to route I/O back
     * through this `SessionFs`. The base class returns a default handler
     * that dispatches each request to its own abstract methods, so any
     * non-local `SessionFs` works with native APIs that take a reverse-call
     * handler (workspace manager, RPC bridge, etc.) without subclasses
     * needing to implement the dispatch themselves.
     *
     * `LocalSessionFs` overrides this to return `undefined`, signaling that
     * the native side should perform operations directly against the local
     * filesystem instead of bouncing through JavaScript. RPC-backed
     * implementations may override to expose their own handler.
     */
    getReverseCallHandler(): SessionFsReverseCallHandler | undefined;
}

/**
 * Directory entry with type information, returned by {@link SessionFs.readdirWithTypes}.
 */
declare interface SessionFsDirEntry {
    name: string;
    type: "file" | "directory";
}

/**
 * Callback that native Rust code uses to deliver a reverse-call request
 * back to JavaScript (RPC-backed `SessionFs` implementations only).
 * Local filesystems do not need a handler.
 */
declare type SessionFsReverseCallHandler = (call: SessionFsReverseCall) => void;

/**
 * Result of a SQLite query execution via {@link SessionFs.sqliteQuery}.
 */
declare interface SessionFsSqliteResult {
    /** For SELECT: array of row objects. For others: empty array. */
    rows: Record<string, unknown>[];
    /** Column names from the result set */
    columns: string[];
    /** Number of rows affected (for INSERT/UPDATE/DELETE) */
    rowsAffected: number;
    /** SQLite last_insert_rowid() value for INSERT. */
    lastInsertRowid?: number;
}

/**
 * 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    }, {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.handoff";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.handoff";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        handoffTime: string;
        sourceType: "remote" | "local";
        repository?: {
            name: string;
            owner: string;
            branch?: string | undefined;
        } | undefined;
        host?: string | undefined;
        context?: string | undefined;
        summary?: string | undefined;
        remoteSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionHistoryApi = ApiSchemaToInterface<typeof sessionHistoryApiSchema>;

declare const sessionHistoryApiSchema: {
    compact: {
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            customInstructions: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            customInstructions?: string | undefined;
        }, {
            customInstructions?: string | undefined;
        }>>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
            tokensRemoved: z_2.ZodNumber;
            messagesRemoved: z_2.ZodNumber;
            summaryContent: z_2.ZodOptional<z_2.ZodString>;
            contextWindow: z_2.ZodOptional<z_2.ZodObject<{
                tokenLimit: z_2.ZodNumber;
                currentTokens: z_2.ZodNumber;
                messagesLength: z_2.ZodNumber;
                systemTokens: z_2.ZodOptional<z_2.ZodNumber>;
                conversationTokens: z_2.ZodOptional<z_2.ZodNumber>;
                toolDefinitionsTokens: z_2.ZodOptional<z_2.ZodNumber>;
            }, "strip", z_2.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", z_2.ZodTypeAny, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            summaryContent?: string | undefined;
            contextWindow?: {
                tokenLimit: number;
                currentTokens: number;
                messagesLength: number;
                systemTokens?: number | undefined;
                conversationTokens?: number | undefined;
                toolDefinitionsTokens?: number | undefined;
            } | undefined;
        }, {
            success: boolean;
            messagesRemoved: number;
            tokensRemoved: number;
            summaryContent?: string | undefined;
            contextWindow?: {
                tokenLimit: number;
                currentTokens: number;
                messagesLength: number;
                systemTokens?: number | undefined;
                conversationTokens?: number | undefined;
                toolDefinitionsTokens?: number | undefined;
            } | undefined;
        }>;
    };
    truncate: {
        description: string;
        params: z_2.ZodObject<{
            eventId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            eventId: string;
        }, {
            eventId: string;
        }>;
        result: z_2.ZodObject<{
            eventsRemoved: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            eventsRemoved: number;
        }, {
            eventsRemoved: number;
        }>;
    };
    cancelBackgroundCompaction: {
        description: string;
        result: z_2.ZodObject<{
            cancelled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            cancelled: boolean;
        }, {
            cancelled: boolean;
        }>;
    };
    abortManualCompaction: {
        description: string;
        result: z_2.ZodObject<{
            aborted: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            aborted: boolean;
        }, {
            aborted: boolean;
        }>;
    };
    summarizeForHandoff: {
        description: string;
        result: z_2.ZodObject<{
            summary: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            summary: string;
        }, {
            summary: string;
        }>;
    };
};

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>;
    agentId: z.ZodOptional<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, {
    type: "session.idle";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        aborted?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.idle";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        aborted?: boolean | undefined;
    };
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.info">;
    data: z.ZodObject<{
        infoType: z.ZodString;
        message: z.ZodString;
        url: z.ZodOptional<z.ZodString>;
        tip: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    }, {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.info";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.info";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        infoType: string;
        url?: string | undefined;
        tip?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionInstructionsApi = ApiSchemaToInterface<typeof sessionInstructionsApiSchema>;

declare const sessionInstructionsApiSchema: {
    getSources: {
        description: string;
        result: z_2.ZodObject<{
            sources: z_2.ZodArray<z_2.ZodObject<{
                id: z_2.ZodString;
                label: z_2.ZodString;
                sourcePath: z_2.ZodString;
                content: z_2.ZodString;
                type: z_2.ZodNativeEnum<InstructionSourceType>;
                location: z_2.ZodNativeEnum<InstructionSourceLocation>;
                applyTo: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                description: z_2.ZodOptional<z_2.ZodString>;
                defaultDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                projectPath: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                type: InstructionSourceType;
                content: string;
                id: string;
                sourcePath: string;
                label: string;
                location: InstructionSourceLocation;
                description?: string | undefined;
                applyTo?: string[] | undefined;
                defaultDisabled?: boolean | undefined;
                projectPath?: string | undefined;
            }, {
                type: InstructionSourceType;
                content: string;
                id: string;
                sourcePath: string;
                label: string;
                location: InstructionSourceLocation;
                description?: string | undefined;
                applyTo?: string[] | undefined;
                defaultDisabled?: boolean | undefined;
                projectPath?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            sources: {
                type: InstructionSourceType;
                content: string;
                id: string;
                sourcePath: string;
                label: string;
                location: InstructionSourceLocation;
                description?: string | undefined;
                applyTo?: string[] | undefined;
                defaultDisabled?: boolean | undefined;
                projectPath?: string | undefined;
            }[];
        }, {
            sources: {
                type: InstructionSourceType;
                content: string;
                id: string;
                sourcePath: string;
                label: string;
                location: InstructionSourceLocation;
                description?: string | undefined;
                applyTo?: string[] | undefined;
                defaultDisabled?: boolean | undefined;
                projectPath?: string | undefined;
            }[];
        }>;
    };
};

declare type SessionLogApi = ApiSchemaToInterface<{
    log: typeof sessionLogApiSchema;
}>;

declare const sessionLogApiSchema: {
    description: string;
    params: z_2.ZodObject<{
        message: z_2.ZodString;
        level: z_2.ZodOptional<z_2.ZodEnum<["info", "warning", "error"]>>;
        type: z_2.ZodOptional<z_2.ZodString>;
        ephemeral: z_2.ZodOptional<z_2.ZodBoolean>;
        url: z_2.ZodOptional<z_2.ZodString>;
        tip: z_2.ZodOptional<z_2.ZodString>;
    }, "strip", z_2.ZodTypeAny, {
        message: string;
        type?: string | undefined;
        url?: string | undefined;
        ephemeral?: boolean | undefined;
        tip?: string | undefined;
        level?: "error" | "warning" | "info" | undefined;
    }, {
        message: string;
        type?: string | undefined;
        url?: string | undefined;
        ephemeral?: boolean | undefined;
        tip?: string | undefined;
        level?: "error" | "warning" | "info" | undefined;
    }>;
    result: z_2.ZodObject<{
        eventId: z_2.ZodString;
    }, "strip", z_2.ZodTypeAny, {
        eventId: string;
    }, {
        eventId: string;
    }>;
};

declare type SessionLoggingDisabledEvent = {
    kind: "session_logging_disabled";
    reason: "session-full" | "error";
    requestId?: string;
    responseBody?: string;
    statusCode?: number;
};

declare type SessionLogsContent = SessionsChatCompletionMessageParam | SessionsChatCompletionChunk;

declare type SessionLogsContents = SessionLogsContent[];

declare type SessionLspApi = ApiSchemaToInterface<typeof sessionLspApiSchema>;

declare const sessionLspApiSchema: {
    initialize: {
        description: string;
        params: z_2.ZodObject<{
            workingDirectory: z_2.ZodOptional<z_2.ZodString>;
            gitRoot: z_2.ZodOptional<z_2.ZodString>;
            force: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            force?: boolean | undefined;
            workingDirectory?: string | undefined;
            gitRoot?: string | undefined;
        }, {
            force?: boolean | undefined;
            workingDirectory?: string | undefined;
            gitRoot?: string | undefined;
        }>;
    };
};

/**
 * 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;
};

declare type SessionMcpApi = ApiSchemaToInterface<typeof sessionMcpApiSchema>;

declare const sessionMcpApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            servers: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodEffects<z_2.ZodString, string, string>;
                status: z_2.ZodEnum<["connected", "failed", "needs-auth", "pending", "disabled", "not_configured"]>;
                source: z_2.ZodOptional<z_2.ZodEnum<["user", "workspace", "plugin", "builtin"]>>;
                error: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                name: string;
                error?: string | undefined;
                source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            }, {
                status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                name: string;
                error?: string | undefined;
                source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            }>, "many">;
            host: z_2.ZodOptional<z_2.ZodObject<{
                mcp3pEnabled: z_2.ZodBoolean;
                disabledServers: z_2.ZodArray<z_2.ZodString, "many">;
                filteredServers: z_2.ZodArray<z_2.ZodString, "many">;
                clients: z_2.ZodArray<z_2.ZodString, "many">;
                pendingConnections: z_2.ZodArray<z_2.ZodString, "many">;
                failedServers: z_2.ZodRecord<z_2.ZodString, z_2.ZodObject<{
                    message: z_2.ZodString;
                    timestamp: z_2.ZodNumber;
                }, "strip", z_2.ZodTypeAny, {
                    message: string;
                    timestamp: number;
                }, {
                    message: string;
                    timestamp: number;
                }>>;
                needsAuthServers: z_2.ZodRecord<z_2.ZodString, z_2.ZodObject<{
                    timestamp: z_2.ZodNumber;
                }, "strip", z_2.ZodTypeAny, {
                    timestamp: number;
                }, {
                    timestamp: number;
                }>>;
            }, "strip", z_2.ZodTypeAny, {
                mcp3pEnabled: boolean;
                filteredServers: string[];
                clients: string[];
                disabledServers: string[];
                pendingConnections: string[];
                failedServers: Record<string, {
                    message: string;
                    timestamp: number;
                }>;
                needsAuthServers: Record<string, {
                    timestamp: number;
                }>;
            }, {
                mcp3pEnabled: boolean;
                filteredServers: string[];
                clients: string[];
                disabledServers: string[];
                pendingConnections: string[];
                failedServers: Record<string, {
                    message: string;
                    timestamp: number;
                }>;
                needsAuthServers: Record<string, {
                    timestamp: number;
                }>;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            servers: {
                status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                name: string;
                error?: string | undefined;
                source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            }[];
            host?: {
                mcp3pEnabled: boolean;
                filteredServers: string[];
                clients: string[];
                disabledServers: string[];
                pendingConnections: string[];
                failedServers: Record<string, {
                    message: string;
                    timestamp: number;
                }>;
                needsAuthServers: Record<string, {
                    timestamp: number;
                }>;
            } | undefined;
        }, {
            servers: {
                status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
                name: string;
                error?: string | undefined;
                source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            }[];
            host?: {
                mcp3pEnabled: boolean;
                filteredServers: string[];
                clients: string[];
                disabledServers: string[];
                pendingConnections: string[];
                failedServers: Record<string, {
                    message: string;
                    timestamp: number;
                }>;
                needsAuthServers: Record<string, {
                    timestamp: number;
                }>;
            } | undefined;
        }>;
    };
    listTools: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
        result: z_2.ZodObject<{
            tools: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                description: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description?: string | undefined;
            }, {
                name: string;
                description?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            tools: {
                name: string;
                description?: string | undefined;
            }[];
        }, {
            tools: {
                name: string;
                description?: string | undefined;
            }[];
        }>;
    };
    enable: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
    };
    disable: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
    };
    reload: {
        description: string;
    };
    reloadWithConfig: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            config: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
        }, "strip", z_2.ZodTypeAny, {
            config?: unknown;
        }, {
            config?: unknown;
        }>;
        result: z_2.ZodObject<{
            filteredServers: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                reason: z_2.ZodString;
                redactedReason: z_2.ZodOptional<z_2.ZodString>;
                enterpriseName: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                reason: string;
                redactedReason?: string | undefined;
                enterpriseName?: string | undefined;
            }, {
                name: string;
                reason: string;
                redactedReason?: string | undefined;
                enterpriseName?: string | undefined;
            }>, "many">;
            allowedServers: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                redactedNote: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                redactedNote?: string | undefined;
            }, {
                name: string;
                redactedNote?: string | undefined;
            }>, "many">>;
        }, "strip", z_2.ZodTypeAny, {
            filteredServers: {
                name: string;
                reason: string;
                redactedReason?: string | undefined;
                enterpriseName?: string | undefined;
            }[];
            allowedServers?: {
                name: string;
                redactedNote?: string | undefined;
            }[] | undefined;
        }, {
            filteredServers: {
                name: string;
                reason: string;
                redactedReason?: string | undefined;
                enterpriseName?: string | undefined;
            }[];
            allowedServers?: {
                name: string;
                redactedNote?: string | undefined;
            }[] | undefined;
        }>;
    };
    executeSampling: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            serverName: z_2.ZodString;
            mcpRequestId: z_2.ZodUnion<[z_2.ZodString, z_2.ZodNumber]>;
            request: z_2.ZodObject<{}, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{}, z_2.ZodTypeAny, "passthrough">>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            serverName: string;
            mcpRequestId: string | number;
            request: {} & {
                [k: string]: unknown;
            };
        }, {
            requestId: string;
            serverName: string;
            mcpRequestId: string | number;
            request: {} & {
                [k: string]: unknown;
            };
        }>;
        result: z_2.ZodObject<{
            action: z_2.ZodEnum<["success", "failure", "cancelled"]>;
            result: z_2.ZodOptional<z_2.ZodObject<{}, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{}, z_2.ZodTypeAny, "passthrough">>>;
            error: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            action: "success" | "cancelled" | "failure";
            result?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
            error?: string | undefined;
        }, {
            action: "success" | "cancelled" | "failure";
            result?: z_2.objectInputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
            error?: string | undefined;
        }>;
    };
    cancelSamplingExecution: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
        }, {
            requestId: string;
        }>;
        result: z_2.ZodObject<{
            cancelled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            cancelled: boolean;
        }, {
            cancelled: boolean;
        }>;
    };
    setEnvValueMode: {
        description: string;
        params: z_2.ZodObject<{
            mode: z_2.ZodEnum<["direct", "indirect"]>;
        }, "strip", z_2.ZodTypeAny, {
            mode: "direct" | "indirect";
        }, {
            mode: "direct" | "indirect";
        }>;
        result: z_2.ZodObject<{
            mode: z_2.ZodEnum<["direct", "indirect"]>;
        }, "strip", z_2.ZodTypeAny, {
            mode: "direct" | "indirect";
        }, {
            mode: "direct" | "indirect";
        }>;
    };
    removeGitHub: {
        description: string;
        result: z_2.ZodObject<{
            removed: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            removed: boolean;
        }, {
            removed: boolean;
        }>;
    };
    configureGitHub: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            authInfo: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
        }, "strip", z_2.ZodTypeAny, {
            authInfo?: unknown;
        }, {
            authInfo?: unknown;
        }>;
        result: z_2.ZodObject<{
            changed: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            changed: boolean;
        }, {
            changed: boolean;
        }>;
    };
    startServer: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            serverName: z_2.ZodString;
            config: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
            config?: unknown;
        }, {
            serverName: string;
            config?: unknown;
        }>;
    };
    restartServer: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            serverName: z_2.ZodString;
            config: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
            config?: unknown;
        }, {
            serverName: string;
            config?: unknown;
        }>;
    };
    stopServer: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
    };
    registerExternalClient: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            serverName: z_2.ZodString;
            client: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
            transport: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
            config: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
            config?: unknown;
            transport?: unknown;
            client?: unknown;
        }, {
            serverName: string;
            config?: unknown;
            transport?: unknown;
            client?: unknown;
        }>;
    };
    unregisterExternalClient: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            serverName: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
    };
    isServerRunning: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
        result: z_2.ZodObject<{
            running: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            running: boolean;
        }, {
            running: boolean;
        }>;
    };
};

declare type SessionMcpAppsApi = ApiSchemaToInterface<typeof sessionMcpAppsApiSchema>;

declare const sessionMcpAppsApiSchema: {
    /**
     * Fetch an MCP resource from a connected server. Used by SDK consumers to
     * load `ui://` MCP App bundles (SEP-1865) on demand. Requires the
     * `mcp-apps` session capability.
     */
    readResource: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
            uri: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            uri: string;
            serverName: string;
        }, {
            uri: string;
            serverName: string;
        }>;
        result: z_2.ZodObject<{
            contents: z_2.ZodArray<z_2.ZodObject<{
                uri: z_2.ZodString;
                mimeType: z_2.ZodOptional<z_2.ZodString>;
                text: z_2.ZodOptional<z_2.ZodString>;
                blob: z_2.ZodOptional<z_2.ZodString>;
                _meta: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
            }, "strip", z_2.ZodTypeAny, {
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            }, {
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            contents: {
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            }[];
        }, {
            contents: {
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                mimeType?: string | undefined;
                _meta?: Record<string, unknown> | undefined;
            }[];
        }>;
    };
    /**
     * List tools that an MCP App view is allowed to call (SEP-1865 visibility
     * filter). Returns tools whose `_meta.ui.visibility` is unset (default
     * `["model","app"]`) or includes `"app"`.
     */
    listTools: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
            originServerName: z_2.ZodEffects<z_2.ZodString, string, string>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
            originServerName: string;
        }, {
            serverName: string;
            originServerName: string;
        }>;
        result: z_2.ZodObject<{
            tools: z_2.ZodArray<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            tools: Record<string, unknown>[];
        }, {
            tools: Record<string, unknown>[];
        }>;
    };
    /**
     * Call an MCP tool from an MCP App view (SEP-1865). Enforces the
     * visibility check that prevents an app iframe from invoking model-only
     * tools. Returns the standard MCP `CallToolResult`.
     */
    callTool: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
            toolName: z_2.ZodString;
            arguments: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
            originServerName: z_2.ZodEffects<z_2.ZodString, string, string>;
        }, "strip", z_2.ZodTypeAny, {
            toolName: string;
            serverName: string;
            originServerName: string;
            arguments?: Record<string, unknown> | undefined;
        }, {
            toolName: string;
            serverName: string;
            originServerName: string;
            arguments?: Record<string, unknown> | undefined;
        }>;
        result: z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>;
    };
    /**
     * Replace the host context returned to MCP App guests on `ui/initialize`.
     * Hosts use this to advertise theme, locale, or other metadata to the guest UI.
     */
    setHostContext: {
        description: string;
        params: z_2.ZodObject<{
            context: z_2.ZodObject<{
                theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                locale: z_2.ZodOptional<z_2.ZodString>;
                timeZone: z_2.ZodOptional<z_2.ZodString>;
                displayMode: z_2.ZodOptional<z_2.ZodEnum<["inline", "fullscreen", "pip"]>>;
                availableDisplayModes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<["inline", "fullscreen", "pip"]>, "many">>;
                platform: z_2.ZodOptional<z_2.ZodEnum<["web", "desktop", "mobile"]>>;
                userAgent: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodUnknown, z_2.objectOutputType<{
                theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                locale: z_2.ZodOptional<z_2.ZodString>;
                timeZone: z_2.ZodOptional<z_2.ZodString>;
                displayMode: z_2.ZodOptional<z_2.ZodEnum<["inline", "fullscreen", "pip"]>>;
                availableDisplayModes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<["inline", "fullscreen", "pip"]>, "many">>;
                platform: z_2.ZodOptional<z_2.ZodEnum<["web", "desktop", "mobile"]>>;
                userAgent: z_2.ZodOptional<z_2.ZodString>;
            }, z_2.ZodUnknown, "strip">, z_2.objectInputType<{
                theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                locale: z_2.ZodOptional<z_2.ZodString>;
                timeZone: z_2.ZodOptional<z_2.ZodString>;
                displayMode: z_2.ZodOptional<z_2.ZodEnum<["inline", "fullscreen", "pip"]>>;
                availableDisplayModes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<["inline", "fullscreen", "pip"]>, "many">>;
                platform: z_2.ZodOptional<z_2.ZodEnum<["web", "desktop", "mobile"]>>;
                userAgent: z_2.ZodOptional<z_2.ZodString>;
            }, z_2.ZodUnknown, "strip">>;
        }, "strip", z_2.ZodTypeAny, {
            context: {
                platform?: "web" | "desktop" | "mobile" | undefined;
                theme?: "dark" | "light" | undefined;
                userAgent?: string | undefined;
                availableDisplayModes?: ("pip" | "inline" | "fullscreen")[] | undefined;
                displayMode?: "pip" | "inline" | "fullscreen" | undefined;
                locale?: string | undefined;
                timeZone?: string | undefined;
            } & {
                [k: string]: unknown;
            };
        }, {
            context: {
                platform?: "web" | "desktop" | "mobile" | undefined;
                theme?: "dark" | "light" | undefined;
                userAgent?: string | undefined;
                availableDisplayModes?: ("pip" | "inline" | "fullscreen")[] | undefined;
                displayMode?: "pip" | "inline" | "fullscreen" | undefined;
                locale?: string | undefined;
                timeZone?: string | undefined;
            } & {
                [k: string]: unknown;
            };
        }>;
    };
    /** Read the current host context. */
    getHostContext: {
        description: string;
        result: z_2.ZodObject<{
            context: z_2.ZodObject<{
                theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                locale: z_2.ZodOptional<z_2.ZodString>;
                timeZone: z_2.ZodOptional<z_2.ZodString>;
                displayMode: z_2.ZodOptional<z_2.ZodEnum<["inline", "fullscreen", "pip"]>>;
                availableDisplayModes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<["inline", "fullscreen", "pip"]>, "many">>;
                platform: z_2.ZodOptional<z_2.ZodEnum<["web", "desktop", "mobile"]>>;
                userAgent: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodUnknown, z_2.objectOutputType<{
                theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                locale: z_2.ZodOptional<z_2.ZodString>;
                timeZone: z_2.ZodOptional<z_2.ZodString>;
                displayMode: z_2.ZodOptional<z_2.ZodEnum<["inline", "fullscreen", "pip"]>>;
                availableDisplayModes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<["inline", "fullscreen", "pip"]>, "many">>;
                platform: z_2.ZodOptional<z_2.ZodEnum<["web", "desktop", "mobile"]>>;
                userAgent: z_2.ZodOptional<z_2.ZodString>;
            }, z_2.ZodUnknown, "strip">, z_2.objectInputType<{
                theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                locale: z_2.ZodOptional<z_2.ZodString>;
                timeZone: z_2.ZodOptional<z_2.ZodString>;
                displayMode: z_2.ZodOptional<z_2.ZodEnum<["inline", "fullscreen", "pip"]>>;
                availableDisplayModes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<["inline", "fullscreen", "pip"]>, "many">>;
                platform: z_2.ZodOptional<z_2.ZodEnum<["web", "desktop", "mobile"]>>;
                userAgent: z_2.ZodOptional<z_2.ZodString>;
            }, z_2.ZodUnknown, "strip">>;
        }, "strip", z_2.ZodTypeAny, {
            context: {
                platform?: "web" | "desktop" | "mobile" | undefined;
                theme?: "dark" | "light" | undefined;
                userAgent?: string | undefined;
                availableDisplayModes?: ("pip" | "inline" | "fullscreen")[] | undefined;
                displayMode?: "pip" | "inline" | "fullscreen" | undefined;
                locale?: string | undefined;
                timeZone?: string | undefined;
            } & {
                [k: string]: unknown;
            };
        }, {
            context: {
                platform?: "web" | "desktop" | "mobile" | undefined;
                theme?: "dark" | "light" | undefined;
                userAgent?: string | undefined;
                availableDisplayModes?: ("pip" | "inline" | "fullscreen")[] | undefined;
                displayMode?: "pip" | "inline" | "fullscreen" | undefined;
                locale?: string | undefined;
                timeZone?: string | undefined;
            } & {
                [k: string]: unknown;
            };
        }>;
    };
    /**
     * Diagnose MCP Apps wiring for a specific MCP server. Reports what the
     * runtime sees: whether the session has the `mcp-apps` capability,
     * whether the runtime advertises the `io.modelcontextprotocol/ui`
     * extension, and how many tools came back from the server with
     * `_meta.ui` populated.
     *
     * Use this when consumers expect interactive UIs but none appear — it
     * tells you whether the missing `_meta.ui` is the runtime's fault, the
     * server's fault, or a configuration mismatch.
     */
    diagnose: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
        }, {
            serverName: string;
        }>;
        result: z_2.ZodObject<{
            capability: z_2.ZodObject<{
                sessionHasMcpApps: z_2.ZodBoolean;
                featureFlagEnabled: z_2.ZodBoolean;
                advertised: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                sessionHasMcpApps: boolean;
                featureFlagEnabled: boolean;
                advertised: boolean;
            }, {
                sessionHasMcpApps: boolean;
                featureFlagEnabled: boolean;
                advertised: boolean;
            }>;
            server: z_2.ZodObject<{
                connected: z_2.ZodBoolean;
                toolCount: z_2.ZodNumber;
                toolsWithUiMeta: z_2.ZodNumber;
                sampleToolNames: z_2.ZodArray<z_2.ZodString, "many">;
            }, "strip", z_2.ZodTypeAny, {
                connected: boolean;
                toolCount: number;
                toolsWithUiMeta: number;
                sampleToolNames: string[];
            }, {
                connected: boolean;
                toolCount: number;
                toolsWithUiMeta: number;
                sampleToolNames: string[];
            }>;
        }, "strip", z_2.ZodTypeAny, {
            server: {
                connected: boolean;
                toolCount: number;
                toolsWithUiMeta: number;
                sampleToolNames: string[];
            };
            capability: {
                sessionHasMcpApps: boolean;
                featureFlagEnabled: boolean;
                advertised: boolean;
            };
        }, {
            server: {
                connected: boolean;
                toolCount: number;
                toolsWithUiMeta: number;
                sampleToolNames: string[];
            };
            capability: {
                sessionHasMcpApps: boolean;
                featureFlagEnabled: boolean;
                advertised: boolean;
            };
        }>;
    };
};

declare type SessionMcpOauthApi = ApiSchemaToInterface<typeof sessionMcpOauthApiSchema>;

declare const sessionMcpOauthApiSchema: {
    respond: {
        description: string;
        visibility: "internal";
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            provider: z_2.ZodOptional<z_2.ZodUnknown>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            provider?: unknown;
        }, {
            requestId: string;
            provider?: unknown;
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    login: {
        description: string;
        params: z_2.ZodObject<{
            serverName: z_2.ZodEffects<z_2.ZodString, string, string>;
            forceReauth: z_2.ZodOptional<z_2.ZodBoolean>;
            clientName: z_2.ZodOptional<z_2.ZodString>;
            callbackSuccessMessage: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            serverName: string;
            clientName?: string | undefined;
            forceReauth?: boolean | undefined;
            callbackSuccessMessage?: string | undefined;
        }, {
            serverName: string;
            clientName?: string | undefined;
            forceReauth?: boolean | undefined;
            callbackSuccessMessage?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            authorizationUrl: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            authorizationUrl?: string | undefined;
        }, {
            authorizationUrl?: string | undefined;
        }>;
    };
};

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>;
    agentId: z.ZodOptional<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.ZodEnum<["user", "workspace", "plugin", "builtin"]>>;
            error: z.ZodOptional<z.ZodString>;
            transport: z.ZodOptional<z.ZodEnum<["stdio", "http", "sse", "memory"]>>;
            pluginName: z.ZodOptional<z.ZodString>;
            pluginVersion: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }, {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    }, {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.mcp_servers_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.mcp_servers_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        servers: {
            status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
            name: string;
            error?: string | undefined;
            source?: "plugin" | "builtin" | "user" | "workspace" | undefined;
            pluginName?: string | undefined;
            pluginVersion?: string | undefined;
            transport?: "stdio" | "http" | "sse" | "memory" | undefined;
        }[];
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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"]>;
        error: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    }, {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.mcp_server_status_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.mcp_server_status_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        status: "pending" | "disabled" | "failed" | "connected" | "needs-auth" | "not_configured";
        serverName: string;
        error?: string | undefined;
    };
    agentId?: string | undefined;
}>;

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;
    /** Runtime client name that created/last resumed this session (telemetry identifier). */
    readonly clientName?: string;
    readonly isRemote: boolean;
    /** Most recent working directory context (from last start or resume). */
    readonly context?: SessionContext;
}

declare type SessionMetadataApi = ApiSchemaToInterface<typeof sessionMetadataApiSchema>;

declare const sessionMetadataApiSchema: {
    snapshot: {
        description: string;
        result: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            startTime: z_2.ZodString;
            modifiedTime: z_2.ZodString;
            isRemote: z_2.ZodBoolean;
            alreadyInUse: z_2.ZodBoolean;
            workspacePath: z_2.ZodNullable<z_2.ZodString>;
            initialName: z_2.ZodOptional<z_2.ZodString>;
            clientName: z_2.ZodOptional<z_2.ZodString>;
            remoteMetadata: z_2.ZodOptional<z_2.ZodObject<{
                resourceId: z_2.ZodOptional<z_2.ZodString>;
                repository: z_2.ZodObject<{
                    owner: z_2.ZodString;
                    name: z_2.ZodString;
                    branch: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    owner: string;
                    branch: string;
                }, {
                    name: string;
                    owner: string;
                    branch: string;
                }>;
                pullRequestNumber: z_2.ZodOptional<z_2.ZodNumber>;
                taskType: z_2.ZodOptional<z_2.ZodEnum<["cca", "cli"]>>;
            }, "strip", z_2.ZodTypeAny, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
            }, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
            }>>;
        } & {
            summary: z_2.ZodOptional<z_2.ZodString>;
            workingDirectory: z_2.ZodString;
            currentMode: z_2.ZodEnum<["interactive", "plan", "autopilot"]>;
            selectedModel: z_2.ZodOptional<z_2.ZodString>;
            workspace: z_2.ZodNullable<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>;
                name: z_2.ZodOptional<z_2.ZodString>;
                user_named: z_2.ZodOptional<z_2.ZodBoolean>;
                created_at: z_2.ZodOptional<z_2.ZodString>;
                updated_at: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                id: string;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                updated_at?: string | undefined;
            }, {
                id: string;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                updated_at?: string | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            workspace: {
                id: string;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                updated_at?: string | undefined;
            } | null;
            workingDirectory: string;
            sessionId: string;
            startTime: string;
            alreadyInUse: boolean;
            workspacePath: string | null;
            currentMode: "interactive" | "autopilot" | "plan";
            isRemote: boolean;
            modifiedTime: string;
            clientName?: string | undefined;
            selectedModel?: string | undefined;
            summary?: string | undefined;
            initialName?: string | undefined;
            remoteMetadata?: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
            } | undefined;
        }, {
            workspace: {
                id: string;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                updated_at?: string | undefined;
            } | null;
            workingDirectory: string;
            sessionId: string;
            startTime: string;
            alreadyInUse: boolean;
            workspacePath: string | null;
            currentMode: "interactive" | "autopilot" | "plan";
            isRemote: boolean;
            modifiedTime: string;
            clientName?: string | undefined;
            selectedModel?: string | undefined;
            summary?: string | undefined;
            initialName?: string | undefined;
            remoteMetadata?: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
            } | undefined;
        }>;
    };
    isProcessing: {
        description: string;
        result: z_2.ZodObject<{
            processing: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            processing: boolean;
        }, {
            processing: boolean;
        }>;
    };
    activity: {
        description: string;
        result: z_2.ZodObject<{
            abortable: z_2.ZodBoolean;
            hasActiveWork: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            hasActiveWork: boolean;
            abortable: boolean;
        }, {
            hasActiveWork: boolean;
            abortable: boolean;
        }>;
    };
    contextInfo: {
        description: string;
        params: z_2.ZodObject<{
            promptTokenLimit: z_2.ZodNumber;
            outputTokenLimit: z_2.ZodNumber;
            selectedModel: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            promptTokenLimit: number;
            outputTokenLimit: number;
            selectedModel?: string | undefined;
        }, {
            promptTokenLimit: number;
            outputTokenLimit: number;
            selectedModel?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            contextInfo: z_2.ZodNullable<z_2.ZodObject<{
                modelName: z_2.ZodString;
                systemTokens: z_2.ZodNumber;
                conversationTokens: z_2.ZodNumber;
                toolDefinitionsTokens: z_2.ZodNumber;
                mcpToolsTokens: z_2.ZodNumber;
                totalTokens: z_2.ZodNumber;
                promptTokenLimit: z_2.ZodNumber;
                compactionThreshold: z_2.ZodNumber;
                limit: z_2.ZodNumber;
                bufferTokens: z_2.ZodNumber;
            }, "strip", z_2.ZodTypeAny, {
                systemTokens: number;
                conversationTokens: number;
                toolDefinitionsTokens: number;
                totalTokens: number;
                modelName: string;
                limit: number;
                mcpToolsTokens: number;
                promptTokenLimit: number;
                compactionThreshold: number;
                bufferTokens: number;
            }, {
                systemTokens: number;
                conversationTokens: number;
                toolDefinitionsTokens: number;
                totalTokens: number;
                modelName: string;
                limit: number;
                mcpToolsTokens: number;
                promptTokenLimit: number;
                compactionThreshold: number;
                bufferTokens: number;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            contextInfo: {
                systemTokens: number;
                conversationTokens: number;
                toolDefinitionsTokens: number;
                totalTokens: number;
                modelName: string;
                limit: number;
                mcpToolsTokens: number;
                promptTokenLimit: number;
                compactionThreshold: number;
                bufferTokens: number;
            } | null;
        }, {
            contextInfo: {
                systemTokens: number;
                conversationTokens: number;
                toolDefinitionsTokens: number;
                totalTokens: number;
                modelName: string;
                limit: number;
                mcpToolsTokens: number;
                promptTokenLimit: number;
                compactionThreshold: number;
                bufferTokens: number;
            } | null;
        }>;
    };
    recordContextChange: {
        description: string;
        params: z_2.ZodObject<{
            context: z_2.ZodObject<{
                cwd: z_2.ZodString;
                gitRoot: z_2.ZodOptional<z_2.ZodString>;
                repository: z_2.ZodOptional<z_2.ZodString>;
                hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                repositoryHost: z_2.ZodOptional<z_2.ZodString>;
                branch: z_2.ZodOptional<z_2.ZodString>;
                headCommit: z_2.ZodOptional<z_2.ZodString>;
                baseCommit: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                repositoryHost?: string | undefined;
                branch?: string | undefined;
                headCommit?: string | undefined;
                baseCommit?: string | undefined;
            }, {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                repositoryHost?: string | undefined;
                branch?: string | undefined;
                headCommit?: string | undefined;
                baseCommit?: string | undefined;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            context: {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                repositoryHost?: string | undefined;
                branch?: string | undefined;
                headCommit?: string | undefined;
                baseCommit?: string | undefined;
            };
        }, {
            context: {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                repositoryHost?: string | undefined;
                branch?: string | undefined;
                headCommit?: string | undefined;
                baseCommit?: string | undefined;
            };
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    setWorkingDirectory: {
        description: string;
        params: z_2.ZodObject<{
            workingDirectory: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            workingDirectory: string;
        }, {
            workingDirectory: string;
        }>;
        result: z_2.ZodObject<{
            workingDirectory: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            workingDirectory: string;
        }, {
            workingDirectory: string;
        }>;
    };
    recomputeContextTokens: {
        description: string;
        params: z_2.ZodObject<{
            modelId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            modelId: string;
        }, {
            modelId: string;
        }>;
        result: z_2.ZodObject<{
            totalTokens: z_2.ZodNumber;
            messagesTokenCount: z_2.ZodNumber;
            systemTokenCount: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            totalTokens: number;
            messagesTokenCount: number;
            systemTokenCount: number;
        }, {
            totalTokens: number;
            messagesTokenCount: number;
            systemTokenCount: number;
        }>;
    };
};

export declare type SessionMode = (typeof SESSION_MODES)[number];

declare type SessionModeApi = ApiSchemaToInterface<typeof sessionModeApiSchema>;

declare const sessionModeApiSchema: {
    get: {
        description: string;
        result: z_2.ZodEnum<["interactive", "plan", "autopilot"]>;
    };
    set: {
        description: string;
        params: z_2.ZodObject<{
            mode: z_2.ZodEnum<["interactive", "plan", "autopilot"]>;
        }, "strip", z_2.ZodTypeAny, {
            mode: "interactive" | "autopilot" | "plan";
        }, {
            mode: "interactive" | "autopilot" | "plan";
        }>;
    };
};

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.mode_changed">;
    data: z.ZodObject<{
        previousMode: z.ZodEnum<["interactive", "plan", "autopilot"]>;
        newMode: z.ZodEnum<["interactive", "plan", "autopilot"]>;
    }, "strip", z.ZodTypeAny, {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    }, {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.mode_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.mode_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousMode: "interactive" | "autopilot" | "plan";
        newMode: "interactive" | "autopilot" | "plan";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionModelApi = ApiSchemaToInterface<typeof sessionModelApiSchema>;

declare const sessionModelApiSchema: {
    getCurrent: {
        description: string;
        result: z_2.ZodObject<{
            modelId: z_2.ZodOptional<z_2.ZodString>;
            reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
            contextTier: z_2.ZodOptional<z_2.ZodEnum<["default", "long_context"]>>;
        }, "strip", z_2.ZodTypeAny, {
            contextTier?: "default" | "long_context" | undefined;
            reasoningEffort?: string | undefined;
            modelId?: string | undefined;
        }, {
            contextTier?: "default" | "long_context" | undefined;
            reasoningEffort?: string | undefined;
            modelId?: string | undefined;
        }>;
    };
    switchTo: {
        description: string;
        params: z_2.ZodObject<{
            modelId: z_2.ZodString;
            reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
            reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
            modelCapabilities: z_2.ZodOptional<z_2.ZodObject<{
                supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                    vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                }, "strip", z_2.ZodTypeAny, {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                }, {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                }>>>;
                limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                    max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                    max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                    max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                    vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                        max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                    }, "strip", z_2.ZodTypeAny, {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    }, {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                }, {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                }>>>;
            }, "strip", z_2.ZodTypeAny, {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            }, {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            }>>;
            contextTier: z_2.ZodOptional<z_2.ZodEnum<["default", "long_context"]>>;
        }, "strip", z_2.ZodTypeAny, {
            modelId: string;
            contextTier?: "default" | "long_context" | undefined;
            reasoningEffort?: string | undefined;
            reasoningSummary?: "none" | "concise" | "detailed" | undefined;
            modelCapabilities?: {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            } | undefined;
        }, {
            modelId: string;
            contextTier?: "default" | "long_context" | undefined;
            reasoningEffort?: string | undefined;
            reasoningSummary?: "none" | "concise" | "detailed" | undefined;
            modelCapabilities?: {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            } | undefined;
        }>;
        result: z_2.ZodObject<{
            modelId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            modelId?: string | undefined;
        }, {
            modelId?: string | undefined;
        }>;
    };
    setReasoningEffort: {
        description: string;
        params: z_2.ZodObject<{
            reasoningEffort: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            reasoningEffort: string;
        }, {
            reasoningEffort: string;
        }>;
        result: z_2.ZodObject<{
            reasoningEffort: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            reasoningEffort: string;
        }, {
            reasoningEffort: string;
        }>;
    };
    list: {
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            skipCache: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            skipCache?: boolean | undefined;
        }, {
            skipCache?: boolean | undefined;
        }>>;
        result: z_2.ZodObject<{
            list: z_2.ZodArray<z_2.ZodUnknown, "many">;
            quotaSnapshots: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
        }, "strip", z_2.ZodTypeAny, {
            list: unknown[];
            quotaSnapshots?: Record<string, unknown> | undefined;
        }, {
            list: unknown[];
            quotaSnapshots?: Record<string, unknown> | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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.ZodNullable<z.ZodString>>;
        previousReasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        reasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        contextTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<["default", "long_context"]>>>;
        cause: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    }, {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.model_change";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.model_change";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        newModel: string;
        contextTier?: "default" | "long_context" | null | undefined;
        reasoningEffort?: string | null | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        previousModel?: string | undefined;
        previousReasoningEffort?: string | undefined;
        previousReasoningSummary?: "none" | "concise" | "detailed" | undefined;
        cause?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare const SessionModeSchema: z.ZodEnum<["interactive", "plan", "autopilot"]>;

declare type SessionNameApi = ApiSchemaToInterface<typeof sessionNameApiSchema>;

declare const sessionNameApiSchema: {
    get: {
        description: string;
        result: z_2.ZodObject<{
            name: z_2.ZodNullable<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            name: string | null;
        }, {
            name: string | null;
        }>;
    };
    set: {
        description: string;
        params: z_2.ZodObject<{
            name: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
        }, {
            name: string;
        }>;
    };
    setAuto: {
        description: string;
        params: z_2.ZodObject<{
            summary: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            summary: string;
        }, {
            summary: string;
        }>;
        result: z_2.ZodObject<{
            applied: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            applied: boolean;
        }, {
            applied: boolean;
        }>;
    };
};

export declare interface SessionOptions extends Partial<SessionMetadata> {
    clientName?: string;
    /**
     * Structured client kind used for behavior gates.
     * Unlike clientName, this is not a telemetry branding identifier and should not depend on a literal name.
     */
    clientKind?: SessionClientKind;
    /**
     * Internal session correlation IDs forwarded into session telemetry.
     * This is intentionally not part of the generated public shared API schemas,
     * and is applied only at construction time (not via {@link UpdatableSessionOptions}).
     * @internal
     */
    internalCorrelationIds?: SessionCorrelationIds;
    model?: string;
    integrationId?: string;
    /**
     * Reasoning effort level for models that support it.
     * Valid values: "low", "medium", "high", "xhigh", "max"
     * Only applies to models where reasoning effort is supported.
     */
    reasoningEffort?: ReasoningEffortOption;
    /**
     * Reasoning summary mode for models that support it.
     * When omitted, the client uses model/runtime defaults.
     */
    reasoningSummary?: ReasoningSummary;
    /**
     * Explicit override for whether OpenAI reasoning summaries should be requested.
     * When omitted, the client does not request reasoning summaries.
     * @deprecated Use reasoningSummary: "detailed" instead.
     */
    enableReasoningSummaries?: boolean;
    /**
     * Custom API provider configuration (BYOK - Bring Your Own Key).
     * When set, bypasses Copilot API authentication and uses this provider instead.
     */
    provider?: ProviderConfig;
    /**
     * When true, do not attach session telemetry.
     * Used by the SDK server for BYOK sessions or when the caller explicitly opts out.
     */
    disableSessionTelemetry?: boolean;
    /**
     * Controls when sessionEnd hooks fire.
     *
     * - `per-turn` (default): fire after each agentic loop, preserving SDK/query behavior.
     * - `interactive`: defer sessionEnd hooks until explicit session shutdown.
     */
    sessionLifecycleMode?: "per-turn" | "interactive";
    /** SDK-supplied overrides for model capabilities, deep-merged over runtime defaults. */
    modelCapabilitiesOverrides?: ModelCapabilitiesOverride;
    /**
     * Context tier selected for models with tiered context pricing. The session
     * uses this to derive an effective `modelCapabilitiesOverrides` field-wise,
     * so that compaction, truncation, token-display, and request limits all
     * honor the selected tier. Persisted in `session.start` (and refreshed in
     * `session.resume`) so resume restores the exact tier without app-level
     * repair logic.
     */
    contextTier?: "default" | "long_context";
    featureFlags?: FeatureFlags;
    /** Internal: concrete service owned by an existing session and inherited by child sessions. */
    featureFlagService?: IFeatureFlagService;
    isExperimentalMode?: boolean;
    /** Whether this session supports remote steering via GitHub. */
    remoteSteerable?: boolean;
    /**
     * Whether remote exporting (with or without steering) is enabled for this session.
     * Telemetry-only: not persisted in session events.
     */
    remoteExporting?: boolean;
    /**
     * Whether remote steering was enabled by default via config settings rather than an explicit --remote flag.
     * Telemetry-only: not persisted in session events.
     */
    remoteDefaultedOn?: boolean;
    /**
     * The session ID of a "parent" interactive session that spawned this
     * session (e.g., a detached headless rem-agent run launched on
     * shutdown). When set, telemetry from this session is reported under
     * the parent's session_id so all activity rolls up as part of the
     * same user-perceived session.
     */
    detachedFromSpawningParentSessionId?: string;
    /**
     * The engagement ID of a "parent" interactive session that spawned
     * this session. When set, the child's `SessionTelemetry` reuses this
     * UUID instead of generating a fresh one, so detached follow-up work
     * (e.g. the rem-agent consolidation run) groups under the same
     * engagement as the parent for analytics like active-sitting time
     * and prompts-per-engagement. Telemetry-only; not persisted on the
     * Session itself.
     */
    detachedFromSpawningParentEngagementId?: string;
    availableTools?: string[];
    excludedTools?: string[];
    /**
     * Controls how {@link availableTools} and {@link excludedTools} combine when both are set.
     * Defaults to `"available"` (allowlist wins when set; matches CLI flag behavior).
     * SDK clients can opt into `"excluded"` to model "all except X" by combining the two
     * lists.
     */
    toolFilterPrecedence?: ToolFilterPrecedence;
    /**
     * 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;
    /**
     * When true, suppresses tools_changed_notice injection in user messages.
     * Used by subagent sessions where tool initialization before send() causes
     * spurious tool-change detection.
     */
    suppressToolChangedNotice?: boolean;
    /**
     * Workspace path inherited from a parent session. Used by subagent sessions
     * that don't have their own workspace but need the parent's path so the tool
     * pipeline creates the same tools (e.g., sql tool requires workspacePath).
     */
    parentWorkspacePath?: string;
    /**
     * Shell context inherited from a parent session. When set, the session shares
     * the parent's InteractiveShellToolContext so subagent shell commands appear in
     * the parent's /tasks dialog. The session will NOT shut down inherited shells on dispose.
     */
    parentShellContext?: InteractiveShellToolContext;
    /**
     * Callback for publishing inbox entries from sidekick agents.
     * Inherited by child sessions so the `send_inbox` tool is created in the tool pipeline.
     */
    sendInboxPublisher?: SendInboxPublisher;
    /**
     * The parent turn's agent task ID. Set on child sessions so CAPI requests
     * include X-Parent-Agent-Id for parent-child request correlation.
     */
    parentAgentTaskId?: string;
    /**
     * 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;
    /**
     * Whether to discover custom instructions on demand after successful file views
     * (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing).
     *
     * Combined with `skipCustomInstructions` and the runtime-side
     * ON_DEMAND_INSTRUCTIONS feature flag.
     * Defaults to false. CLI sessions opt into this by spreading `cliSessionDefaults()`.
     */
    enableOnDemandInstructionDiscovery?: boolean;
    disabledSkills?: Set<string>;
    /**
     * When true, enables loading of `.github/hooks/` filesystem hooks.
     * Separate from the `hooks` option (which provides SDK callback hook handlers).
     * SDK sessions default to false; CLI sessions set their own defaults.
     */
    enableFileHooks?: boolean;
    /**
     * When true, enables host git operations (context resolution, child repo scanning,
     * git info in system prompt). SDK sessions default to false.
     */
    enableHostGitOperations?: boolean;
    /**
     * When true, enables cross-session store writes and reads.
     * SDK sessions default to false.
     */
    enableSessionStore?: boolean;
    /**
     * When true, enables skill directory scanning and loading.
     * Falls back to enableConfigDiscovery when not explicitly set.
     */
    enableSkills?: boolean;
    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;
    /**
     * When true, the selected custom agent's prompt is NOT injected into the user message.
     * Used by automation triggers (e.g. interval) where the agent prompt has already been
     * placed into the problem statement, to avoid duplicating the instruction. Skill context
     * configured on the agent is still injected.
     */
    suppressCustomAgentPrompt?: boolean;
    /**
     * Additional directories to search for external custom instruction files.
     * AGENTS.md files may live directly in these directories.
     * `*.instructions.md` files may live directly in these directories or under
     * a `.github/instructions` child directory.
     */
    instructionDirectories?: string[];
    organizationCustomInstructions?: string;
    skipCustomInstructions?: boolean;
    /** Set of instruction source IDs to exclude from the system prompt */
    disabledInstructionSources?: ReadonlySet<string>;
    /**
     * When true, skip embedding retrieval pipeline initialization and execution.
     * Used by subagent sessions — they inherit the parent's prompt context.
     */
    skipEmbeddingRetrieval?: boolean;
    /**
     * Controls how embedding cache data is stored.
     * - `"persistent"`: Uses a shared on-disk SQLite database (default for CLI; enables cross-restart caching).
     * - `"in-memory"`: Uses a session-scoped in-memory SQLite database (default for SDK; ensures per-session isolation).
     *
     * When unset, defaults to `"persistent"` behavior.
     */
    embeddingCacheStorage?: "persistent" | "in-memory";
    /** 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;
    /**
     * Optional per-session MCP OAuth store. When provided, injects an {@link InMemoryMCPOAuthStore}
     * (or a custom implementation) so that per-session OAuth flows never touch
     * the host's system keychain or `~/.copilot/` filesystem.
     *
     * When omitted, a keychain-backed store is created via {@link getMCPOAuthStore}.
     */
    mcpOAuthStore?: MCPOAuthStoreInterface;
    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;
    /** When true, automatically switch to auto mode on eligible rate limit errors instead of pausing. */
    continueOnAutoMode?: boolean;
    /**
     * Callback invoked when exit_plan_mode tool is called. Shows approval dialog and returns user response.
     *
     * Note: setting this callback wires a responder for the tool, but the tool
     * is only exposed to the model while the session is in plan mode
     * (`agentMode === "plan"`). Outside plan mode the tool is hidden even if
     * this callback is set.
     */
    onExitPlanMode?: (request: ExitPlanModeRequest) => Promise<ExitPlanModeResponse>;
    /**
     * Whether to expose the `manage_schedule` tool to the agent. The
     * runtime always owns a per-session schedule registry (so schema
     * callers can list/add/stop entries unconditionally); this flag only
     * controls whether the agent itself can see the tool. Set by hosts
     * that want to enable scheduled-prompt behavior (e.g., the CLI for
     * staff users).
     */
    manageScheduleEnabled?: boolean;
    /**
     * Explicit tool names this session needs. Non-standard tools (send_inbox, etc.)
     * are only created by toolInit when listed here. Set by createSubagentSession
     * from the agent definition's tools array.
     */
    requestedTools?: string[];
    /** 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;
    /** Runtime-internal resolver for OTel trace context propagation on MCP tool calls. */
    mcpTraceContextResolver?: TraceContextResolver;
    /** Runtime-internal resolver for updating or clearing the parent trace context for a turn. */
    otelParentContextResolver?: (traceparent: string | undefined, tracestate: string | undefined) => void;
    /** Runtime-internal delegate used by SDK server sessions to manage remote steering. */
    remoteDelegate?: SessionRemoteDelegate;
    /** Runtime-internal server-level sessions API used by session slash commands that manage persisted sessions. */
    sessionsApi?: SessionsApi;
    /** Runtime-internal sender used by SDK server sessions to stream shell output and exits. */
    shellNotifier?: ShellNotificationSender;
    /** Runtime-internal telemetry sender installed at construction time. */
    telemetrySender?: DisposableTelemetrySender;
    /** Runtime-internal extension controller installed at construction time. */
    extensionController?: ExtensionController;
    /**
     * When true on a resumed session, the agentic loop awaits in-flight
     * permission and external-tool requests until they reach a terminal state.
     * User sends are queued behind that pending work in the normal way.
     *
     * When false (default), resume immediately marks any tool calls or
     * permission requests that were in flight at suspend as interrupted — matching the behaviour of earlier
     * runtime versions. The session resumes in a clean state, and subsequent
     * sends run with no resume-specific code paths active.
     */
    continuePendingWork?: boolean;
    /**
     * CAPI interaction type for this session's API requests.
     * Defaults to "conversation-agent". Subagent sessions use "conversation-subagent".
     */
    interactionType?: "conversation-agent" | "conversation-subagent";
    /**
     * If this session is for a sub-agent of another session, then the depth of this session
     * from its root ancestor. Defaults to 0 (top-level session). Subagent sessions are created
     * with parentDepth + 1.
     */
    subAgentDepth?: number;
    /**
     * Per-invocation agent id (typically the dispatching task tool's `toolCallId`)
     * when this session represents a subagent invocation. Distinct from `sessionId`,
     * which identifies the CLI session as a whole.
     *
     * Outer sessions leave this undefined. Subagent sessions created via
     * `Session.createSubagentSession()` set this to the per-invocation id so that
     * hook payloads, which contract to surface the per-invocation id as their
     * `sessionId` field, can read `this.agentId ?? this.sessionId`.
     */
    agentId?: string;
    /**
     * Optional handler for permission requests. When set, the session delegates
     * all permission requests (from tools like bash, edit, create) to this handler
     * instead of using its own `pendingRequests`.
     *
     * Used by subagent sessions to bubble permission dialogs up to the parent
     * session's CLI UI.
     */
    permissionRequestHandler?: (request: PermissionRequest) => Promise<PermissionRequestResult>;
}

declare type SessionOptionsApi = ApiSchemaToInterface<typeof sessionOptionsApiSchema>;

/**
 * Schema for the genuinely-mutable subset of session options.
 *
 * Today this exposes a single kitchen-sink {@link sessionOptionsApiSchema.update}
 * method that mirrors the runtime's `Session.updateOptions(...)` mutator. SDK
 * consumers patch any subset of fields in one call; the runtime applies the
 * patch eagerly with the same side-effects as the in-process call (e.g.,
 * feature flag changes invalidating contentExclusionService, plugin
 * list changes invalidating skills cache).
 *
 * Most other `SessionOptions` fields are set once at session construction and
 * never need post-construction mutation. For credentials/auth, use
 * `session.auth.setCredentials` (`sessionAuthApi.ts`). For
 * working-directory mutations, prefer `session.metadata.setWorkingDirectory`
 * (which also runs the host's cwd-change side effects).
 */
declare const sessionOptionsApiSchema: {
    update: {
        description: string;
        params: z_2.ZodObject<{
            model: z_2.ZodOptional<z_2.ZodString>;
            modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                    vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                }, "strip", z_2.ZodTypeAny, {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                }, {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                }>>>;
                limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                    max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                    max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                    max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                    vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                        max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                    }, "strip", z_2.ZodTypeAny, {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    }, {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                }, {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                }>>>;
            }, "strip", z_2.ZodTypeAny, {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            }, {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            }>>;
            reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
            reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
            clientName: z_2.ZodOptional<z_2.ZodString>;
            lspClientName: z_2.ZodOptional<z_2.ZodString>;
            integrationId: z_2.ZodOptional<z_2.ZodString>;
            featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
            isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
            provider: z_2.ZodOptional<z_2.ZodObject<{
                type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                baseUrl: z_2.ZodString;
                apiKey: z_2.ZodOptional<z_2.ZodString>;
                bearerToken: z_2.ZodOptional<z_2.ZodString>;
                azure: z_2.ZodOptional<z_2.ZodObject<{
                    apiVersion: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    apiVersion?: string | undefined;
                }, {
                    apiVersion?: string | undefined;
                }>>;
                modelId: z_2.ZodOptional<z_2.ZodString>;
                wireModel: z_2.ZodOptional<z_2.ZodString>;
                maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
            }, "strip", z_2.ZodTypeAny, {
                baseUrl: string;
                type?: "anthropic" | "openai" | "azure" | undefined;
                headers?: Record<string, string> | undefined;
                azure?: {
                    apiVersion?: string | undefined;
                } | undefined;
                bearerToken?: string | undefined;
                apiKey?: string | undefined;
                modelId?: string | undefined;
                maxOutputTokens?: number | undefined;
                wireApi?: "completions" | "responses" | undefined;
                wireModel?: string | undefined;
                maxPromptTokens?: number | undefined;
                maxContextWindowTokens?: number | undefined;
            }, {
                baseUrl: string;
                type?: "anthropic" | "openai" | "azure" | undefined;
                headers?: Record<string, string> | undefined;
                azure?: {
                    apiVersion?: string | undefined;
                } | undefined;
                bearerToken?: string | undefined;
                apiKey?: string | undefined;
                modelId?: string | undefined;
                maxOutputTokens?: number | undefined;
                wireApi?: "completions" | "responses" | undefined;
                wireModel?: string | undefined;
                maxPromptTokens?: number | undefined;
                maxContextWindowTokens?: number | undefined;
            }>>;
            workingDirectory: z_2.ZodOptional<z_2.ZodString>;
            availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            toolFilterPrecedence: z_2.ZodOptional<z_2.ZodEnum<["available", "excluded"]>>;
            enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
            shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
            shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                enabled: z_2.ZodBoolean;
                userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                    filesystem: z_2.ZodOptional<z_2.ZodObject<{
                        readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                    }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                        allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                        allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                        allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                    }, "strip", z_2.ZodTypeAny, {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    }, {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    }>>;
                    experimental: z_2.ZodOptional<z_2.ZodObject<{
                        seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                            keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.ZodTypeAny, {
                            keychainAccess?: boolean | undefined;
                        }, {
                            keychainAccess?: boolean | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    }, {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    }>>;
                }, "strip", z_2.ZodTypeAny, {
                    experimental?: {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    } | undefined;
                    filesystem?: {
                        readwritePaths?: string[] | undefined;
                        readonlyPaths?: string[] | undefined;
                        deniedPaths?: string[] | undefined;
                        clearPolicyOnExit?: boolean | undefined;
                    } | undefined;
                    network?: {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    } | undefined;
                }, {
                    experimental?: {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    } | undefined;
                    filesystem?: {
                        readwritePaths?: string[] | undefined;
                        readonlyPaths?: string[] | undefined;
                        deniedPaths?: string[] | undefined;
                        clearPolicyOnExit?: boolean | undefined;
                    } | undefined;
                    network?: {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    } | undefined;
                }>>;
                config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                enabled: boolean;
                config?: Record<string, unknown> | undefined;
                userPolicy?: {
                    experimental?: {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    } | undefined;
                    filesystem?: {
                        readwritePaths?: string[] | undefined;
                        readonlyPaths?: string[] | undefined;
                        deniedPaths?: string[] | undefined;
                        clearPolicyOnExit?: boolean | undefined;
                    } | undefined;
                    network?: {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    } | undefined;
                } | undefined;
                addCurrentWorkingDirectory?: boolean | undefined;
            }, {
                enabled: boolean;
                config?: Record<string, unknown> | undefined;
                userPolicy?: {
                    experimental?: {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    } | undefined;
                    filesystem?: {
                        readwritePaths?: string[] | undefined;
                        readonlyPaths?: string[] | undefined;
                        deniedPaths?: string[] | undefined;
                        clearPolicyOnExit?: boolean | undefined;
                    } | undefined;
                    network?: {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    } | undefined;
                } | undefined;
                addCurrentWorkingDirectory?: boolean | undefined;
            }>>;
            logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
            envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
            skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
            installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                marketplace: z_2.ZodString;
                version: z_2.ZodOptional<z_2.ZodString>;
                installed_at: z_2.ZodString;
                enabled: z_2.ZodBoolean;
                cache_path: z_2.ZodOptional<z_2.ZodString>;
                source: z_2.ZodOptional<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";
                }>]>>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }, {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }>, "many">>;
            customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
            suppressCustomAgentPrompt: z_2.ZodOptional<z_2.ZodBoolean>;
            skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
            disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
            trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
            enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
            copilotUrl: z_2.ZodOptional<z_2.ZodString>;
            askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
            continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
            runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
            enableReasoningSummaries: z_2.ZodOptional<z_2.ZodBoolean>;
            agentContext: z_2.ZodOptional<z_2.ZodString>;
            eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
            additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
            manageScheduleEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
            sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            skipEmbeddingRetrieval: z_2.ZodOptional<z_2.ZodBoolean>;
            organizationCustomInstructions: z_2.ZodOptional<z_2.ZodString>;
            enableFileHooks: z_2.ZodOptional<z_2.ZodBoolean>;
            enableHostGitOperations: z_2.ZodOptional<z_2.ZodBoolean>;
            enableSessionStore: z_2.ZodOptional<z_2.ZodBoolean>;
            enableSkills: z_2.ZodOptional<z_2.ZodBoolean>;
            contextTier: z_2.ZodOptional<z_2.ZodEnum<["default", "long_context"]>>;
        }, "strip", z_2.ZodTypeAny, {
            model?: string | undefined;
            clientName?: string | undefined;
            featureFlags?: Record<string, boolean> | undefined;
            contextTier?: "default" | "long_context" | undefined;
            continueOnAutoMode?: boolean | undefined;
            skillDirectories?: string[] | undefined;
            disabledSkills?: string[] | undefined;
            copilotUrl?: string | undefined;
            workingDirectory?: string | undefined;
            reasoningEffort?: string | undefined;
            reasoningSummary?: "none" | "concise" | "detailed" | undefined;
            integrationId?: string | undefined;
            sandboxConfig?: {
                enabled: boolean;
                config?: Record<string, unknown> | undefined;
                userPolicy?: {
                    experimental?: {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    } | undefined;
                    filesystem?: {
                        readwritePaths?: string[] | undefined;
                        readonlyPaths?: string[] | undefined;
                        deniedPaths?: string[] | undefined;
                        clearPolicyOnExit?: boolean | undefined;
                    } | undefined;
                    network?: {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    } | undefined;
                } | undefined;
                addCurrentWorkingDirectory?: boolean | undefined;
            } | undefined;
            installedPlugins?: {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }[] | undefined;
            envValueMode?: "direct" | "indirect" | undefined;
            disabledInstructionSources?: string[] | undefined;
            lspClientName?: string | undefined;
            enableStreaming?: boolean | undefined;
            agentContext?: string | undefined;
            enableReasoningSummaries?: boolean | undefined;
            isExperimentalMode?: boolean | undefined;
            provider?: {
                baseUrl: string;
                type?: "anthropic" | "openai" | "azure" | undefined;
                headers?: Record<string, string> | undefined;
                azure?: {
                    apiVersion?: string | undefined;
                } | undefined;
                bearerToken?: string | undefined;
                apiKey?: string | undefined;
                modelId?: string | undefined;
                maxOutputTokens?: number | undefined;
                wireApi?: "completions" | "responses" | undefined;
                wireModel?: string | undefined;
                maxPromptTokens?: number | undefined;
                maxContextWindowTokens?: number | undefined;
            } | undefined;
            modelCapabilitiesOverrides?: {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            } | undefined;
            availableTools?: string[] | undefined;
            excludedTools?: string[] | undefined;
            toolFilterPrecedence?: "available" | "excluded" | undefined;
            enableScriptSafety?: boolean | undefined;
            shellInitProfile?: string | undefined;
            shellProcessFlags?: string[] | undefined;
            logInteractiveShells?: boolean | undefined;
            enableOnDemandInstructionDiscovery?: boolean | undefined;
            enableFileHooks?: boolean | undefined;
            enableHostGitOperations?: boolean | undefined;
            enableSessionStore?: boolean | undefined;
            enableSkills?: boolean | undefined;
            customAgentsLocalOnly?: boolean | undefined;
            suppressCustomAgentPrompt?: boolean | undefined;
            organizationCustomInstructions?: string | undefined;
            skipCustomInstructions?: boolean | undefined;
            skipEmbeddingRetrieval?: boolean | undefined;
            coauthorEnabled?: boolean | undefined;
            trajectoryFile?: string | undefined;
            eventsLogDirectory?: string | undefined;
            askUserDisabled?: boolean | undefined;
            manageScheduleEnabled?: boolean | undefined;
            runningInInteractiveMode?: boolean | undefined;
            sessionCapabilities?: SessionCapability[] | undefined;
            additionalContentExclusionPolicies?: 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">[] | undefined;
        }, {
            model?: string | undefined;
            clientName?: string | undefined;
            featureFlags?: Record<string, boolean> | undefined;
            contextTier?: "default" | "long_context" | undefined;
            continueOnAutoMode?: boolean | undefined;
            skillDirectories?: string[] | undefined;
            disabledSkills?: string[] | undefined;
            copilotUrl?: string | undefined;
            workingDirectory?: string | undefined;
            reasoningEffort?: string | undefined;
            reasoningSummary?: "none" | "concise" | "detailed" | undefined;
            integrationId?: string | undefined;
            sandboxConfig?: {
                enabled: boolean;
                config?: Record<string, unknown> | undefined;
                userPolicy?: {
                    experimental?: {
                        seatbelt?: {
                            keychainAccess?: boolean | undefined;
                        } | undefined;
                    } | undefined;
                    filesystem?: {
                        readwritePaths?: string[] | undefined;
                        readonlyPaths?: string[] | undefined;
                        deniedPaths?: string[] | undefined;
                        clearPolicyOnExit?: boolean | undefined;
                    } | undefined;
                    network?: {
                        allowOutbound?: boolean | undefined;
                        allowLocalNetwork?: boolean | undefined;
                        allowedHosts?: string[] | undefined;
                        blockedHosts?: string[] | undefined;
                    } | undefined;
                } | undefined;
                addCurrentWorkingDirectory?: boolean | undefined;
            } | undefined;
            installedPlugins?: {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }[] | undefined;
            envValueMode?: "direct" | "indirect" | undefined;
            disabledInstructionSources?: string[] | undefined;
            lspClientName?: string | undefined;
            enableStreaming?: boolean | undefined;
            agentContext?: string | undefined;
            enableReasoningSummaries?: boolean | undefined;
            isExperimentalMode?: boolean | undefined;
            provider?: {
                baseUrl: string;
                type?: "anthropic" | "openai" | "azure" | undefined;
                headers?: Record<string, string> | undefined;
                azure?: {
                    apiVersion?: string | undefined;
                } | undefined;
                bearerToken?: string | undefined;
                apiKey?: string | undefined;
                modelId?: string | undefined;
                maxOutputTokens?: number | undefined;
                wireApi?: "completions" | "responses" | undefined;
                wireModel?: string | undefined;
                maxPromptTokens?: number | undefined;
                maxContextWindowTokens?: number | undefined;
            } | undefined;
            modelCapabilitiesOverrides?: {
                limits?: {
                    max_output_tokens?: number | undefined;
                    vision?: {
                        supported_media_types?: string[] | undefined;
                        max_prompt_images?: number | undefined;
                        max_prompt_image_size?: number | undefined;
                    } | undefined;
                    max_prompt_tokens?: number | undefined;
                    max_context_window_tokens?: number | undefined;
                } | undefined;
                supports?: {
                    reasoningEffort?: boolean | undefined;
                    vision?: boolean | undefined;
                } | undefined;
            } | undefined;
            availableTools?: string[] | undefined;
            excludedTools?: string[] | undefined;
            toolFilterPrecedence?: "available" | "excluded" | undefined;
            enableScriptSafety?: boolean | undefined;
            shellInitProfile?: string | undefined;
            shellProcessFlags?: string[] | undefined;
            logInteractiveShells?: boolean | undefined;
            enableOnDemandInstructionDiscovery?: boolean | undefined;
            enableFileHooks?: boolean | undefined;
            enableHostGitOperations?: boolean | undefined;
            enableSessionStore?: boolean | undefined;
            enableSkills?: boolean | undefined;
            customAgentsLocalOnly?: boolean | undefined;
            suppressCustomAgentPrompt?: boolean | undefined;
            organizationCustomInstructions?: string | undefined;
            skipCustomInstructions?: boolean | undefined;
            skipEmbeddingRetrieval?: boolean | undefined;
            coauthorEnabled?: boolean | undefined;
            trajectoryFile?: string | undefined;
            eventsLogDirectory?: string | undefined;
            askUserDisabled?: boolean | undefined;
            manageScheduleEnabled?: boolean | undefined;
            runningInInteractiveMode?: boolean | undefined;
            sessionCapabilities?: SessionCapability[] | undefined;
            additionalContentExclusionPolicies?: 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">[] | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
};

declare type SessionPermissionsApi = ApiSchemaToInterface<typeof sessionPermissionsApiSchema>;

declare const sessionPermissionsApiSchema: {
    configure: {
        description: string;
        params: z_2.ZodObject<{
            approveAllToolPermissionRequests: z_2.ZodOptional<z_2.ZodBoolean>;
            approveAllReadPermissionRequests: z_2.ZodOptional<z_2.ZodBoolean>;
            rules: z_2.ZodOptional<z_2.ZodObject<{
                approved: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodType<Rule, z_2.ZodTypeDef, Rule>, "many">>;
                denied: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodType<Rule, z_2.ZodTypeDef, Rule>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                approved: readonly Rule[];
                denied: readonly Rule[];
            }, {
                approved: readonly Rule[];
                denied: readonly Rule[];
            }>>;
            paths: z_2.ZodOptional<z_2.ZodObject<{
                unrestricted: z_2.ZodOptional<z_2.ZodBoolean>;
                additionalDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                includeTempDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                workspacePath: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                workspacePath?: string | undefined;
                unrestricted?: boolean | undefined;
                additionalDirectories?: string[] | undefined;
                includeTempDirectory?: boolean | undefined;
            }, {
                workspacePath?: string | undefined;
                unrestricted?: boolean | undefined;
                additionalDirectories?: string[] | undefined;
                includeTempDirectory?: boolean | undefined;
            }>>;
            urls: z_2.ZodOptional<z_2.ZodObject<{
                unrestricted: z_2.ZodOptional<z_2.ZodBoolean>;
                initialAllowed: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEffects<z_2.ZodString, string, string>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                unrestricted?: boolean | undefined;
                initialAllowed?: string[] | undefined;
            }, {
                unrestricted?: boolean | undefined;
                initialAllowed?: string[] | undefined;
            }>>;
            additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
        }, "strip", z_2.ZodTypeAny, {
            paths?: {
                workspacePath?: string | undefined;
                unrestricted?: boolean | undefined;
                additionalDirectories?: string[] | undefined;
                includeTempDirectory?: boolean | undefined;
            } | undefined;
            rules?: {
                approved: readonly Rule[];
                denied: readonly Rule[];
            } | undefined;
            additionalContentExclusionPolicies?: 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">[] | undefined;
            approveAllToolPermissionRequests?: boolean | undefined;
            approveAllReadPermissionRequests?: boolean | undefined;
            urls?: {
                unrestricted?: boolean | undefined;
                initialAllowed?: string[] | undefined;
            } | undefined;
        }, {
            paths?: {
                workspacePath?: string | undefined;
                unrestricted?: boolean | undefined;
                additionalDirectories?: string[] | undefined;
                includeTempDirectory?: boolean | undefined;
            } | undefined;
            rules?: {
                approved: readonly Rule[];
                denied: readonly Rule[];
            } | undefined;
            additionalContentExclusionPolicies?: 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">[] | undefined;
            approveAllToolPermissionRequests?: boolean | undefined;
            approveAllReadPermissionRequests?: boolean | undefined;
            urls?: {
                unrestricted?: boolean | undefined;
                initialAllowed?: string[] | undefined;
            } | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    handlePendingPermissionRequest: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            result: z_2.ZodDiscriminatedUnion<"kind", readonly [z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approve-once">;
            }, "strip", z_2.ZodTypeAny, {
                kind: "approve-once";
            }, {
                kind: "approve-once";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approve-for-session">;
                approval: z_2.ZodOptional<z_2.ZodDiscriminatedUnion<"kind", [z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"commands">;
                    commandIdentifiers: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodString, "many">>;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                }, {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"read">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "read";
                }, {
                    kind: "read";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"write">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "write";
                }, {
                    kind: "write";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"mcp">;
                    serverName: z_2.ZodString;
                    toolName: z_2.ZodNullable<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                }, {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"mcp-sampling">;
                    serverName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "mcp-sampling";
                    serverName: string;
                }, {
                    kind: "mcp-sampling";
                    serverName: string;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"memory">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "memory";
                }, {
                    kind: "memory";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"custom-tool">;
                    toolName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    toolName: string;
                    kind: "custom-tool";
                }, {
                    toolName: string;
                    kind: "custom-tool";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"extension-management">;
                    operation: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "extension-management";
                    operation?: string | undefined;
                }, {
                    kind: "extension-management";
                    operation?: string | undefined;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"extension-permission-access">;
                    extensionName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    extensionName: string;
                    kind: "extension-permission-access";
                }, {
                    extensionName: string;
                    kind: "extension-permission-access";
                }>]>>;
                domain: z_2.ZodOptional<z_2.ZodEffects<z_2.ZodString, string, string>>;
            }, "strip", z_2.ZodTypeAny, {
                kind: "approve-for-session";
                domain?: string | undefined;
                approval?: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                } | undefined;
            }, {
                kind: "approve-for-session";
                domain?: string | undefined;
                approval?: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                } | undefined;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approve-for-location">;
                approval: z_2.ZodDiscriminatedUnion<"kind", [z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"commands">;
                    commandIdentifiers: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodString, "many">>;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                }, {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"read">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "read";
                }, {
                    kind: "read";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"write">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "write";
                }, {
                    kind: "write";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"mcp">;
                    serverName: z_2.ZodString;
                    toolName: z_2.ZodNullable<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                }, {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"mcp-sampling">;
                    serverName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "mcp-sampling";
                    serverName: string;
                }, {
                    kind: "mcp-sampling";
                    serverName: string;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"memory">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "memory";
                }, {
                    kind: "memory";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"custom-tool">;
                    toolName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    toolName: string;
                    kind: "custom-tool";
                }, {
                    toolName: string;
                    kind: "custom-tool";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"extension-management">;
                    operation: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "extension-management";
                    operation?: string | undefined;
                }, {
                    kind: "extension-management";
                    operation?: string | undefined;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"extension-permission-access">;
                    extensionName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    extensionName: string;
                    kind: "extension-permission-access";
                }, {
                    extensionName: string;
                    kind: "extension-permission-access";
                }>]>;
                locationKey: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                kind: "approve-for-location";
                approval: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                };
                locationKey: string;
            }, {
                kind: "approve-for-location";
                approval: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                };
                locationKey: string;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approve-permanently">;
                domain: z_2.ZodEffects<z_2.ZodString, string, string>;
            }, "strip", z_2.ZodTypeAny, {
                domain: string;
                kind: "approve-permanently";
            }, {
                domain: string;
                kind: "approve-permanently";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"reject">;
                feedback: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                kind: "reject";
                feedback?: string | undefined;
            }, {
                kind: "reject";
                feedback?: string | undefined;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"user-not-available">;
            }, "strip", z_2.ZodTypeAny, {
                kind: "user-not-available";
            }, {
                kind: "user-not-available";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approved">;
            }, "strip", z_2.ZodTypeAny, {
                kind: "approved";
            }, {
                kind: "approved";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approved-for-session">;
                approval: z_2.ZodType<SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">, z_2.ZodTypeDef, SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">>;
            }, "strip", z_2.ZodTypeAny, {
                kind: "approved-for-session";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            }, {
                kind: "approved-for-session";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"approved-for-location">;
                approval: z_2.ZodType<SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">, z_2.ZodTypeDef, SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">>;
                locationKey: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                kind: "approved-for-location";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                locationKey: string;
            }, {
                kind: "approved-for-location";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                locationKey: string;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"cancelled">;
                reason: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                kind: "cancelled";
                reason?: string | undefined;
            }, {
                kind: "cancelled";
                reason?: string | undefined;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"denied-by-rules">;
                rules: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodType<Rule, z_2.ZodTypeDef, Rule>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                rules: readonly Rule[];
                kind: "denied-by-rules";
            }, {
                rules: readonly Rule[];
                kind: "denied-by-rules";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"denied-no-approval-rule-and-could-not-request-from-user">;
            }, "strip", z_2.ZodTypeAny, {
                kind: "denied-no-approval-rule-and-could-not-request-from-user";
            }, {
                kind: "denied-no-approval-rule-and-could-not-request-from-user";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"denied-interactively-by-user">;
                feedback: z_2.ZodOptional<z_2.ZodString>;
                forceReject: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                kind: "denied-interactively-by-user";
                feedback?: string | undefined;
                forceReject?: boolean | undefined;
            }, {
                kind: "denied-interactively-by-user";
                feedback?: string | undefined;
                forceReject?: boolean | undefined;
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"denied-by-content-exclusion-policy">;
                path: z_2.ZodString;
                message: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
                message: string;
                kind: "denied-by-content-exclusion-policy";
            }, {
                path: string;
                message: string;
                kind: "denied-by-content-exclusion-policy";
            }>, z_2.ZodObject<{
                kind: z_2.ZodLiteral<"denied-by-permission-request-hook">;
                message: z_2.ZodOptional<z_2.ZodString>;
                interrupt: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.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", z_2.ZodTypeAny, {
            result: {
                kind: "approve-once";
            } | {
                kind: "approve-for-session";
                domain?: string | undefined;
                approval?: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                } | undefined;
            } | {
                kind: "approve-for-location";
                approval: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                };
                locationKey: string;
            } | {
                domain: string;
                kind: "approve-permanently";
            } | {
                kind: "reject";
                feedback?: string | undefined;
            } | {
                kind: "user-not-available";
            } | {
                kind: "approved";
            } | {
                kind: "approved-for-session";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            } | {
                kind: "approved-for-location";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                locationKey: string;
            } | {
                kind: "cancelled";
                reason?: string | undefined;
            } | {
                rules: readonly Rule[];
                kind: "denied-by-rules";
            } | {
                kind: "denied-no-approval-rule-and-could-not-request-from-user";
            } | {
                kind: "denied-interactively-by-user";
                feedback?: string | undefined;
                forceReject?: boolean | undefined;
            } | {
                path: string;
                message: string;
                kind: "denied-by-content-exclusion-policy";
            } | {
                kind: "denied-by-permission-request-hook";
                message?: string | undefined;
                interrupt?: boolean | undefined;
            };
            requestId: string;
        }, {
            result: {
                kind: "approve-once";
            } | {
                kind: "approve-for-session";
                domain?: string | undefined;
                approval?: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                } | undefined;
            } | {
                kind: "approve-for-location";
                approval: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                };
                locationKey: string;
            } | {
                domain: string;
                kind: "approve-permanently";
            } | {
                kind: "reject";
                feedback?: string | undefined;
            } | {
                kind: "user-not-available";
            } | {
                kind: "approved";
            } | {
                kind: "approved-for-session";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
            } | {
                kind: "approved-for-location";
                approval: SessionApprovalFor<"memory" | "commands" | "read" | "write" | "mcp" | "custom-tool" | "extension-management" | "extension-permission-access">;
                locationKey: string;
            } | {
                kind: "cancelled";
                reason?: string | undefined;
            } | {
                rules: readonly Rule[];
                kind: "denied-by-rules";
            } | {
                kind: "denied-no-approval-rule-and-could-not-request-from-user";
            } | {
                kind: "denied-interactively-by-user";
                feedback?: string | undefined;
                forceReject?: boolean | undefined;
            } | {
                path: string;
                message: string;
                kind: "denied-by-content-exclusion-policy";
            } | {
                kind: "denied-by-permission-request-hook";
                message?: string | undefined;
                interrupt?: boolean | undefined;
            };
            requestId: string;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    pendingRequests: {
        description: string;
        params: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
        result: z_2.ZodObject<{
            items: z_2.ZodArray<z_2.ZodObject<{
                requestId: z_2.ZodString;
                request: z_2.ZodType<PermissionPromptRequest, z_2.ZodTypeDef, PermissionPromptRequest>;
            }, "strip", z_2.ZodTypeAny, {
                requestId: string;
                request: PermissionPromptRequest;
            }, {
                requestId: string;
                request: PermissionPromptRequest;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            items: {
                requestId: string;
                request: PermissionPromptRequest;
            }[];
        }, {
            items: {
                requestId: string;
                request: PermissionPromptRequest;
            }[];
        }>;
    };
    setApproveAll: {
        description: string;
        params: z_2.ZodObject<{
            enabled: z_2.ZodBoolean;
            source: z_2.ZodOptional<z_2.ZodEnum<["cli_flag", "slash_command", "autopilot_confirmation", "rpc"]>>;
        }, "strip", z_2.ZodTypeAny, {
            enabled: boolean;
            source?: "slash_command" | "cli_flag" | "autopilot_confirmation" | "rpc" | undefined;
        }, {
            enabled: boolean;
            source?: "slash_command" | "cli_flag" | "autopilot_confirmation" | "rpc" | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    setAllowAll: {
        description: string;
        params: z_2.ZodObject<{
            enabled: z_2.ZodBoolean;
            source: z_2.ZodOptional<z_2.ZodEnum<["cli_flag", "slash_command", "autopilot_confirmation", "rpc"]>>;
        }, "strip", z_2.ZodTypeAny, {
            enabled: boolean;
            source?: "slash_command" | "cli_flag" | "autopilot_confirmation" | "rpc" | undefined;
        }, {
            enabled: boolean;
            source?: "slash_command" | "cli_flag" | "autopilot_confirmation" | "rpc" | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
            enabled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            enabled: boolean;
            success: boolean;
        }, {
            enabled: boolean;
            success: boolean;
        }>;
    };
    getAllowAll: {
        description: string;
        params: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
        result: z_2.ZodObject<{
            enabled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            enabled: boolean;
        }, {
            enabled: boolean;
        }>;
    };
    modifyRules: {
        description: string;
        params: z_2.ZodObject<{
            scope: z_2.ZodEnum<["session", "location"]>;
            add: z_2.ZodOptional<z_2.ZodReadonly<z_2.ZodArray<z_2.ZodType<Rule, z_2.ZodTypeDef, Rule>, "many">>>;
            remove: z_2.ZodOptional<z_2.ZodReadonly<z_2.ZodArray<z_2.ZodType<Rule, z_2.ZodTypeDef, Rule>, "many">>>;
            removeAll: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            scope: "session" | "location";
            remove?: readonly Rule[] | undefined;
            add?: readonly Rule[] | undefined;
            removeAll?: boolean | undefined;
        }, {
            scope: "session" | "location";
            remove?: readonly Rule[] | undefined;
            add?: readonly Rule[] | undefined;
            removeAll?: boolean | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    setRequired: {
        description: string;
        params: z_2.ZodObject<{
            required: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            required: boolean;
        }, {
            required: boolean;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    resetSessionApprovals: {
        description: string;
        params: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    notifyPromptShown: {
        description: string;
        params: z_2.ZodObject<{
            message: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            message: string;
        }, {
            message: string;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    paths: {
        list: {
            description: string;
            params: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
            result: z_2.ZodObject<{
                directories: z_2.ZodArray<z_2.ZodString, "many">;
                primary: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                directories: string[];
                primary: string;
            }, {
                directories: string[];
                primary: string;
            }>;
        };
        add: {
            description: string;
            params: z_2.ZodObject<{
                path: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
            }, {
                path: string;
            }>;
            result: z_2.ZodObject<{
                success: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                success: boolean;
            }, {
                success: boolean;
            }>;
        };
        updatePrimary: {
            description: string;
            params: z_2.ZodObject<{
                path: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
            }, {
                path: string;
            }>;
            result: z_2.ZodObject<{
                success: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                success: boolean;
            }, {
                success: boolean;
            }>;
        };
        isPathWithinAllowedDirectories: {
            description: string;
            params: z_2.ZodObject<{
                path: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
            }, {
                path: string;
            }>;
            result: z_2.ZodObject<{
                allowed: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                allowed: boolean;
            }, {
                allowed: boolean;
            }>;
        };
        isPathWithinWorkspace: {
            description: string;
            params: z_2.ZodObject<{
                path: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
            }, {
                path: string;
            }>;
            result: z_2.ZodObject<{
                allowed: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                allowed: boolean;
            }, {
                allowed: boolean;
            }>;
        };
    };
    locations: {
        resolve: {
            description: string;
            params: z_2.ZodObject<{
                workingDirectory: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                workingDirectory: string;
            }, {
                workingDirectory: string;
            }>;
            result: z_2.ZodObject<{
                locationKey: z_2.ZodString;
                locationType: z_2.ZodEnum<["repo", "dir"]>;
            }, "strip", z_2.ZodTypeAny, {
                locationKey: string;
                locationType: "dir" | "repo";
            }, {
                locationKey: string;
                locationType: "dir" | "repo";
            }>;
        };
        apply: {
            description: string;
            params: z_2.ZodObject<{
                workingDirectory: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                workingDirectory: string;
            }, {
                workingDirectory: string;
            }>;
            result: z_2.ZodObject<{
                locationKey: z_2.ZodString;
                locationType: z_2.ZodEnum<["repo", "dir"]>;
                changed: z_2.ZodBoolean;
                appliedRuleCount: z_2.ZodNumber;
                appliedDirectoryCount: z_2.ZodNumber;
                appliedRules: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodType<Rule, z_2.ZodTypeDef, Rule>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                locationKey: string;
                changed: boolean;
                locationType: "dir" | "repo";
                appliedRuleCount: number;
                appliedDirectoryCount: number;
                appliedRules: readonly Rule[];
            }, {
                locationKey: string;
                changed: boolean;
                locationType: "dir" | "repo";
                appliedRuleCount: number;
                appliedDirectoryCount: number;
                appliedRules: readonly Rule[];
            }>;
        };
        addToolApproval: {
            description: string;
            params: z_2.ZodObject<{
                locationKey: z_2.ZodString;
                approval: z_2.ZodDiscriminatedUnion<"kind", [z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"commands">;
                    commandIdentifiers: z_2.ZodReadonly<z_2.ZodArray<z_2.ZodString, "many">>;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                }, {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"read">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "read";
                }, {
                    kind: "read";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"write">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "write";
                }, {
                    kind: "write";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"mcp">;
                    serverName: z_2.ZodString;
                    toolName: z_2.ZodNullable<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                }, {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"mcp-sampling">;
                    serverName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "mcp-sampling";
                    serverName: string;
                }, {
                    kind: "mcp-sampling";
                    serverName: string;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"memory">;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "memory";
                }, {
                    kind: "memory";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"custom-tool">;
                    toolName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    toolName: string;
                    kind: "custom-tool";
                }, {
                    toolName: string;
                    kind: "custom-tool";
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"extension-management">;
                    operation: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    kind: "extension-management";
                    operation?: string | undefined;
                }, {
                    kind: "extension-management";
                    operation?: string | undefined;
                }>, z_2.ZodObject<{
                    kind: z_2.ZodLiteral<"extension-permission-access">;
                    extensionName: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    extensionName: string;
                    kind: "extension-permission-access";
                }, {
                    extensionName: string;
                    kind: "extension-permission-access";
                }>]>;
            }, "strip", z_2.ZodTypeAny, {
                approval: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                };
                locationKey: string;
            }, {
                approval: {
                    kind: "commands";
                    commandIdentifiers: readonly string[];
                } | {
                    kind: "read";
                } | {
                    kind: "write";
                } | {
                    toolName: string | null;
                    kind: "mcp";
                    serverName: string;
                } | {
                    kind: "mcp-sampling";
                    serverName: string;
                } | {
                    kind: "memory";
                } | {
                    toolName: string;
                    kind: "custom-tool";
                } | {
                    kind: "extension-management";
                    operation?: string | undefined;
                } | {
                    extensionName: string;
                    kind: "extension-permission-access";
                };
                locationKey: string;
            }>;
            result: z_2.ZodObject<{
                success: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                success: boolean;
            }, {
                success: boolean;
            }>;
        };
    };
    folderTrust: {
        isTrusted: {
            description: string;
            params: z_2.ZodObject<{
                path: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
            }, {
                path: string;
            }>;
            result: z_2.ZodObject<{
                trusted: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                trusted: boolean;
            }, {
                trusted: boolean;
            }>;
        };
        addTrusted: {
            description: string;
            params: z_2.ZodObject<{
                path: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
            }, {
                path: string;
            }>;
            result: z_2.ZodObject<{
                success: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                success: boolean;
            }, {
                success: boolean;
            }>;
        };
    };
    urls: {
        setUnrestrictedMode: {
            description: string;
            params: z_2.ZodObject<{
                enabled: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                enabled: boolean;
            }, {
                enabled: boolean;
            }>;
            result: z_2.ZodObject<{
                success: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                success: boolean;
            }, {
                success: boolean;
            }>;
        };
    };
};

export declare type SessionPermissionsChangedEvent = z.infer<typeof SessionPermissionsChangedEventSchema>;

/**
 * Aggregate allow-all permission state transition for the session.
 *
 * Emitted when the session's aggregate allow-all flag transitions (e.g. via the
 * `/allow-all` slash command, the `session.permissions.setAllowAll` shared-API
 * RPC, or any internal caller of `Session.setAllowAllPermissions`). Mirrors the
 * shape of `session.model_change` and `session.mode_changed` so consumers can
 * subscribe to a single canonical event for permission-state transitions.
 */
declare const SessionPermissionsChangedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.permissions_changed">;
    data: z.ZodObject<{
        previousAllowAllPermissions: z.ZodBoolean;
        allowAllPermissions: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    }, {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.permissions_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.permissions_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        previousAllowAllPermissions: boolean;
        allowAllPermissions: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionPlanApi = ApiSchemaToInterface<typeof sessionPlanApiSchema>;

declare const sessionPlanApiSchema: {
    read: {
        description: string;
        result: z_2.ZodObject<{
            exists: z_2.ZodBoolean;
            content: z_2.ZodNullable<z_2.ZodString>;
            path: z_2.ZodNullable<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            path: string | null;
            content: string | null;
            exists: boolean;
        }, {
            path: string | null;
            content: string | null;
            exists: boolean;
        }>;
    };
    update: {
        description: string;
        params: z_2.ZodObject<{
            content: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            content: string;
        }, {
            content: string;
        }>;
    };
    delete: {
        description: string;
    };
    readSqlTodos: {
        description: string;
        result: z_2.ZodObject<{
            rows: z_2.ZodArray<z_2.ZodObject<{
                id: z_2.ZodOptional<z_2.ZodString>;
                title: z_2.ZodOptional<z_2.ZodString>;
                description: z_2.ZodOptional<z_2.ZodString>;
                status: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                status?: string | undefined;
                description?: string | undefined;
                title?: string | undefined;
                id?: string | undefined;
            }, {
                status?: string | undefined;
                description?: string | undefined;
                title?: string | undefined;
                id?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            rows: {
                status?: string | undefined;
                description?: string | undefined;
                title?: string | undefined;
                id?: string | undefined;
            }[];
        }, {
            rows: {
                status?: string | undefined;
                description?: string | undefined;
                title?: string | undefined;
                id?: string | undefined;
            }[];
        }>;
    };
};

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.plan_changed">;
    data: z.ZodObject<{
        operation: z.ZodEnum<["create", "update", "delete"]>;
    }, "strip", z.ZodTypeAny, {
        operation: "create" | "update" | "delete";
    }, {
        operation: "create" | "update" | "delete";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.plan_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.plan_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        operation: "create" | "update" | "delete";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionPluginsApi = ApiSchemaToInterface<typeof sessionPluginsApiSchema>;

declare const sessionPluginsApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            plugins: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                marketplace: z_2.ZodString;
                version: z_2.ZodOptional<z_2.ZodString>;
                enabled: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                marketplace: string;
                enabled: boolean;
                version?: string | undefined;
            }, {
                name: string;
                marketplace: string;
                enabled: boolean;
                version?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            plugins: {
                name: string;
                marketplace: string;
                enabled: boolean;
                version?: string | undefined;
            }[];
        }, {
            plugins: {
                name: string;
                marketplace: string;
                enabled: boolean;
                version?: string | undefined;
            }[];
        }>;
    };
    reload: {
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            reloadMcp: z_2.ZodOptional<z_2.ZodBoolean>;
            reloadCustomAgents: z_2.ZodOptional<z_2.ZodBoolean>;
            reloadHooks: z_2.ZodOptional<z_2.ZodBoolean>;
            deferRepoHooks: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            reloadCustomAgents?: boolean | undefined;
            reloadMcp?: boolean | undefined;
            reloadHooks?: boolean | undefined;
            deferRepoHooks?: boolean | undefined;
        }, {
            reloadCustomAgents?: boolean | undefined;
            reloadMcp?: boolean | undefined;
            reloadHooks?: boolean | undefined;
            deferRepoHooks?: boolean | undefined;
        }>>;
    };
};

declare type SessionQueueApi = ApiSchemaToInterface<typeof sessionQueueApiSchema>;

declare const sessionQueueApiSchema: {
    pendingItems: {
        description: string;
        result: z_2.ZodObject<{
            items: z_2.ZodArray<z_2.ZodObject<{
                kind: z_2.ZodEnum<["message", "command"]>;
                displayText: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                kind: "message" | "command";
                displayText: string;
            }, {
                kind: "message" | "command";
                displayText: string;
            }>, "many">;
            steeringMessages: z_2.ZodArray<z_2.ZodString, "many">;
        }, "strip", z_2.ZodTypeAny, {
            items: {
                kind: "message" | "command";
                displayText: string;
            }[];
            steeringMessages: string[];
        }, {
            items: {
                kind: "message" | "command";
                displayText: string;
            }[];
            steeringMessages: string[];
        }>;
    };
    removeMostRecent: {
        description: string;
        result: z_2.ZodObject<{
            removed: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            removed: boolean;
        }, {
            removed: boolean;
        }>;
    };
    clear: {
        description: string;
    };
};

declare type SessionRemoteApi = ApiSchemaToInterface<typeof sessionRemoteApiSchema>;

declare const sessionRemoteApiSchema: {
    enable: {
        description: string;
        params: z_2.ZodObject<{
            mode: z_2.ZodOptional<z_2.ZodEnum<["off", "export", "on"]>>;
        }, "strip", z_2.ZodTypeAny, {
            mode?: "on" | "off" | "export" | undefined;
        }, {
            mode?: "on" | "off" | "export" | undefined;
        }>;
        result: z_2.ZodObject<{
            url: z_2.ZodOptional<z_2.ZodString>;
            remoteSteerable: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            remoteSteerable: boolean;
            url?: string | undefined;
        }, {
            remoteSteerable: boolean;
            url?: string | undefined;
        }>;
    };
    disable: {
        description: string;
    };
    notifySteerableChanged: {
        description: string;
        params: z_2.ZodObject<{
            remoteSteerable: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            remoteSteerable: boolean;
        }, {
            remoteSteerable: boolean;
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
};

declare interface SessionRemoteDelegate {
    enable(mode?: "off" | "export" | "on"): Promise<{
        url?: string;
        remoteSteerable: boolean;
    }>;
    disable(): Promise<void>;
}

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.remote_steerable_changed">;
    data: z.ZodObject<{
        remoteSteerable: z.ZodBoolean;
    }, "strip", z.ZodTypeAny, {
        remoteSteerable: boolean;
    }, {
        remoteSteerable: boolean;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.remote_steerable_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        remoteSteerable: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.remote_steerable_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        remoteSteerable: boolean;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.resume">;
    data: z.ZodObject<{
        resumeTime: z.ZodString;
        eventCount: z.ZodNumber;
        eventsFileSizeBytes: z.ZodOptional<z.ZodNumber>;
        selectedModel: z.ZodOptional<z.ZodString>;
        reasoningEffort: z.ZodOptional<z.ZodString>;
        reasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        contextTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<["default", "long_context"]>>>;
        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"]>>;
            repositoryHost: z.ZodOptional<z.ZodString>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        sessionWasActive: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
        continuePendingWork: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    }, {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.resume";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.resume";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        resumeTime: string;
        eventCount: number;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        eventsFileSizeBytes?: number | undefined;
        sessionWasActive?: boolean | undefined;
        continuePendingWork?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

/**
 * Metadata for a session row.
 */
declare interface SessionRow {
    id: string;
    cwd?: string;
    repository?: string;
    host_type?: "github" | "ado";
    branch?: string;
    summary?: string;
    created_at?: string;
    updated_at?: string;
}

declare type SessionsApi = ApiSchemaToInterface<typeof sessionsApiSchema>;

declare const sessionsApiSchema: {
    open: {
        description: string;
        params: z_2.ZodDiscriminatedUnion<"kind", [z_2.ZodObject<{
            kind: z_2.ZodLiteral<"create">;
            options: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
                reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                clientKind: z_2.ZodOptional<z_2.ZodString>;
                lspClientName: z_2.ZodOptional<z_2.ZodString>;
                integrationId: z_2.ZodOptional<z_2.ZodString>;
                featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
                isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
                authInfo: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
                provider: z_2.ZodOptional<z_2.ZodObject<{
                    type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                    wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                    baseUrl: z_2.ZodString;
                    apiKey: z_2.ZodOptional<z_2.ZodString>;
                    bearerToken: z_2.ZodOptional<z_2.ZodString>;
                    azure: z_2.ZodOptional<z_2.ZodObject<{
                        apiVersion: z_2.ZodOptional<z_2.ZodString>;
                    }, "strip", z_2.ZodTypeAny, {
                        apiVersion?: string | undefined;
                    }, {
                        apiVersion?: string | undefined;
                    }>>;
                    modelId: z_2.ZodOptional<z_2.ZodString>;
                    wireModel: z_2.ZodOptional<z_2.ZodString>;
                    maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
                }, "strip", z_2.ZodTypeAny, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }>>;
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                workingDirectoryContext: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteExporting: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteDefaultedOn: z_2.ZodOptional<z_2.ZodBoolean>;
                detachedFromSpawningParentSessionId: z_2.ZodOptional<z_2.ZodString>;
                detachedFromSpawningParentEngagementId: z_2.ZodOptional<z_2.ZodString>;
                availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
                shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
                shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                    enabled: z_2.ZodBoolean;
                    userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                        filesystem: z_2.ZodOptional<z_2.ZodObject<{
                            readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                            allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "strip", z_2.ZodTypeAny, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }>>;
                        experimental: z_2.ZodOptional<z_2.ZodObject<{
                            seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                                keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                            }, "strip", z_2.ZodTypeAny, {
                                keychainAccess?: boolean | undefined;
                            }, {
                                keychainAccess?: boolean | undefined;
                            }>>;
                        }, "strip", z_2.ZodTypeAny, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }>>;
                    config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                    addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }>>;
                logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
                envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
                skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    marketplace: z_2.ZodString;
                    version: z_2.ZodOptional<z_2.ZodString>;
                    installed_at: z_2.ZodString;
                    enabled: z_2.ZodBoolean;
                    cache_path: z_2.ZodOptional<z_2.ZodString>;
                    source: z_2.ZodOptional<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";
                    }>]>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }>, "many">>;
                customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
                skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
                disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
                trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
                enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
                copilotUrl: z_2.ZodOptional<z_2.ZodString>;
                askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
                runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
                enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
                modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                    supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                        reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    }, "strip", z_2.ZodTypeAny, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }>>>;
                    limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                            supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                            max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                        }, "strip", z_2.ZodTypeAny, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }>>>;
                    }, "strip", z_2.ZodTypeAny, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }>>;
                agentContext: z_2.ZodOptional<z_2.ZodString>;
                eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
                configDir: z_2.ZodOptional<z_2.ZodString>;
                additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
                sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }>>;
            emitStart: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            kind: "create";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            emitStart?: boolean | undefined;
        }, {
            kind: "create";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            emitStart?: boolean | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"resume">;
            sessionId: z_2.ZodString;
            options: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
                reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                clientKind: z_2.ZodOptional<z_2.ZodString>;
                lspClientName: z_2.ZodOptional<z_2.ZodString>;
                integrationId: z_2.ZodOptional<z_2.ZodString>;
                featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
                isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
                authInfo: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
                provider: z_2.ZodOptional<z_2.ZodObject<{
                    type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                    wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                    baseUrl: z_2.ZodString;
                    apiKey: z_2.ZodOptional<z_2.ZodString>;
                    bearerToken: z_2.ZodOptional<z_2.ZodString>;
                    azure: z_2.ZodOptional<z_2.ZodObject<{
                        apiVersion: z_2.ZodOptional<z_2.ZodString>;
                    }, "strip", z_2.ZodTypeAny, {
                        apiVersion?: string | undefined;
                    }, {
                        apiVersion?: string | undefined;
                    }>>;
                    modelId: z_2.ZodOptional<z_2.ZodString>;
                    wireModel: z_2.ZodOptional<z_2.ZodString>;
                    maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
                }, "strip", z_2.ZodTypeAny, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }>>;
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                workingDirectoryContext: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteExporting: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteDefaultedOn: z_2.ZodOptional<z_2.ZodBoolean>;
                detachedFromSpawningParentSessionId: z_2.ZodOptional<z_2.ZodString>;
                detachedFromSpawningParentEngagementId: z_2.ZodOptional<z_2.ZodString>;
                availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
                shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
                shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                    enabled: z_2.ZodBoolean;
                    userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                        filesystem: z_2.ZodOptional<z_2.ZodObject<{
                            readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                            allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "strip", z_2.ZodTypeAny, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }>>;
                        experimental: z_2.ZodOptional<z_2.ZodObject<{
                            seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                                keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                            }, "strip", z_2.ZodTypeAny, {
                                keychainAccess?: boolean | undefined;
                            }, {
                                keychainAccess?: boolean | undefined;
                            }>>;
                        }, "strip", z_2.ZodTypeAny, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }>>;
                    config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                    addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }>>;
                logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
                envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
                skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    marketplace: z_2.ZodString;
                    version: z_2.ZodOptional<z_2.ZodString>;
                    installed_at: z_2.ZodString;
                    enabled: z_2.ZodBoolean;
                    cache_path: z_2.ZodOptional<z_2.ZodString>;
                    source: z_2.ZodOptional<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";
                    }>]>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }>, "many">>;
                customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
                skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
                disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
                trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
                enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
                copilotUrl: z_2.ZodOptional<z_2.ZodString>;
                askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
                runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
                enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
                modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                    supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                        reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    }, "strip", z_2.ZodTypeAny, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }>>>;
                    limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                            supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                            max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                        }, "strip", z_2.ZodTypeAny, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }>>>;
                    }, "strip", z_2.ZodTypeAny, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }>>;
                agentContext: z_2.ZodOptional<z_2.ZodString>;
                eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
                configDir: z_2.ZodOptional<z_2.ZodString>;
                additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
                sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }>>;
            resume: z_2.ZodOptional<z_2.ZodBoolean>;
            suppressResumeWorkspaceMetadataWriteback: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            kind: "resume";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            resume?: boolean | undefined;
            suppressResumeWorkspaceMetadataWriteback?: boolean | undefined;
        }, {
            sessionId: string;
            kind: "resume";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            resume?: boolean | undefined;
            suppressResumeWorkspaceMetadataWriteback?: boolean | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"resumeLast">;
            context: z_2.ZodOptional<z_2.ZodObject<{
                cwd: z_2.ZodString;
                gitRoot: z_2.ZodOptional<z_2.ZodString>;
                repository: z_2.ZodOptional<z_2.ZodString>;
                hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                branch: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            }, {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            }>>;
            options: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
                reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                clientKind: z_2.ZodOptional<z_2.ZodString>;
                lspClientName: z_2.ZodOptional<z_2.ZodString>;
                integrationId: z_2.ZodOptional<z_2.ZodString>;
                featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
                isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
                authInfo: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
                provider: z_2.ZodOptional<z_2.ZodObject<{
                    type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                    wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                    baseUrl: z_2.ZodString;
                    apiKey: z_2.ZodOptional<z_2.ZodString>;
                    bearerToken: z_2.ZodOptional<z_2.ZodString>;
                    azure: z_2.ZodOptional<z_2.ZodObject<{
                        apiVersion: z_2.ZodOptional<z_2.ZodString>;
                    }, "strip", z_2.ZodTypeAny, {
                        apiVersion?: string | undefined;
                    }, {
                        apiVersion?: string | undefined;
                    }>>;
                    modelId: z_2.ZodOptional<z_2.ZodString>;
                    wireModel: z_2.ZodOptional<z_2.ZodString>;
                    maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
                }, "strip", z_2.ZodTypeAny, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }>>;
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                workingDirectoryContext: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteExporting: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteDefaultedOn: z_2.ZodOptional<z_2.ZodBoolean>;
                detachedFromSpawningParentSessionId: z_2.ZodOptional<z_2.ZodString>;
                detachedFromSpawningParentEngagementId: z_2.ZodOptional<z_2.ZodString>;
                availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
                shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
                shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                    enabled: z_2.ZodBoolean;
                    userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                        filesystem: z_2.ZodOptional<z_2.ZodObject<{
                            readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                            allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "strip", z_2.ZodTypeAny, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }>>;
                        experimental: z_2.ZodOptional<z_2.ZodObject<{
                            seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                                keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                            }, "strip", z_2.ZodTypeAny, {
                                keychainAccess?: boolean | undefined;
                            }, {
                                keychainAccess?: boolean | undefined;
                            }>>;
                        }, "strip", z_2.ZodTypeAny, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }>>;
                    config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                    addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }>>;
                logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
                envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
                skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    marketplace: z_2.ZodString;
                    version: z_2.ZodOptional<z_2.ZodString>;
                    installed_at: z_2.ZodString;
                    enabled: z_2.ZodBoolean;
                    cache_path: z_2.ZodOptional<z_2.ZodString>;
                    source: z_2.ZodOptional<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";
                    }>]>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }>, "many">>;
                customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
                skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
                disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
                trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
                enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
                copilotUrl: z_2.ZodOptional<z_2.ZodString>;
                askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
                runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
                enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
                modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                    supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                        reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    }, "strip", z_2.ZodTypeAny, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }>>>;
                    limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                            supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                            max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                        }, "strip", z_2.ZodTypeAny, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }>>>;
                    }, "strip", z_2.ZodTypeAny, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }>>;
                agentContext: z_2.ZodOptional<z_2.ZodString>;
                eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
                configDir: z_2.ZodOptional<z_2.ZodString>;
                additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
                sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }>>;
            suppressResumeWorkspaceMetadataWriteback: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            kind: "resumeLast";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            context?: {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            } | undefined;
            suppressResumeWorkspaceMetadataWriteback?: boolean | undefined;
        }, {
            kind: "resumeLast";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            context?: {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            } | undefined;
            suppressResumeWorkspaceMetadataWriteback?: boolean | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"attach">;
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            kind: "attach";
        }, {
            sessionId: string;
            kind: "attach";
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"remote">;
            remoteSessionId: z_2.ZodString;
            repository: z_2.ZodOptional<z_2.ZodObject<{
                owner: z_2.ZodString;
                name: z_2.ZodString;
                branch: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                owner: string;
                branch?: string | undefined;
            }, {
                name: string;
                owner: string;
                branch?: string | undefined;
            }>>;
            options: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
                reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                clientKind: z_2.ZodOptional<z_2.ZodString>;
                lspClientName: z_2.ZodOptional<z_2.ZodString>;
                integrationId: z_2.ZodOptional<z_2.ZodString>;
                featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
                isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
                authInfo: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
                provider: z_2.ZodOptional<z_2.ZodObject<{
                    type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                    wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                    baseUrl: z_2.ZodString;
                    apiKey: z_2.ZodOptional<z_2.ZodString>;
                    bearerToken: z_2.ZodOptional<z_2.ZodString>;
                    azure: z_2.ZodOptional<z_2.ZodObject<{
                        apiVersion: z_2.ZodOptional<z_2.ZodString>;
                    }, "strip", z_2.ZodTypeAny, {
                        apiVersion?: string | undefined;
                    }, {
                        apiVersion?: string | undefined;
                    }>>;
                    modelId: z_2.ZodOptional<z_2.ZodString>;
                    wireModel: z_2.ZodOptional<z_2.ZodString>;
                    maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
                }, "strip", z_2.ZodTypeAny, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }>>;
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                workingDirectoryContext: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteExporting: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteDefaultedOn: z_2.ZodOptional<z_2.ZodBoolean>;
                detachedFromSpawningParentSessionId: z_2.ZodOptional<z_2.ZodString>;
                detachedFromSpawningParentEngagementId: z_2.ZodOptional<z_2.ZodString>;
                availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
                shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
                shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                    enabled: z_2.ZodBoolean;
                    userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                        filesystem: z_2.ZodOptional<z_2.ZodObject<{
                            readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                            allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "strip", z_2.ZodTypeAny, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }>>;
                        experimental: z_2.ZodOptional<z_2.ZodObject<{
                            seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                                keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                            }, "strip", z_2.ZodTypeAny, {
                                keychainAccess?: boolean | undefined;
                            }, {
                                keychainAccess?: boolean | undefined;
                            }>>;
                        }, "strip", z_2.ZodTypeAny, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }>>;
                    config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                    addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }>>;
                logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
                envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
                skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    marketplace: z_2.ZodString;
                    version: z_2.ZodOptional<z_2.ZodString>;
                    installed_at: z_2.ZodString;
                    enabled: z_2.ZodBoolean;
                    cache_path: z_2.ZodOptional<z_2.ZodString>;
                    source: z_2.ZodOptional<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";
                    }>]>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }>, "many">>;
                customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
                skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
                disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
                trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
                enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
                copilotUrl: z_2.ZodOptional<z_2.ZodString>;
                askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
                runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
                enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
                modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                    supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                        reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    }, "strip", z_2.ZodTypeAny, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }>>>;
                    limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                            supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                            max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                        }, "strip", z_2.ZodTypeAny, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }>>>;
                    }, "strip", z_2.ZodTypeAny, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }>>;
                agentContext: z_2.ZodOptional<z_2.ZodString>;
                eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
                configDir: z_2.ZodOptional<z_2.ZodString>;
                additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
                sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            remoteSessionId: string;
            kind: "remote";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            repository?: {
                name: string;
                owner: string;
                branch?: string | undefined;
            } | undefined;
        }, {
            remoteSessionId: string;
            kind: "remote";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            repository?: {
                name: string;
                owner: string;
                branch?: string | undefined;
            } | undefined;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"cloud">;
            repository: z_2.ZodOptional<z_2.ZodObject<{
                owner: z_2.ZodString;
                name: z_2.ZodString;
                branch: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                owner: string;
                branch?: string | undefined;
            }, {
                name: string;
                owner: string;
                branch?: string | undefined;
            }>>;
            owner: z_2.ZodOptional<z_2.ZodString>;
            options: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
                reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                clientKind: z_2.ZodOptional<z_2.ZodString>;
                lspClientName: z_2.ZodOptional<z_2.ZodString>;
                integrationId: z_2.ZodOptional<z_2.ZodString>;
                featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
                isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
                authInfo: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
                provider: z_2.ZodOptional<z_2.ZodObject<{
                    type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                    wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                    baseUrl: z_2.ZodString;
                    apiKey: z_2.ZodOptional<z_2.ZodString>;
                    bearerToken: z_2.ZodOptional<z_2.ZodString>;
                    azure: z_2.ZodOptional<z_2.ZodObject<{
                        apiVersion: z_2.ZodOptional<z_2.ZodString>;
                    }, "strip", z_2.ZodTypeAny, {
                        apiVersion?: string | undefined;
                    }, {
                        apiVersion?: string | undefined;
                    }>>;
                    modelId: z_2.ZodOptional<z_2.ZodString>;
                    wireModel: z_2.ZodOptional<z_2.ZodString>;
                    maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
                }, "strip", z_2.ZodTypeAny, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }>>;
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                workingDirectoryContext: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteExporting: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteDefaultedOn: z_2.ZodOptional<z_2.ZodBoolean>;
                detachedFromSpawningParentSessionId: z_2.ZodOptional<z_2.ZodString>;
                detachedFromSpawningParentEngagementId: z_2.ZodOptional<z_2.ZodString>;
                availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
                shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
                shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                    enabled: z_2.ZodBoolean;
                    userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                        filesystem: z_2.ZodOptional<z_2.ZodObject<{
                            readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                            allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "strip", z_2.ZodTypeAny, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }>>;
                        experimental: z_2.ZodOptional<z_2.ZodObject<{
                            seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                                keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                            }, "strip", z_2.ZodTypeAny, {
                                keychainAccess?: boolean | undefined;
                            }, {
                                keychainAccess?: boolean | undefined;
                            }>>;
                        }, "strip", z_2.ZodTypeAny, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }>>;
                    config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                    addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }>>;
                logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
                envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
                skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    marketplace: z_2.ZodString;
                    version: z_2.ZodOptional<z_2.ZodString>;
                    installed_at: z_2.ZodString;
                    enabled: z_2.ZodBoolean;
                    cache_path: z_2.ZodOptional<z_2.ZodString>;
                    source: z_2.ZodOptional<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";
                    }>]>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }>, "many">>;
                customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
                skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
                disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
                trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
                enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
                copilotUrl: z_2.ZodOptional<z_2.ZodString>;
                askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
                runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
                enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
                modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                    supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                        reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    }, "strip", z_2.ZodTypeAny, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }>>>;
                    limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                            supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                            max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                        }, "strip", z_2.ZodTypeAny, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }>>>;
                    }, "strip", z_2.ZodTypeAny, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }>>;
                agentContext: z_2.ZodOptional<z_2.ZodString>;
                eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
                configDir: z_2.ZodOptional<z_2.ZodString>;
                additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
                sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }>>;
            onTaskCreated: z_2.ZodOptional<z_2.ZodUnknown>;
        }, "strip", z_2.ZodTypeAny, {
            kind: "cloud";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            repository?: {
                name: string;
                owner: string;
                branch?: string | undefined;
            } | undefined;
            owner?: string | undefined;
            onTaskCreated?: unknown;
        }, {
            kind: "cloud";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            repository?: {
                name: string;
                owner: string;
                branch?: string | undefined;
            } | undefined;
            owner?: string | undefined;
            onTaskCreated?: unknown;
        }>, z_2.ZodObject<{
            kind: z_2.ZodLiteral<"handoff">;
            metadata: z_2.ZodObject<{
                sessionId: z_2.ZodString;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                summary: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                isRemote: z_2.ZodLiteral<true>;
                context: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                repository: z_2.ZodObject<{
                    owner: z_2.ZodString;
                    name: z_2.ZodString;
                    branch: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    owner: string;
                    branch: string;
                }, {
                    name: string;
                    owner: string;
                    branch: string;
                }>;
                remoteSessionIds: z_2.ZodArray<z_2.ZodString, "many">;
                pullRequestNumber: z_2.ZodOptional<z_2.ZodNumber>;
                resourceId: z_2.ZodOptional<z_2.ZodString>;
                taskType: z_2.ZodOptional<z_2.ZodEnum<["cca", "cli"]>>;
                staleAt: z_2.ZodOptional<z_2.ZodString>;
                state: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            }, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            }>;
            options: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                reasoningEffort: z_2.ZodOptional<z_2.ZodString>;
                reasoningSummary: z_2.ZodOptional<z_2.ZodEnum<["none", "concise", "detailed"]>>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                clientKind: z_2.ZodOptional<z_2.ZodString>;
                lspClientName: z_2.ZodOptional<z_2.ZodString>;
                integrationId: z_2.ZodOptional<z_2.ZodString>;
                featureFlags: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodBoolean>>;
                isExperimentalMode: z_2.ZodOptional<z_2.ZodBoolean>;
                authInfo: z_2.ZodOptional<z_2.ZodType<AuthInfo, z_2.ZodTypeDef, AuthInfo>>;
                provider: z_2.ZodOptional<z_2.ZodObject<{
                    type: z_2.ZodOptional<z_2.ZodEnum<["anthropic" | "openai" | "azure", ...("anthropic" | "openai" | "azure")[]]>>;
                    wireApi: z_2.ZodOptional<z_2.ZodEnum<["completions" | "responses", ...("completions" | "responses")[]]>>;
                    baseUrl: z_2.ZodString;
                    apiKey: z_2.ZodOptional<z_2.ZodString>;
                    bearerToken: z_2.ZodOptional<z_2.ZodString>;
                    azure: z_2.ZodOptional<z_2.ZodObject<{
                        apiVersion: z_2.ZodOptional<z_2.ZodString>;
                    }, "strip", z_2.ZodTypeAny, {
                        apiVersion?: string | undefined;
                    }, {
                        apiVersion?: string | undefined;
                    }>>;
                    modelId: z_2.ZodOptional<z_2.ZodString>;
                    wireModel: z_2.ZodOptional<z_2.ZodString>;
                    maxPromptTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxContextWindowTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    maxOutputTokens: z_2.ZodOptional<z_2.ZodNumber>;
                    headers: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodString>>;
                }, "strip", z_2.ZodTypeAny, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }, {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                }>>;
                workingDirectory: z_2.ZodOptional<z_2.ZodString>;
                workingDirectoryContext: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteExporting: z_2.ZodOptional<z_2.ZodBoolean>;
                remoteDefaultedOn: z_2.ZodOptional<z_2.ZodBoolean>;
                detachedFromSpawningParentSessionId: z_2.ZodOptional<z_2.ZodString>;
                detachedFromSpawningParentEngagementId: z_2.ZodOptional<z_2.ZodString>;
                availableTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                excludedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                enableScriptSafety: z_2.ZodOptional<z_2.ZodBoolean>;
                shellInitProfile: z_2.ZodOptional<z_2.ZodString>;
                shellProcessFlags: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                sandboxConfig: z_2.ZodOptional<z_2.ZodObject<{
                    enabled: z_2.ZodBoolean;
                    userPolicy: z_2.ZodOptional<z_2.ZodObject<{
                        filesystem: z_2.ZodOptional<z_2.ZodObject<{
                            readwritePaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            readonlyPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            deniedPaths: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            clearPolicyOnExit: z_2.ZodOptional<z_2.ZodBoolean>;
                        }, "strip", z_2.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_2.ZodOptional<z_2.ZodObject<{
                            allowOutbound: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowLocalNetwork: z_2.ZodOptional<z_2.ZodBoolean>;
                            allowedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            blockedHosts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        }, "strip", z_2.ZodTypeAny, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }, {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        }>>;
                        experimental: z_2.ZodOptional<z_2.ZodObject<{
                            seatbelt: z_2.ZodOptional<z_2.ZodObject<{
                                keychainAccess: z_2.ZodOptional<z_2.ZodBoolean>;
                            }, "strip", z_2.ZodTypeAny, {
                                keychainAccess?: boolean | undefined;
                            }, {
                                keychainAccess?: boolean | undefined;
                            }>>;
                        }, "strip", z_2.ZodTypeAny, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }, {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        }>>;
                    }, "strip", z_2.ZodTypeAny, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }, {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    }>>;
                    config: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                    addCurrentWorkingDirectory: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }, {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                }>>;
                logInteractiveShells: z_2.ZodOptional<z_2.ZodBoolean>;
                envValueMode: z_2.ZodOptional<z_2.ZodEnum<["direct", "indirect"]>>;
                skillDirectories: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                disabledSkills: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                installedPlugins: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    name: z_2.ZodString;
                    marketplace: z_2.ZodString;
                    version: z_2.ZodOptional<z_2.ZodString>;
                    installed_at: z_2.ZodString;
                    enabled: z_2.ZodBoolean;
                    cache_path: z_2.ZodOptional<z_2.ZodString>;
                    source: z_2.ZodOptional<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";
                    }>]>>;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }, {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }>, "many">>;
                customAgentsLocalOnly: z_2.ZodOptional<z_2.ZodBoolean>;
                skipCustomInstructions: z_2.ZodOptional<z_2.ZodBoolean>;
                disabledInstructionSources: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                coauthorEnabled: z_2.ZodOptional<z_2.ZodBoolean>;
                trajectoryFile: z_2.ZodOptional<z_2.ZodString>;
                enableStreaming: z_2.ZodOptional<z_2.ZodBoolean>;
                copilotUrl: z_2.ZodOptional<z_2.ZodString>;
                askUserDisabled: z_2.ZodOptional<z_2.ZodBoolean>;
                continueOnAutoMode: z_2.ZodOptional<z_2.ZodBoolean>;
                runningInInteractiveMode: z_2.ZodOptional<z_2.ZodBoolean>;
                enableOnDemandInstructionDiscovery: z_2.ZodOptional<z_2.ZodBoolean>;
                modelCapabilitiesOverrides: z_2.ZodOptional<z_2.ZodObject<{
                    supports: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                        reasoningEffort: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodBoolean>>;
                    }, "strip", z_2.ZodTypeAny, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }, {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    }>>>;
                    limits: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                        max_prompt_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_output_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        max_context_window_tokens: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodNumber>>;
                        vision: z_2.ZodOptional<z_2.ZodOptional<z_2.ZodObject<{
                            supported_media_types: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                            max_prompt_images: z_2.ZodOptional<z_2.ZodNumber>;
                            max_prompt_image_size: z_2.ZodOptional<z_2.ZodNumber>;
                        }, "strip", z_2.ZodTypeAny, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }, {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        }>>>;
                    }, "strip", z_2.ZodTypeAny, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }, {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    }>>>;
                }, "strip", z_2.ZodTypeAny, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }, {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                }>>;
                agentContext: z_2.ZodOptional<z_2.ZodString>;
                eventsLogDirectory: z_2.ZodOptional<z_2.ZodString>;
                configDir: z_2.ZodOptional<z_2.ZodString>;
                additionalContentExclusionPolicies: z_2.ZodOptional<z_2.ZodArray<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">>, "many">>;
                sessionCapabilities: z_2.ZodOptional<z_2.ZodArray<z_2.ZodEnum<[SessionCapability, ...SessionCapability[]]>, "many">>;
            }, "strip", z_2.ZodTypeAny, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }, {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            }>>;
            taskType: z_2.ZodOptional<z_2.ZodEnum<["cca", "cli"]>>;
            onProgress: z_2.ZodOptional<z_2.ZodUnknown>;
        }, "strip", z_2.ZodTypeAny, {
            metadata: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            };
            kind: "handoff";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            onProgress?: unknown;
            taskType?: "cli" | "cca" | undefined;
        }, {
            metadata: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            };
            kind: "handoff";
            options?: {
                name?: string | undefined;
                model?: string | undefined;
                clientName?: string | undefined;
                featureFlags?: Record<string, boolean> | undefined;
                configDir?: string | undefined;
                continueOnAutoMode?: boolean | undefined;
                skillDirectories?: string[] | undefined;
                disabledSkills?: string[] | undefined;
                copilotUrl?: string | undefined;
                workingDirectory?: string | undefined;
                sessionId?: string | undefined;
                reasoningEffort?: string | undefined;
                reasoningSummary?: "none" | "concise" | "detailed" | undefined;
                remoteSteerable?: boolean | undefined;
                detachedFromSpawningParentSessionId?: string | undefined;
                integrationId?: string | undefined;
                sandboxConfig?: {
                    enabled: boolean;
                    config?: Record<string, unknown> | undefined;
                    userPolicy?: {
                        experimental?: {
                            seatbelt?: {
                                keychainAccess?: boolean | undefined;
                            } | undefined;
                        } | undefined;
                        filesystem?: {
                            readwritePaths?: string[] | undefined;
                            readonlyPaths?: string[] | undefined;
                            deniedPaths?: string[] | undefined;
                            clearPolicyOnExit?: boolean | undefined;
                        } | undefined;
                        network?: {
                            allowOutbound?: boolean | undefined;
                            allowLocalNetwork?: boolean | undefined;
                            allowedHosts?: string[] | undefined;
                            blockedHosts?: string[] | undefined;
                        } | undefined;
                    } | undefined;
                    addCurrentWorkingDirectory?: boolean | undefined;
                } | undefined;
                installedPlugins?: {
                    name: string;
                    marketplace: string;
                    enabled: boolean;
                    installed_at: string;
                    version?: string | undefined;
                    source?: string | {
                        source: "github";
                        repo: string;
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        url: string;
                        source: "url";
                        path?: string | undefined;
                        ref?: string | undefined;
                    } | {
                        path: string;
                        source: "local";
                    } | undefined;
                    cache_path?: string | undefined;
                }[] | undefined;
                envValueMode?: "direct" | "indirect" | undefined;
                disabledInstructionSources?: string[] | undefined;
                lspClientName?: string | undefined;
                enableStreaming?: boolean | undefined;
                agentContext?: string | undefined;
                isExperimentalMode?: boolean | undefined;
                authInfo?: AuthInfo | undefined;
                clientKind?: string | undefined;
                provider?: {
                    baseUrl: string;
                    type?: "anthropic" | "openai" | "azure" | undefined;
                    headers?: Record<string, string> | undefined;
                    azure?: {
                        apiVersion?: string | undefined;
                    } | undefined;
                    bearerToken?: string | undefined;
                    apiKey?: string | undefined;
                    modelId?: string | undefined;
                    maxOutputTokens?: number | undefined;
                    wireApi?: "completions" | "responses" | undefined;
                    wireModel?: string | undefined;
                    maxPromptTokens?: number | undefined;
                    maxContextWindowTokens?: number | undefined;
                } | undefined;
                modelCapabilitiesOverrides?: {
                    limits?: {
                        max_output_tokens?: number | undefined;
                        vision?: {
                            supported_media_types?: string[] | undefined;
                            max_prompt_images?: number | undefined;
                            max_prompt_image_size?: number | undefined;
                        } | undefined;
                        max_prompt_tokens?: number | undefined;
                        max_context_window_tokens?: number | undefined;
                    } | undefined;
                    supports?: {
                        reasoningEffort?: boolean | undefined;
                        vision?: boolean | undefined;
                    } | undefined;
                } | undefined;
                remoteExporting?: boolean | undefined;
                remoteDefaultedOn?: boolean | undefined;
                detachedFromSpawningParentEngagementId?: string | undefined;
                availableTools?: string[] | undefined;
                excludedTools?: string[] | undefined;
                enableScriptSafety?: boolean | undefined;
                shellInitProfile?: string | undefined;
                shellProcessFlags?: string[] | undefined;
                logInteractiveShells?: boolean | undefined;
                enableOnDemandInstructionDiscovery?: boolean | undefined;
                customAgentsLocalOnly?: boolean | undefined;
                skipCustomInstructions?: boolean | undefined;
                coauthorEnabled?: boolean | undefined;
                trajectoryFile?: string | undefined;
                eventsLogDirectory?: string | undefined;
                workingDirectoryContext?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                askUserDisabled?: boolean | undefined;
                runningInInteractiveMode?: boolean | undefined;
                sessionCapabilities?: SessionCapability[] | undefined;
                additionalContentExclusionPolicies?: 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">[] | undefined;
            } | undefined;
            onProgress?: unknown;
            taskType?: "cli" | "cca" | undefined;
        }>]>;
        result: z_2.ZodObject<{
            status: z_2.ZodEnum<["created", "resumed", "not_found", "connected", "handed_off"]>;
            sessionId: z_2.ZodOptional<z_2.ZodString>;
            sessionApi: z_2.ZodOptional<z_2.ZodUnknown>;
            startupPrompts: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            remoteSessionId: z_2.ZodOptional<z_2.ZodString>;
            metadata: z_2.ZodOptional<z_2.ZodObject<{
                sessionId: z_2.ZodString;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                summary: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                isRemote: z_2.ZodLiteral<true>;
                context: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                repository: z_2.ZodObject<{
                    owner: z_2.ZodString;
                    name: z_2.ZodString;
                    branch: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    owner: string;
                    branch: string;
                }, {
                    name: string;
                    owner: string;
                    branch: string;
                }>;
                remoteSessionIds: z_2.ZodArray<z_2.ZodString, "many">;
                pullRequestNumber: z_2.ZodOptional<z_2.ZodNumber>;
                resourceId: z_2.ZodOptional<z_2.ZodString>;
                taskType: z_2.ZodOptional<z_2.ZodEnum<["cca", "cli"]>>;
                staleAt: z_2.ZodOptional<z_2.ZodString>;
                state: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            }, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            }>>;
            progress: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                step: z_2.ZodEnum<["load-session", "validate-repo", "check-changes", "checkout-branch", "create-session", "save-session"]>;
                status: z_2.ZodEnum<["in-progress", "complete"]>;
                message: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                status: "complete" | "in-progress";
                step: "load-session" | "validate-repo" | "check-changes" | "checkout-branch" | "create-session" | "save-session";
                message?: string | undefined;
            }, {
                status: "complete" | "in-progress";
                step: "load-session" | "validate-repo" | "check-changes" | "checkout-branch" | "create-session" | "save-session";
                message?: string | undefined;
            }>, "many">>;
        }, "strip", z_2.ZodTypeAny, {
            status: "created" | "connected" | "resumed" | "not_found" | "handed_off";
            progress?: {
                status: "complete" | "in-progress";
                step: "load-session" | "validate-repo" | "check-changes" | "checkout-branch" | "create-session" | "save-session";
                message?: string | undefined;
            }[] | undefined;
            metadata?: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            } | undefined;
            sessionId?: string | undefined;
            remoteSessionId?: string | undefined;
            sessionApi?: unknown;
            startupPrompts?: string[] | undefined;
        }, {
            status: "created" | "connected" | "resumed" | "not_found" | "handed_off";
            progress?: {
                status: "complete" | "in-progress";
                step: "load-session" | "validate-repo" | "check-changes" | "checkout-branch" | "create-session" | "save-session";
                message?: string | undefined;
            }[] | undefined;
            metadata?: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            } | undefined;
            sessionId?: string | undefined;
            remoteSessionId?: string | undefined;
            sessionApi?: unknown;
            startupPrompts?: string[] | undefined;
        }>;
    };
    fork: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            toEventId: z_2.ZodOptional<z_2.ZodString>;
            name: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            name?: string | undefined;
            toEventId?: string | undefined;
        }, {
            sessionId: string;
            name?: string | undefined;
            toEventId?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            name: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            name?: string | undefined;
        }, {
            sessionId: string;
            name?: string | undefined;
        }>;
    };
    connect: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            metadata: z_2.ZodObject<{
                sessionId: z_2.ZodString;
                name: z_2.ZodOptional<z_2.ZodString>;
                summary: z_2.ZodOptional<z_2.ZodString>;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                repository: z_2.ZodObject<{
                    owner: z_2.ZodString;
                    name: z_2.ZodString;
                } & {
                    branch: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    owner: string;
                    branch: string;
                }, {
                    name: string;
                    owner: string;
                    branch: string;
                }>;
                pullRequestNumber: z_2.ZodOptional<z_2.ZodNumber>;
                resourceId: z_2.ZodOptional<z_2.ZodString>;
                kind: z_2.ZodEnum<["remote-session", "coding-agent"]>;
                staleAt: z_2.ZodOptional<z_2.ZodString>;
                state: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                kind: "coding-agent" | "remote-session";
                modifiedTime: string;
                name?: string | undefined;
                state?: string | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                staleAt?: string | undefined;
            }, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                kind: "coding-agent" | "remote-session";
                modifiedTime: string;
                name?: string | undefined;
                state?: string | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                staleAt?: string | undefined;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            metadata: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                kind: "coding-agent" | "remote-session";
                modifiedTime: string;
                name?: string | undefined;
                state?: string | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                staleAt?: string | undefined;
            };
            sessionId: string;
        }, {
            metadata: {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                kind: "coding-agent" | "remote-session";
                modifiedTime: string;
                name?: string | undefined;
                state?: string | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                staleAt?: string | undefined;
            };
            sessionId: string;
        }>;
    };
    list: {
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            source: z_2.ZodOptional<z_2.ZodEnum<["local", "remote", "all"]>>;
            metadataLimit: z_2.ZodOptional<z_2.ZodNumber>;
            filter: z_2.ZodOptional<z_2.ZodObject<{
                cwd: z_2.ZodOptional<z_2.ZodString>;
                gitRoot: z_2.ZodOptional<z_2.ZodString>;
                repository: z_2.ZodOptional<z_2.ZodString>;
                branch: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                repository?: string | undefined;
                cwd?: string | undefined;
                gitRoot?: string | undefined;
                branch?: string | undefined;
            }, {
                repository?: string | undefined;
                cwd?: string | undefined;
                gitRoot?: string | undefined;
                branch?: string | undefined;
            }>>;
            includeDetached: z_2.ZodOptional<z_2.ZodBoolean>;
            throwOnError: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            filter?: {
                repository?: string | undefined;
                cwd?: string | undefined;
                gitRoot?: string | undefined;
                branch?: string | undefined;
            } | undefined;
            source?: "remote" | "local" | "all" | undefined;
            metadataLimit?: number | undefined;
            includeDetached?: boolean | undefined;
            throwOnError?: boolean | undefined;
        }, {
            filter?: {
                repository?: string | undefined;
                cwd?: string | undefined;
                gitRoot?: string | undefined;
                branch?: string | undefined;
            } | undefined;
            source?: "remote" | "local" | "all" | undefined;
            metadataLimit?: number | undefined;
            includeDetached?: boolean | undefined;
            throwOnError?: boolean | undefined;
        }>>;
        result: z_2.ZodObject<{
            sessions: z_2.ZodArray<z_2.ZodDiscriminatedUnion<"isRemote", [z_2.ZodObject<{
                sessionId: z_2.ZodString;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                summary: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                isRemote: z_2.ZodLiteral<false>;
                isDetached: z_2.ZodOptional<z_2.ZodBoolean>;
                context: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                mcTaskId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }, {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }>, z_2.ZodObject<{
                sessionId: z_2.ZodString;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                summary: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                isRemote: z_2.ZodLiteral<true>;
                context: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                repository: z_2.ZodObject<{
                    owner: z_2.ZodString;
                    name: z_2.ZodString;
                    branch: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    name: string;
                    owner: string;
                    branch: string;
                }, {
                    name: string;
                    owner: string;
                    branch: string;
                }>;
                remoteSessionIds: z_2.ZodArray<z_2.ZodString, "many">;
                pullRequestNumber: z_2.ZodOptional<z_2.ZodNumber>;
                resourceId: z_2.ZodOptional<z_2.ZodString>;
                taskType: z_2.ZodOptional<z_2.ZodEnum<["cca", "cli"]>>;
                staleAt: z_2.ZodOptional<z_2.ZodString>;
                state: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            }, {
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            }>]>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            sessions: ({
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            } | {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            })[];
        }, {
            sessions: ({
                repository: {
                    name: string;
                    owner: string;
                    branch: string;
                };
                sessionId: string;
                startTime: string;
                isRemote: true;
                modifiedTime: string;
                remoteSessionIds: string[];
                name?: string | undefined;
                state?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                pullRequestNumber?: number | undefined;
                resourceId?: string | undefined;
                taskType?: "cli" | "cca" | undefined;
                staleAt?: string | undefined;
            } | {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            })[];
        }>;
    };
    findByTaskId: {
        description: string;
        params: z_2.ZodObject<{
            taskId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            taskId: string;
        }, {
            taskId: string;
        }>;
        result: z_2.ZodObject<{
            sessionId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId?: string | undefined;
        }, {
            sessionId?: string | undefined;
        }>;
    };
    findByPrefix: {
        description: string;
        params: z_2.ZodObject<{
            prefix: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            prefix: string;
        }, {
            prefix: string;
        }>;
        result: z_2.ZodObject<{
            sessionId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId?: string | undefined;
        }, {
            sessionId?: string | undefined;
        }>;
    };
    getLastForContext: {
        description: string;
        params: z_2.ZodObject<{
            context: z_2.ZodOptional<z_2.ZodObject<{
                cwd: z_2.ZodString;
                gitRoot: z_2.ZodOptional<z_2.ZodString>;
                repository: z_2.ZodOptional<z_2.ZodString>;
                hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                branch: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            }, {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            context?: {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            } | undefined;
        }, {
            context?: {
                cwd: string;
                repository?: string | undefined;
                gitRoot?: string | undefined;
                hostType?: "github" | "ado" | undefined;
                branch?: string | undefined;
            } | undefined;
        }>;
        result: z_2.ZodObject<{
            sessionId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId?: string | undefined;
        }, {
            sessionId?: string | undefined;
        }>;
    };
    getEventFilePath: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{
            filePath: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            filePath: string;
        }, {
            filePath: string;
        }>;
        visibility: "internal";
    };
    getSizes: {
        description: string;
        result: z_2.ZodObject<{
            sizes: z_2.ZodRecord<z_2.ZodString, z_2.ZodNumber>;
        }, "strip", z_2.ZodTypeAny, {
            sizes: Record<string, number>;
        }, {
            sizes: Record<string, number>;
        }>;
    };
    checkInUse: {
        description: string;
        params: z_2.ZodObject<{
            sessionIds: z_2.ZodArray<z_2.ZodString, "many">;
        }, "strip", z_2.ZodTypeAny, {
            sessionIds: string[];
        }, {
            sessionIds: string[];
        }>;
        result: z_2.ZodObject<{
            inUse: z_2.ZodArray<z_2.ZodString, "many">;
        }, "strip", z_2.ZodTypeAny, {
            inUse: string[];
        }, {
            inUse: string[];
        }>;
    };
    getPersistedRemoteSteerable: {
        visibility: "internal";
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{
            remoteSteerable: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            remoteSteerable?: boolean | undefined;
        }, {
            remoteSteerable?: boolean | undefined;
        }>;
    };
    close: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    bulkDelete: {
        description: string;
        params: z_2.ZodObject<{
            sessionIds: z_2.ZodArray<z_2.ZodString, "many">;
        }, "strip", z_2.ZodTypeAny, {
            sessionIds: string[];
        }, {
            sessionIds: string[];
        }>;
        result: z_2.ZodObject<{
            freedBytes: z_2.ZodRecord<z_2.ZodString, z_2.ZodNumber>;
        }, "strip", z_2.ZodTypeAny, {
            freedBytes: Record<string, number>;
        }, {
            freedBytes: Record<string, number>;
        }>;
    };
    pruneOld: {
        description: string;
        params: z_2.ZodObject<{
            olderThanDays: z_2.ZodNumber;
            dryRun: z_2.ZodOptional<z_2.ZodBoolean>;
            includeNamed: z_2.ZodOptional<z_2.ZodBoolean>;
            excludeSessionIds: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
        }, "strip", z_2.ZodTypeAny, {
            olderThanDays: number;
            dryRun?: boolean | undefined;
            includeNamed?: boolean | undefined;
            excludeSessionIds?: string[] | undefined;
        }, {
            olderThanDays: number;
            dryRun?: boolean | undefined;
            includeNamed?: boolean | undefined;
            excludeSessionIds?: string[] | undefined;
        }>;
        result: z_2.ZodObject<{
            deleted: z_2.ZodArray<z_2.ZodString, "many">;
            candidates: z_2.ZodArray<z_2.ZodString, "many">;
            skipped: z_2.ZodArray<z_2.ZodString, "many">;
            freedBytes: z_2.ZodNumber;
            dryRun: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            skipped: string[];
            deleted: string[];
            freedBytes: number;
            dryRun: boolean;
            candidates: string[];
        }, {
            skipped: string[];
            deleted: string[];
            freedBytes: number;
            dryRun: boolean;
            candidates: string[];
        }>;
    };
    save: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    releaseLock: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    enrichMetadata: {
        description: string;
        params: z_2.ZodObject<{
            sessions: z_2.ZodArray<z_2.ZodObject<{
                sessionId: z_2.ZodString;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                summary: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                isRemote: z_2.ZodLiteral<false>;
                isDetached: z_2.ZodOptional<z_2.ZodBoolean>;
                context: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                mcTaskId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }, {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            sessions: {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }[];
        }, {
            sessions: {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }[];
        }>;
        result: z_2.ZodObject<{
            sessions: z_2.ZodArray<z_2.ZodObject<{
                sessionId: z_2.ZodString;
                startTime: z_2.ZodString;
                modifiedTime: z_2.ZodString;
                summary: z_2.ZodOptional<z_2.ZodString>;
                name: z_2.ZodOptional<z_2.ZodString>;
                clientName: z_2.ZodOptional<z_2.ZodString>;
                isRemote: z_2.ZodLiteral<false>;
                isDetached: z_2.ZodOptional<z_2.ZodBoolean>;
                context: z_2.ZodOptional<z_2.ZodObject<{
                    cwd: z_2.ZodString;
                    gitRoot: z_2.ZodOptional<z_2.ZodString>;
                    repository: z_2.ZodOptional<z_2.ZodString>;
                    hostType: z_2.ZodOptional<z_2.ZodEnum<["github", "ado"]>>;
                    branch: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }, {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                }>>;
                mcTaskId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }, {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            sessions: {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }[];
        }, {
            sessions: {
                sessionId: string;
                startTime: string;
                isRemote: false;
                modifiedTime: string;
                name?: string | undefined;
                clientName?: string | undefined;
                context?: {
                    cwd: string;
                    repository?: string | undefined;
                    gitRoot?: string | undefined;
                    hostType?: "github" | "ado" | undefined;
                    branch?: string | undefined;
                } | undefined;
                summary?: string | undefined;
                isDetached?: boolean | undefined;
                mcTaskId?: string | undefined;
            }[];
        }>;
    };
    reloadPluginHooks: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            deferRepoHooks: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            deferRepoHooks?: boolean | undefined;
        }, {
            sessionId: string;
            deferRepoHooks?: boolean | undefined;
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    loadDeferredRepoHooks: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{
            startupPrompts: z_2.ZodArray<z_2.ZodString, "many">;
            hookCount: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            hookCount: number;
            startupPrompts: string[];
        }, {
            hookCount: number;
            startupPrompts: string[];
        }>;
    };
    setAdditionalPlugins: {
        description: string;
        params: z_2.ZodObject<{
            plugins: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                marketplace: z_2.ZodString;
                version: z_2.ZodOptional<z_2.ZodString>;
                installed_at: z_2.ZodString;
                enabled: z_2.ZodBoolean;
                cache_path: z_2.ZodOptional<z_2.ZodString>;
                source: z_2.ZodOptional<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";
                }>]>>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }, {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            plugins: {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }[];
        }, {
            plugins: {
                name: string;
                marketplace: string;
                enabled: boolean;
                installed_at: string;
                version?: string | undefined;
                source?: string | {
                    source: "github";
                    repo: string;
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    url: string;
                    source: "url";
                    path?: string | undefined;
                    ref?: string | undefined;
                } | {
                    path: string;
                    source: "local";
                } | undefined;
                cache_path?: string | undefined;
            }[];
        }>;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    getBoardEntryCount: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
        }, {
            sessionId: string;
        }>;
        result: z_2.ZodObject<{
            count: z_2.ZodOptional<z_2.ZodNumber>;
        }, "strip", z_2.ZodTypeAny, {
            count?: number | undefined;
        }, {
            count?: number | undefined;
        }>;
        visibility: "internal";
    };
    startRemoteControl: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            config: z_2.ZodObject<{
                remote: z_2.ZodBoolean;
                steerable: z_2.ZodBoolean;
                explicit: z_2.ZodBoolean;
                silent: z_2.ZodBoolean;
                taskId: z_2.ZodOptional<z_2.ZodString>;
                existingMcSession: z_2.ZodOptional<z_2.ZodObject<{
                    mcSessionId: z_2.ZodString;
                    mcTaskId: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    mcTaskId: string;
                    mcSessionId: string;
                }, {
                    mcTaskId: string;
                    mcSessionId: string;
                }>>;
            }, "strip", z_2.ZodTypeAny, {
                remote: boolean;
                explicit: boolean;
                silent: boolean;
                steerable: boolean;
                taskId?: string | undefined;
                existingMcSession?: {
                    mcTaskId: string;
                    mcSessionId: string;
                } | undefined;
            }, {
                remote: boolean;
                explicit: boolean;
                silent: boolean;
                steerable: boolean;
                taskId?: string | undefined;
                existingMcSession?: {
                    mcTaskId: string;
                    mcSessionId: string;
                } | undefined;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            config: {
                remote: boolean;
                explicit: boolean;
                silent: boolean;
                steerable: boolean;
                taskId?: string | undefined;
                existingMcSession?: {
                    mcTaskId: string;
                    mcSessionId: string;
                } | undefined;
            };
            sessionId: string;
        }, {
            config: {
                remote: boolean;
                explicit: boolean;
                silent: boolean;
                steerable: boolean;
                taskId?: string | undefined;
                existingMcSession?: {
                    mcTaskId: string;
                    mcSessionId: string;
                } | undefined;
            };
            sessionId: string;
        }>;
        result: z_2.ZodObject<{
            status: z_2.ZodDiscriminatedUnion<"state", [z_2.ZodObject<{
                state: z_2.ZodLiteral<"off">;
            }, "strip", z_2.ZodTypeAny, {
                state: "off";
            }, {
                state: "off";
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"connecting">;
                attachedSessionId: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                state: "connecting";
                attachedSessionId: string;
            }, {
                state: "connecting";
                attachedSessionId: string;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"active">;
                attachedSessionId: z_2.ZodString;
                frontendUrl: z_2.ZodOptional<z_2.ZodString>;
                isSteerable: z_2.ZodBoolean;
                promptManager: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"error">;
                error: z_2.ZodString;
                attachedSessionId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }>]>;
        }, "strip", z_2.ZodTypeAny, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
        }, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
        }>;
    };
    transferRemoteControl: {
        description: string;
        params: z_2.ZodObject<{
            toSessionId: z_2.ZodString;
            expectedFromSessionId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            toSessionId: string;
            expectedFromSessionId?: string | undefined;
        }, {
            toSessionId: string;
            expectedFromSessionId?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            status: z_2.ZodDiscriminatedUnion<"state", [z_2.ZodObject<{
                state: z_2.ZodLiteral<"off">;
            }, "strip", z_2.ZodTypeAny, {
                state: "off";
            }, {
                state: "off";
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"connecting">;
                attachedSessionId: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                state: "connecting";
                attachedSessionId: string;
            }, {
                state: "connecting";
                attachedSessionId: string;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"active">;
                attachedSessionId: z_2.ZodString;
                frontendUrl: z_2.ZodOptional<z_2.ZodString>;
                isSteerable: z_2.ZodBoolean;
                promptManager: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"error">;
                error: z_2.ZodString;
                attachedSessionId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }>]>;
            transferred: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
            transferred: boolean;
        }, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
            transferred: boolean;
        }>;
    };
    setRemoteControlSteering: {
        description: string;
        params: z_2.ZodObject<{
            enabled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            enabled: boolean;
        }, {
            enabled: boolean;
        }>;
        result: z_2.ZodObject<{
            status: z_2.ZodDiscriminatedUnion<"state", [z_2.ZodObject<{
                state: z_2.ZodLiteral<"off">;
            }, "strip", z_2.ZodTypeAny, {
                state: "off";
            }, {
                state: "off";
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"connecting">;
                attachedSessionId: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                state: "connecting";
                attachedSessionId: string;
            }, {
                state: "connecting";
                attachedSessionId: string;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"active">;
                attachedSessionId: z_2.ZodString;
                frontendUrl: z_2.ZodOptional<z_2.ZodString>;
                isSteerable: z_2.ZodBoolean;
                promptManager: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"error">;
                error: z_2.ZodString;
                attachedSessionId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }>]>;
        }, "strip", z_2.ZodTypeAny, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
        }, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
        }>;
    };
    stopRemoteControl: {
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            expectedSessionId: z_2.ZodOptional<z_2.ZodString>;
            force: z_2.ZodOptional<z_2.ZodBoolean>;
        }, "strip", z_2.ZodTypeAny, {
            force?: boolean | undefined;
            expectedSessionId?: string | undefined;
        }, {
            force?: boolean | undefined;
            expectedSessionId?: string | undefined;
        }>>;
        result: z_2.ZodObject<{
            status: z_2.ZodDiscriminatedUnion<"state", [z_2.ZodObject<{
                state: z_2.ZodLiteral<"off">;
            }, "strip", z_2.ZodTypeAny, {
                state: "off";
            }, {
                state: "off";
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"connecting">;
                attachedSessionId: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                state: "connecting";
                attachedSessionId: string;
            }, {
                state: "connecting";
                attachedSessionId: string;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"active">;
                attachedSessionId: z_2.ZodString;
                frontendUrl: z_2.ZodOptional<z_2.ZodString>;
                isSteerable: z_2.ZodBoolean;
                promptManager: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"error">;
                error: z_2.ZodString;
                attachedSessionId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }>]>;
            stopped: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
            stopped: boolean;
        }, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
            stopped: boolean;
        }>;
    };
    getRemoteControlStatus: {
        description: string;
        result: z_2.ZodObject<{
            status: z_2.ZodDiscriminatedUnion<"state", [z_2.ZodObject<{
                state: z_2.ZodLiteral<"off">;
            }, "strip", z_2.ZodTypeAny, {
                state: "off";
            }, {
                state: "off";
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"connecting">;
                attachedSessionId: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                state: "connecting";
                attachedSessionId: string;
            }, {
                state: "connecting";
                attachedSessionId: string;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"active">;
                attachedSessionId: z_2.ZodString;
                frontendUrl: z_2.ZodOptional<z_2.ZodString>;
                isSteerable: z_2.ZodBoolean;
                promptManager: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }, {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            }>, z_2.ZodObject<{
                state: z_2.ZodLiteral<"error">;
                error: z_2.ZodString;
                attachedSessionId: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }, {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            }>]>;
        }, "strip", z_2.ZodTypeAny, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
        }, {
            status: {
                state: "off";
            } | {
                state: "connecting";
                attachedSessionId: string;
            } | {
                state: "active";
                attachedSessionId: string;
                isSteerable: boolean;
                frontendUrl?: string | undefined;
                promptManager?: unknown;
            } | {
                error: string;
                state: "error";
                attachedSessionId?: string | undefined;
            };
        }>;
    };
    pollSpawnedSessions: {
        visibility: "internal";
        description: string;
        params: z_2.ZodOptional<z_2.ZodObject<{
            cursor: z_2.ZodOptional<z_2.ZodString>;
            waitMs: z_2.ZodOptional<z_2.ZodNumber>;
        }, "strip", z_2.ZodTypeAny, {
            cursor?: string | undefined;
            waitMs?: number | undefined;
        }, {
            cursor?: string | undefined;
            waitMs?: number | undefined;
        }>>;
        result: z_2.ZodObject<{
            events: z_2.ZodArray<z_2.ZodObject<{
                sessionId: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                sessionId: string;
            }, {
                sessionId: string;
            }>, "many">;
            cursor: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            cursor: string;
            events: {
                sessionId: string;
            }[];
        }, {
            cursor: string;
            events: {
                sessionId: string;
            }[];
        }>;
    };
    registerExtensionToolsOnSession: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            loader: z_2.ZodType<unknown, z_2.ZodTypeDef, unknown>;
            options: z_2.ZodOptional<z_2.ZodObject<{
                enabled: z_2.ZodOptional<z_2.ZodUnknown>;
            }, "strip", z_2.ZodTypeAny, {
                enabled?: unknown;
            }, {
                enabled?: unknown;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            options?: {
                enabled?: unknown;
            } | undefined;
            loader?: unknown;
        }, {
            sessionId: string;
            options?: {
                enabled?: unknown;
            } | undefined;
            loader?: unknown;
        }>;
        result: z_2.ZodObject<{
            unsubscribe: z_2.ZodType<() => void, z_2.ZodTypeDef, () => void>;
        }, "strip", z_2.ZodTypeAny, {
            unsubscribe: () => void;
        }, {
            unsubscribe: () => void;
        }>;
        visibility: "internal";
    };
    configureSessionExtensions: {
        description: string;
        params: z_2.ZodObject<{
            sessionId: z_2.ZodString;
            controller: z_2.ZodOptional<z_2.ZodUnknown>;
        }, "strip", z_2.ZodTypeAny, {
            sessionId: string;
            controller?: unknown;
        }, {
            sessionId: string;
            controller?: unknown;
        }>;
        visibility: "internal";
    };
};

declare type SessionsChatCompletionChunk = CopilotChatCompletionChunk & AgentIdBag;

declare type SessionsChatCompletionMessageParam = (SessionsUserMessageParam | ChatCompletionToolMessageParam) & AgentIdBag;

declare type SessionScheduleApi = ApiSchemaToInterface<typeof sessionScheduleApiSchema>;

/**
 * Schedule-registry surface for managing recurring prompts (e.g. the
 * `/every` slash command).
 *
 * The runtime owns the per-session {@link ScheduleRegistry} that tracks
 * timers and emits `session.schedule_created`/`session.schedule_cancelled`
 * events. SDK and CLI consumers manage schedules through this namespace
 * rather than constructing their own registry.
 *
 * Resumed sessions rehydrate the registry from the event log at
 * construction time, so listing / adding / stopping schedules works
 * the same way before and after a resume.
 */
declare const sessionScheduleApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            entries: z_2.ZodArray<z_2.ZodObject<{
                id: z_2.ZodNumber;
                intervalMs: z_2.ZodOptional<z_2.ZodNumber>;
                cron: z_2.ZodOptional<z_2.ZodString>;
                tz: z_2.ZodOptional<z_2.ZodString>;
                at: z_2.ZodOptional<z_2.ZodNumber>;
                prompt: z_2.ZodString;
                recurring: z_2.ZodBoolean;
                displayPrompt: z_2.ZodOptional<z_2.ZodString>;
                nextRunAt: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            }, {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            entries: {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            }[];
        }, {
            entries: {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            }[];
        }>;
    };
    stop: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            id: number;
        }, {
            id: number;
        }>;
        result: z_2.ZodObject<{
            entry: z_2.ZodOptional<z_2.ZodObject<{
                id: z_2.ZodNumber;
                intervalMs: z_2.ZodOptional<z_2.ZodNumber>;
                cron: z_2.ZodOptional<z_2.ZodString>;
                tz: z_2.ZodOptional<z_2.ZodString>;
                at: z_2.ZodOptional<z_2.ZodNumber>;
                prompt: z_2.ZodString;
                recurring: z_2.ZodBoolean;
                displayPrompt: z_2.ZodOptional<z_2.ZodString>;
                nextRunAt: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            }, {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            entry?: {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            } | undefined;
        }, {
            entry?: {
                prompt: string;
                id: number;
                recurring: boolean;
                nextRunAt: string;
                at?: number | undefined;
                intervalMs?: number | undefined;
                cron?: string | undefined;
                tz?: string | undefined;
                displayPrompt?: string | undefined;
            } | undefined;
        }>;
    };
};

export declare type SessionScheduleCancelledEvent = z.infer<typeof SessionScheduleCancelledEventSchema>;

/**
 * Emitted when a scheduled prompt is cancelled (deleted from the schedule
 * manager dialog). Acts as a tombstone so that resume hydration can skip
 * the cancelled schedule.
 */
declare const SessionScheduleCancelledEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.schedule_cancelled">;
    data: z.ZodObject<{
        id: z.ZodNumber;
    }, "strip", z.ZodTypeAny, {
        id: number;
    }, {
        id: number;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.schedule_cancelled";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        id: number;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.schedule_cancelled";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        id: number;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type SessionScheduleCreatedEvent = z.infer<typeof SessionScheduleCreatedEventSchema>;

/**
 * Emitted when a scheduled prompt is registered for the session (e.g. via
 * `/every`). Persisted to the event log so that resuming the session can
 * re-create the timer that fires the prompt.
 */
declare const SessionScheduleCreatedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.schedule_created">;
    data: z.ZodObject<{
        id: z.ZodNumber;
        intervalMs: z.ZodOptional<z.ZodNumber>;
        cron: z.ZodOptional<z.ZodString>;
        tz: z.ZodOptional<z.ZodString>;
        at: z.ZodOptional<z.ZodNumber>;
        prompt: z.ZodString;
        recurring: z.ZodOptional<z.ZodBoolean>;
        displayPrompt: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    }, {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.schedule_created";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.schedule_created";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        prompt: string;
        id: number;
        at?: number | undefined;
        intervalMs?: number | undefined;
        cron?: string | undefined;
        tz?: string | undefined;
        recurring?: boolean | undefined;
        displayPrompt?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare interface SessionShellContext {
    canPromoteShellToBackground(shellId: string): boolean;
    getTrackedShellTasks(): ShellTask[];
    getShellTaskProgress(shellId: string): Promise<{
        recentOutput: string;
        pid?: number;
    } | undefined>;
    cancelShellTask(shellId: string): Promise<boolean>;
    removeShellTask(shellId: string): boolean;
    promoteShellToBackground(shellId: string): boolean;
    hasCommandsAwaitingNotification(): boolean;
    hasRunningAttachedCommands(): boolean;
    shutdownIdleSessions(): number;
    shutdownAll(): Promise<void>;
    updateLocation(newLocation: string): void;
    setOnCommandCompleteCallback(callback: ((shellId: string, output: ShellOutput, description?: string) => void) | undefined): void;
    waitForActiveShells(): Promise<void>;
}

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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.ZodOptional<z.ZodNumber>;
        /** Session-wide accumulated nano-AI units cost */
        totalNanoAiu: z.ZodOptional<z.ZodNumber>;
        /** Session-wide token count details per type */
        tokenDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
            tokenCount: z.ZodNumber;
        }, "strip", z.ZodTypeAny, {
            tokenCount: number;
        }, {
            tokenCount: number;
        }>>>;
        /** Total time spent in API calls (milliseconds) */
        totalApiDurationMs: z.ZodNumber;
        /** Session start time (Unix timestamp) */
        sessionStartTime: z.ZodNumber;
        /** On-disk byte size of the session's persisted events.jsonl file at shutdown */
        eventsFileSizeBytes: z.ZodOptional<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.ZodOptional<z.ZodNumber>;
                cost: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                count?: number | undefined;
                cost?: number | undefined;
            }, {
                count?: number | undefined;
                cost?: number | undefined;
            }>;
            usage: z.ZodObject<{
                inputTokens: z.ZodNumber;
                outputTokens: z.ZodNumber;
                cacheReadTokens: z.ZodNumber;
                cacheWriteTokens: z.ZodNumber;
                reasoningTokens: z.ZodOptional<z.ZodNumber>;
            }, "strip", z.ZodTypeAny, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }, {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            }>;
            totalNanoAiu: z.ZodOptional<z.ZodNumber>;
            tokenDetails: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
                tokenCount: z.ZodNumber;
            }, "strip", z.ZodTypeAny, {
                tokenCount: number;
            }, {
                tokenCount: number;
            }>>>;
        }, "strip", z.ZodTypeAny, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>>;
        /** 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";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }, {
        shutdownType: "error" | "routine";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.shutdown";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        shutdownType: "error" | "routine";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.shutdown";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        shutdownType: "error" | "routine";
        totalApiDurationMs: number;
        sessionStartTime: number;
        codeChanges: {
            linesAdded: number;
            linesRemoved: number;
            filesModified: string[];
        };
        modelMetrics: Record<string, {
            usage: {
                inputTokens: number;
                outputTokens: number;
                cacheReadTokens: number;
                cacheWriteTokens: number;
                reasoningTokens?: number | undefined;
            };
            requests: {
                count?: number | undefined;
                cost?: number | undefined;
            };
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
        }>;
        eventsFileSizeBytes?: number | undefined;
        errorReason?: string | undefined;
        totalPremiumRequests?: number | undefined;
        totalNanoAiu?: number | undefined;
        tokenDetails?: Record<string, {
            tokenCount: number;
        }> | undefined;
        currentModel?: string | undefined;
        currentTokens?: number | undefined;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionSkillsApi = ApiSchemaToInterface<typeof sessionSkillsApiSchema>;

declare const sessionSkillsApiSchema: {
    list: {
        description: string;
        result: z_2.ZodObject<{
            skills: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                description: z_2.ZodString;
                source: z_2.ZodEnum<["project", "inherited", "personal-copilot", "personal-agents", "plugin", "custom", "builtin"]>;
                userInvocable: z_2.ZodBoolean;
                enabled: z_2.ZodBoolean;
                path: z_2.ZodOptional<z_2.ZodString>;
                pluginName: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                enabled: boolean;
                userInvocable: boolean;
                path?: string | undefined;
                pluginName?: string | undefined;
            }, {
                name: string;
                description: string;
                source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                enabled: boolean;
                userInvocable: boolean;
                path?: string | undefined;
                pluginName?: string | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            skills: {
                name: string;
                description: string;
                source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                enabled: boolean;
                userInvocable: boolean;
                path?: string | undefined;
                pluginName?: string | undefined;
            }[];
        }, {
            skills: {
                name: string;
                description: string;
                source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
                enabled: boolean;
                userInvocable: boolean;
                path?: string | undefined;
                pluginName?: string | undefined;
            }[];
        }>;
    };
    getInvoked: {
        description: string;
        result: z_2.ZodObject<{
            skills: z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                path: z_2.ZodString;
                content: z_2.ZodString;
                allowedTools: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                invokedAtTurn: z_2.ZodNumber;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
                name: string;
                content: string;
                invokedAtTurn: number;
                allowedTools?: string[] | undefined;
            }, {
                path: string;
                name: string;
                content: string;
                invokedAtTurn: number;
                allowedTools?: string[] | undefined;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            skills: {
                path: string;
                name: string;
                content: string;
                invokedAtTurn: number;
                allowedTools?: string[] | undefined;
            }[];
        }, {
            skills: {
                path: string;
                name: string;
                content: string;
                invokedAtTurn: number;
                allowedTools?: string[] | undefined;
            }[];
        }>;
    };
    enable: {
        description: string;
        params: z_2.ZodObject<{
            name: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
        }, {
            name: string;
        }>;
    };
    disable: {
        description: string;
        params: z_2.ZodObject<{
            name: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
        }, {
            name: string;
        }>;
    };
    reload: {
        description: string;
        result: z_2.ZodObject<{
            warnings: z_2.ZodArray<z_2.ZodString, "many">;
            errors: z_2.ZodArray<z_2.ZodString, "many">;
        }, "strip", z_2.ZodTypeAny, {
            errors: string[];
            warnings: string[];
        }, {
            errors: string[];
            warnings: string[];
        }>;
    };
    ensureLoaded: {
        description: string;
    };
};

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>;
    agentId: z.ZodOptional<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.ZodEnum<["project", "inherited", "personal-copilot", "personal-agents", "plugin", "custom", "builtin"]>;
            userInvocable: z.ZodBoolean;
            enabled: z.ZodBoolean;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }, {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }>, "many">;
    }, "strip", z.ZodTypeAny, {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }, {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.skills_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}, {
    type: "session.skills_loaded";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        skills: {
            name: string;
            description: string;
            source: "project" | "inherited" | "personal-copilot" | "personal-agents" | "plugin" | "custom" | "builtin";
            enabled: boolean;
            userInvocable: boolean;
            path?: string | undefined;
        }[];
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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, {
    type: "session.snapshot_rewind";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.snapshot_rewind";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        eventsRemoved: number;
        upToEventId: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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>;
        reasoningSummary: z.ZodOptional<z.ZodEnum<["none", "concise", "detailed"]>>;
        contextTier: z.ZodOptional<z.ZodNullable<z.ZodEnum<["default", "long_context"]>>>;
        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"]>>;
            repositoryHost: z.ZodOptional<z.ZodString>;
            branch: z.ZodOptional<z.ZodString>;
            headCommit: z.ZodOptional<z.ZodString>;
            baseCommit: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }, {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        }>>;
        alreadyInUse: z.ZodOptional<z.ZodBoolean>;
        remoteSteerable: z.ZodOptional<z.ZodBoolean>;
        detachedFromSpawningParentSessionId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    }, {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        version: number;
        sessionId: string;
        producer: string;
        copilotVersion: string;
        startTime: string;
        contextTier?: "default" | "long_context" | null | undefined;
        selectedModel?: string | undefined;
        reasoningEffort?: string | undefined;
        reasoningSummary?: "none" | "concise" | "detailed" | undefined;
        context?: {
            cwd: string;
            repository?: string | undefined;
            gitRoot?: string | undefined;
            hostType?: "github" | "ado" | undefined;
            repositoryHost?: string | undefined;
            branch?: string | undefined;
            headCommit?: string | undefined;
            baseCommit?: string | undefined;
        } | undefined;
        alreadyInUse?: boolean | undefined;
        remoteSteerable?: boolean | undefined;
        detachedFromSpawningParentSessionId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type SessionStartHook = Hook<SessionStartHookInput, SessionStartHookOutput>;

/**
 * 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>;
}

/**
 * Global session store backed by SQLite + FTS5.
 *
 * Lives at `~/.copilot/session-store.db` (shared across all sessions).
 * The store is populated incrementally by live hooks — no background indexing.
 */
declare class SessionStore {
    private db;
    private readonly dbPath;
    constructor(dbPath: string);
    /**
     * Get the path to the database file.
     */
    getPath(): string;
    /**
     * Lazily open (or create) the database and ensure the schema exists.
     */
    private ensureDb;
    /**
     * Create or migrate tables to the current schema version.
     *
     * IMPORTANT: When bumping SCHEMA_VERSION, add explicit migration logic
     * for each version step (e.g., v1→v2). CREATE TABLE IF NOT EXISTS does
     * NOT alter existing tables — use ALTER TABLE for schema changes.
     * Example:
     *   if (currentVersion < 2) {
     *       db.exec("ALTER TABLE session_files ADD COLUMN git_root TEXT");
     *   }
     */
    private ensureSchema;
    /**
     * Insert or update a session's metadata.
     */
    upsertSession(session: SessionRow): void;
    /**
     * Insert a conversation turn and index it for full-text search.
     */
    insertTurn(turn: TurnRow): void;
    /**
     * Insert a compaction checkpoint and index its sections for full-text search.
     */
    insertCheckpoint(checkpoint: CheckpointRow): void;
    /**
     * Record a file touched during a session.
     * Uses INSERT OR IGNORE so the first occurrence wins.
     */
    insertFile(file: FileRow): void;
    /**
     * Record a reference (commit, PR, issue) for a session.
     */
    insertRef(ref: RefRow): void;
    /**
     * Record a Forge trajectory event derived from session tool activity.
     */
    insertForgeTrajectoryEvent(event: ForgeTrajectoryEventRow): void;
    /**
     * Get Forge trajectory events for a session in insertion order.
     */
    getForgeTrajectoryEvents(sessionId: string): ForgeTrajectoryEventRow[];
    /**
     * Get Forge trajectory events across recent sessions matching the provided repository/branch scope.
     */
    getForgeTrajectoryEventsForScope(scope?: ForgeTrajectoryScope): ForgeTrajectoryEventRow[];
    /**
     * Get the dynamic context board for a repository+branch (projection without content).
     */
    getDynamicContextBoard(repository: string, branch: string): DynamicContextBoardEntry[];
    /**
     * Get a single dynamic context item including its full content.
     */
    getDynamicContextItem(repository: string, branch: string, src: string, name: string): DynamicContextItemRow | undefined;
    /**
     * Atomically increment read_count for a specific dynamic context item.
     * Returns true if the item existed and was updated.
     */
    incrementDynamicContextReadCount(repository: string, branch: string, src: string, name: string): boolean;
    /**
     * Atomically increment count for all dynamic context items matching a repository+branch.
     * Called at session start to track how many sessions have loaded this board.
     */
    incrementDynamicContextCount(repository: string, branch: string): void;
    /**
     * Insert a dynamic context item. Returns false if an item with the same
     * (repository, branch, src, name) already exists (no overwrite).
     */
    insertDynamicContextItem(item: DynamicContextItemRow): boolean;
    /**
     * Insert or update a dynamic context item.
     */
    upsertDynamicContextItem(item: DynamicContextItemRow): void;
    /**
     * Delete a dynamic context item. Returns true if an item was deleted, false if not found.
     */
    deleteDynamicContextItem(repository: string, branch: string, src: string, name: string): boolean;
    /**
     * Index a workspace artifact (e.g. plan.md, context files) for full-text search.
     * Content is upserted: subsequent writes to the same file replace the previous index entry.
     */
    indexWorkspaceArtifact(sessionId: string, filePath: string, content: string): void;
    /**
     * Full-text search across all indexed content (turns, checkpoint sections, and workspace artifacts).
     * Uses FTS5 MATCH with BM25 ranking.
     *
     * @param query FTS5 query string (supports AND, OR, NOT, phrase "..." etc.)
     * @param limit Maximum results to return (default 20)
     */
    search(query: string, limit?: number): SearchResult[];
    /**
     * Get a session by ID.
     */
    getSession(sessionId: string): SessionRow | undefined;
    /**
     * Get all turns for a session, ordered by turn index.
     */
    getTurns(sessionId: string): TurnRow[];
    /**
     * Get all checkpoints for a session, ordered by checkpoint number.
     */
    getCheckpoints(sessionId: string): CheckpointRow[];
    /**
     * Get all files touched in a session.
     */
    getFiles(sessionId: string): FileRow[];
    /**
     * Get all refs for a session.
     */
    getRefs(sessionId: string): RefRow[];
    /**
     * Execute a raw read-only SQL query against the store.
     * Uses SQLite's authorizer API to enforce read-only access at the engine level,
     * blocking INSERT, UPDATE, DELETE, DROP, CREATE, ATTACH, PRAGMA, etc.
     */
    executeReadOnly(sql: string): Record<string, unknown>[];
    /**
     * Get the highest turn_index for a session, or -1 if no turns exist.
     */
    getMaxTurnIndex(sessionId: string): number;
    /**
     * Get basic stats about the store.
     */
    getStats(): {
        sessions: number;
        turns: number;
        checkpoints: number;
        files: number;
        refs: number;
    };
    /**
     * Execute a raw SQL statement (e.g., BEGIN, COMMIT, ROLLBACK).
     */
    exec(sql: string): void;
    /**
     * Run a function inside a SQLite transaction (BEGIN/COMMIT/ROLLBACK).
     * All writes are batched into a single atomic commit, which is significantly
     * faster than auto-committing each individual INSERT.
     */
    runInTransaction(fn: () => void): void;
    /**
     * Close the database connection.
     *
     * Runs a WAL checkpoint before closing so that all pending writes are
     * flushed to the main database file and the WAL file is truncated. This
     * is important on Windows where the OS may not release file handles for
     * the `.db-wal` / `.db-shm` files until all dirty pages are written,
     * which can otherwise cause `EPERM` errors when callers delete the
     * database directory immediately after close().
     */
    close(): void;
}

declare type SessionStoreSqlInput = z_2.infer<typeof inputSchema>;

declare const SessionStoreSqlToolName = "session_store_sql";

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.task_complete">;
    data: z.ZodObject<{
        summary: z.ZodDefault<z.ZodString>;
        success: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        summary: string;
        success?: boolean | undefined;
    }, {
        summary?: string | undefined;
        success?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.task_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        summary: string;
        success?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.task_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        summary?: string | undefined;
        success?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionTasksApi = ApiSchemaToInterface<typeof sessionTasksApiSchema>;

declare const sessionTasksApiSchema: {
    startAgent: {
        description: string;
        params: z_2.ZodObject<{
            agentType: z_2.ZodString;
            prompt: z_2.ZodString;
            name: z_2.ZodString;
            description: z_2.ZodOptional<z_2.ZodString>;
            model: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            name: string;
            prompt: string;
            agentType: string;
            description?: string | undefined;
            model?: string | undefined;
        }, {
            name: string;
            prompt: string;
            agentType: string;
            description?: string | undefined;
            model?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            agentId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            agentId: string;
        }, {
            agentId: string;
        }>;
    };
    list: {
        description: string;
        result: z_2.ZodObject<{
            tasks: z_2.ZodArray<z_2.ZodDiscriminatedUnion<"type", [z_2.ZodObject<{
                type: z_2.ZodLiteral<"agent">;
                id: z_2.ZodString;
                toolCallId: z_2.ZodString;
                description: z_2.ZodString;
                status: z_2.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>;
                startedAt: z_2.ZodString;
                completedAt: z_2.ZodOptional<z_2.ZodString>;
                activeTimeMs: z_2.ZodOptional<z_2.ZodNumber>;
                activeStartedAt: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                agentType: z_2.ZodString;
                prompt: z_2.ZodString;
                result: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                resolvedModel: z_2.ZodOptional<z_2.ZodString>;
                executionMode: z_2.ZodOptional<z_2.ZodEnum<["sync", "background"]>>;
                canPromoteToBackground: z_2.ZodOptional<z_2.ZodBoolean>;
                latestResponse: z_2.ZodOptional<z_2.ZodString>;
                idleSince: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            }, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"shell">;
                id: z_2.ZodString;
                description: z_2.ZodString;
                status: z_2.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>;
                startedAt: z_2.ZodString;
                completedAt: z_2.ZodOptional<z_2.ZodString>;
                command: z_2.ZodString;
                attachmentMode: z_2.ZodEnum<["attached", "detached"]>;
                executionMode: z_2.ZodOptional<z_2.ZodEnum<["sync", "background"]>>;
                canPromoteToBackground: z_2.ZodOptional<z_2.ZodBoolean>;
                logPath: z_2.ZodOptional<z_2.ZodString>;
                pid: z_2.ZodOptional<z_2.ZodNumber>;
            }, "strip", z_2.ZodTypeAny, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            }, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            }>]>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            tasks: ({
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            } | {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            })[];
        }, {
            tasks: ({
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            } | {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            })[];
        }>;
    };
    refresh: {
        description: string;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    waitForPending: {
        description: string;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    getProgress: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
        result: z_2.ZodObject<{
            progress: z_2.ZodNullable<z_2.ZodDiscriminatedUnion<"type", [z_2.ZodObject<{
                type: z_2.ZodLiteral<"agent">;
                recentActivity: z_2.ZodArray<z_2.ZodObject<{
                    message: z_2.ZodString;
                    timestamp: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    message: string;
                    timestamp: string;
                }, {
                    message: string;
                    timestamp: string;
                }>, "many">;
                latestIntent: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                type: "agent";
                recentActivity: {
                    message: string;
                    timestamp: string;
                }[];
                latestIntent?: string | undefined;
            }, {
                type: "agent";
                recentActivity: {
                    message: string;
                    timestamp: string;
                }[];
                latestIntent?: string | undefined;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"shell">;
                recentOutput: z_2.ZodString;
                pid: z_2.ZodOptional<z_2.ZodNumber>;
            }, "strip", z_2.ZodTypeAny, {
                type: "shell";
                recentOutput: string;
                pid?: number | undefined;
            }, {
                type: "shell";
                recentOutput: string;
                pid?: number | undefined;
            }>]>>;
        }, "strip", z_2.ZodTypeAny, {
            progress: {
                type: "agent";
                recentActivity: {
                    message: string;
                    timestamp: string;
                }[];
                latestIntent?: string | undefined;
            } | {
                type: "shell";
                recentOutput: string;
                pid?: number | undefined;
            } | null;
        }, {
            progress: {
                type: "agent";
                recentActivity: {
                    message: string;
                    timestamp: string;
                }[];
                latestIntent?: string | undefined;
            } | {
                type: "shell";
                recentOutput: string;
                pid?: number | undefined;
            } | null;
        }>;
    };
    getCurrentPromotable: {
        description: string;
        result: z_2.ZodObject<{
            task: z_2.ZodOptional<z_2.ZodDiscriminatedUnion<"type", [z_2.ZodObject<{
                type: z_2.ZodLiteral<"agent">;
                id: z_2.ZodString;
                toolCallId: z_2.ZodString;
                description: z_2.ZodString;
                status: z_2.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>;
                startedAt: z_2.ZodString;
                completedAt: z_2.ZodOptional<z_2.ZodString>;
                activeTimeMs: z_2.ZodOptional<z_2.ZodNumber>;
                activeStartedAt: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                agentType: z_2.ZodString;
                prompt: z_2.ZodString;
                result: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                resolvedModel: z_2.ZodOptional<z_2.ZodString>;
                executionMode: z_2.ZodOptional<z_2.ZodEnum<["sync", "background"]>>;
                canPromoteToBackground: z_2.ZodOptional<z_2.ZodBoolean>;
                latestResponse: z_2.ZodOptional<z_2.ZodString>;
                idleSince: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            }, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"shell">;
                id: z_2.ZodString;
                description: z_2.ZodString;
                status: z_2.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>;
                startedAt: z_2.ZodString;
                completedAt: z_2.ZodOptional<z_2.ZodString>;
                command: z_2.ZodString;
                attachmentMode: z_2.ZodEnum<["attached", "detached"]>;
                executionMode: z_2.ZodOptional<z_2.ZodEnum<["sync", "background"]>>;
                canPromoteToBackground: z_2.ZodOptional<z_2.ZodBoolean>;
                logPath: z_2.ZodOptional<z_2.ZodString>;
                pid: z_2.ZodOptional<z_2.ZodNumber>;
            }, "strip", z_2.ZodTypeAny, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            }, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            }>]>>;
        }, "strip", z_2.ZodTypeAny, {
            task?: {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            } | {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            } | undefined;
        }, {
            task?: {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            } | {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            } | undefined;
        }>;
    };
    promoteToBackground: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
        result: z_2.ZodObject<{
            promoted: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            promoted: boolean;
        }, {
            promoted: boolean;
        }>;
    };
    promoteCurrentToBackground: {
        description: string;
        result: z_2.ZodObject<{
            task: z_2.ZodOptional<z_2.ZodDiscriminatedUnion<"type", [z_2.ZodObject<{
                type: z_2.ZodLiteral<"agent">;
                id: z_2.ZodString;
                toolCallId: z_2.ZodString;
                description: z_2.ZodString;
                status: z_2.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>;
                startedAt: z_2.ZodString;
                completedAt: z_2.ZodOptional<z_2.ZodString>;
                activeTimeMs: z_2.ZodOptional<z_2.ZodNumber>;
                activeStartedAt: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                agentType: z_2.ZodString;
                prompt: z_2.ZodString;
                result: z_2.ZodOptional<z_2.ZodString>;
                model: z_2.ZodOptional<z_2.ZodString>;
                resolvedModel: z_2.ZodOptional<z_2.ZodString>;
                executionMode: z_2.ZodOptional<z_2.ZodEnum<["sync", "background"]>>;
                canPromoteToBackground: z_2.ZodOptional<z_2.ZodBoolean>;
                latestResponse: z_2.ZodOptional<z_2.ZodString>;
                idleSince: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            }, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            }>, z_2.ZodObject<{
                type: z_2.ZodLiteral<"shell">;
                id: z_2.ZodString;
                description: z_2.ZodString;
                status: z_2.ZodEnum<["running", "idle", "completed", "failed", "cancelled"]>;
                startedAt: z_2.ZodString;
                completedAt: z_2.ZodOptional<z_2.ZodString>;
                command: z_2.ZodString;
                attachmentMode: z_2.ZodEnum<["attached", "detached"]>;
                executionMode: z_2.ZodOptional<z_2.ZodEnum<["sync", "background"]>>;
                canPromoteToBackground: z_2.ZodOptional<z_2.ZodBoolean>;
                logPath: z_2.ZodOptional<z_2.ZodString>;
                pid: z_2.ZodOptional<z_2.ZodNumber>;
            }, "strip", z_2.ZodTypeAny, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            }, {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            }>]>>;
        }, "strip", z_2.ZodTypeAny, {
            task?: {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            } | {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            } | undefined;
        }, {
            task?: {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "agent";
                description: string;
                prompt: string;
                id: string;
                toolCallId: string;
                agentType: string;
                startedAt: string;
                result?: string | undefined;
                error?: string | undefined;
                model?: string | undefined;
                executionMode?: "sync" | "background" | undefined;
                latestResponse?: string | undefined;
                activeStartedAt?: string | undefined;
                resolvedModel?: string | undefined;
                completedAt?: string | undefined;
                activeTimeMs?: number | undefined;
                canPromoteToBackground?: boolean | undefined;
                idleSince?: string | undefined;
            } | {
                status: "completed" | "failed" | "cancelled" | "running" | "idle";
                type: "shell";
                description: string;
                command: string;
                id: string;
                startedAt: string;
                attachmentMode: "detached" | "attached";
                executionMode?: "sync" | "background" | undefined;
                pid?: number | undefined;
                logPath?: string | undefined;
                completedAt?: string | undefined;
                canPromoteToBackground?: boolean | undefined;
            } | undefined;
        }>;
    };
    cancel: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
        result: z_2.ZodObject<{
            cancelled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            cancelled: boolean;
        }, {
            cancelled: boolean;
        }>;
    };
    remove: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            id: string;
        }, {
            id: string;
        }>;
        result: z_2.ZodObject<{
            removed: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            removed: boolean;
        }, {
            removed: boolean;
        }>;
    };
    sendMessage: {
        description: string;
        params: z_2.ZodObject<{
            id: z_2.ZodString;
            message: z_2.ZodString;
            fromAgentId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            message: string;
            id: string;
            fromAgentId?: string | undefined;
        }, {
            message: string;
            id: string;
            fromAgentId?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            sent: z_2.ZodBoolean;
            error: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            sent: boolean;
            error?: string | undefined;
        }, {
            sent: boolean;
            error?: string | 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;
    /** Current working directory context, enriched into all restricted telemetry events */
    private workingDirectoryContext;
    /** Idle timeout after which the engagement ID is rotated (1 hour) */
    static readonly ENGAGEMENT_IDLE_TIMEOUT_MS: number;
    /**
     * Engagement ID — resets on CLI launch, session switch (/new, /resume),
     * and after {@link ENGAGEMENT_IDLE_TIMEOUT_MS} of user inactivity. Can
     * be inherited from a parent session via
     * {@link SessionTelemetryOptions.detachedFromSpawningParentEngagementId} so detached child
     * runs (e.g. shutdown rem-agent consolidation) group under the parent's
     * engagement for analytics.
     */
    private engagementId;
    /** Timestamp (ms) of the last session activity, used for idle-timeout detection */
    private lastSessionActivityTimestamp;
    /** Memory usage tracking */
    private assistantTurnCount;
    private maxRssBytes;
    /** Subagent usage tracking for experiment triggering conditions */
    private subagentStartCount;
    private backgroundSubagentCount;
    private modelsUsed;
    private readonly enableRestrictedTelemetry;
    /** User config for tracking config-file feature toggles */
    private readonly config;
    /** Whether remote was enabled by config settings (not explicit --remote flag) */
    private readonly remoteDefaultedOn;
    /** Whether remote exporting is enabled */
    private readonly remoteExporting;
    /** First launch timestamp, from GlobalState */
    private readonly firstLaunchAt;
    private telemetryFeatureOverrides;
    private sessionCorrelationProperties;
    constructor(telemetryService: TelemetryService, session: LocalSession, options: SessionTelemetryOptions | undefined, featureFlagService: IFeatureFlagService);
    dispose(): void;
    setExtraFeatures(features: Record<string, string>): void;
    setInternalCorrelationIds(internalCorrelationIds: SessionCorrelationIds | undefined): 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, 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.
     */
    private sendTelemetryAfterExp;
    private withSessionCorrelationProperties;
    /**
     * Sends a telemetry event immediately without waiting for ExP context.
     */
    private sendTelemetryImmediate;
    /** Options to pass through to the telemetry service with each hydro event */
    private get hydroOptions();
    private getPrefilledHydroFields;
    private getRestrictedRepositoryContext;
    /**
     * Rotates the engagement ID if the session has been idle longer than
     * {@link ENGAGEMENT_IDLE_TIMEOUT_MS} since the last activity.
     */
    private refreshEngagementId;
    /**
     * Returns the current engagement ID. Used by the parent CLI to
     * forward its engagement to a detached child (rem-agent on shutdown)
     * so the two processes' telemetry rolls up under the same engagement.
     */
    getEngagementId(): string;
    private recordSessionActivity;
    private handleEvent;
    private forwardEventToTelemetry;
    private handleSessionError;
    private maybeEmitMemoryUsage;
    private maybeEmitDynamicInstructionsTotal;
    private emitSubagentParallelismTriggered;
    private trackToolCallInfo;
    private handleToolCallExecuted;
}

declare type SessionTelemetryApi = ApiSchemaToInterface<typeof sessionTelemetryApiSchema>;

declare const sessionTelemetryApiSchema: {
    getEngagementId: {
        description: string;
        result: z_2.ZodObject<{
            engagementId: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            engagementId?: string | undefined;
        }, {
            engagementId?: string | undefined;
        }>;
    };
    setFeatureOverrides: {
        description: string;
        params: z_2.ZodObject<{
            features: z_2.ZodRecord<z_2.ZodString, z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            features: Record<string, string>;
        }, {
            features: Record<string, string>;
        }>;
    };
};

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?: UserSettings;
    /** Whether remote steering was enabled by default via config settings rather than an explicit --remote flag. */
    remoteDefaultedOn?: boolean;
    /** Whether remote exporting (with or without steering) is enabled for this session. */
    remoteExporting?: boolean;
    /** First launch timestamp, from GlobalState */
    firstLaunchAt?: Date;
    /**
     * Optional engagement ID inherited from a parent session. When set, this
     * SessionTelemetry adopts it instead of generating a fresh UUID, so a
     * detached child run (e.g. shutdown rem-agent) groups under the same
     * engagement as the parent for analytics. Caller is responsible for
     * UUID validation; the value is trusted and used as-is. Mirrors the
     * `detachedFromSpawningParentSessionId` rollup pattern.
     */
    detachedFromSpawningParentEngagementId?: string;
}

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>;
    agentId: z.ZodOptional<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, {
    type: "session.title_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        title: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.title_changed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        title: string;
    };
    agentId?: string | undefined;
}>;

declare type SessionToolsApi = ApiSchemaToInterface<typeof sessionToolsApiSchema>;

declare const sessionToolsApiSchema: {
    handlePendingToolCall: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            result: z_2.ZodOptional<z_2.ZodUnion<[z_2.ZodString, z_2.ZodObject<{
                textResultForLlm: z_2.ZodString;
                resultType: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                sessionLog: z_2.ZodOptional<z_2.ZodString>;
                toolTelemetry: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                binaryResultsForLlm: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    type: z_2.ZodEnum<["image", "resource"]>;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    metadata: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }>, "many">>;
                contents: z_2.ZodOptional<z_2.ZodArray<z_2.ZodUnion<[z_2.ZodObject<{
                    type: z_2.ZodLiteral<"text">;
                    text: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "text";
                    text: string;
                }, {
                    type: "text";
                    text: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"terminal">;
                    text: z_2.ZodString;
                    exitCode: z_2.ZodOptional<z_2.ZodNumber>;
                    cwd: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"image">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"audio">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    icons: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                        src: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        sizes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                    }, "strip", z_2.ZodTypeAny, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }>, "many">>;
                    name: z_2.ZodString;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    uri: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    mimeType: z_2.ZodOptional<z_2.ZodString>;
                    size: z_2.ZodOptional<z_2.ZodNumber>;
                } & {
                    type: z_2.ZodLiteral<"resource_link">;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"resource">;
                    resource: z_2.ZodUnion<[z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        text: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>, z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        blob: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>]>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }>]>, "many">>;
            }, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{
                textResultForLlm: z_2.ZodString;
                resultType: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                sessionLog: z_2.ZodOptional<z_2.ZodString>;
                toolTelemetry: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                binaryResultsForLlm: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    type: z_2.ZodEnum<["image", "resource"]>;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    metadata: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }>, "many">>;
                contents: z_2.ZodOptional<z_2.ZodArray<z_2.ZodUnion<[z_2.ZodObject<{
                    type: z_2.ZodLiteral<"text">;
                    text: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "text";
                    text: string;
                }, {
                    type: "text";
                    text: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"terminal">;
                    text: z_2.ZodString;
                    exitCode: z_2.ZodOptional<z_2.ZodNumber>;
                    cwd: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"image">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"audio">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    icons: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                        src: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        sizes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                    }, "strip", z_2.ZodTypeAny, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }>, "many">>;
                    name: z_2.ZodString;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    uri: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    mimeType: z_2.ZodOptional<z_2.ZodString>;
                    size: z_2.ZodOptional<z_2.ZodNumber>;
                } & {
                    type: z_2.ZodLiteral<"resource_link">;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"resource">;
                    resource: z_2.ZodUnion<[z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        text: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>, z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        blob: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>]>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }>]>, "many">>;
            }, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{
                textResultForLlm: z_2.ZodString;
                resultType: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                sessionLog: z_2.ZodOptional<z_2.ZodString>;
                toolTelemetry: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                binaryResultsForLlm: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    type: z_2.ZodEnum<["image", "resource"]>;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    metadata: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }>, "many">>;
                contents: z_2.ZodOptional<z_2.ZodArray<z_2.ZodUnion<[z_2.ZodObject<{
                    type: z_2.ZodLiteral<"text">;
                    text: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "text";
                    text: string;
                }, {
                    type: "text";
                    text: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"terminal">;
                    text: z_2.ZodString;
                    exitCode: z_2.ZodOptional<z_2.ZodNumber>;
                    cwd: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"image">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"audio">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    icons: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                        src: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        sizes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                    }, "strip", z_2.ZodTypeAny, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }>, "many">>;
                    name: z_2.ZodString;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    uri: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    mimeType: z_2.ZodOptional<z_2.ZodString>;
                    size: z_2.ZodOptional<z_2.ZodNumber>;
                } & {
                    type: z_2.ZodLiteral<"resource_link">;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"resource">;
                    resource: z_2.ZodUnion<[z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        text: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>, z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        blob: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>]>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }>]>, "many">>;
            }, z_2.ZodTypeAny, "passthrough">>]>>;
            error: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            result?: string | z_2.objectOutputType<{
                textResultForLlm: z_2.ZodString;
                resultType: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                sessionLog: z_2.ZodOptional<z_2.ZodString>;
                toolTelemetry: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                binaryResultsForLlm: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    type: z_2.ZodEnum<["image", "resource"]>;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    metadata: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }>, "many">>;
                contents: z_2.ZodOptional<z_2.ZodArray<z_2.ZodUnion<[z_2.ZodObject<{
                    type: z_2.ZodLiteral<"text">;
                    text: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "text";
                    text: string;
                }, {
                    type: "text";
                    text: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"terminal">;
                    text: z_2.ZodString;
                    exitCode: z_2.ZodOptional<z_2.ZodNumber>;
                    cwd: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"image">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"audio">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    icons: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                        src: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        sizes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                    }, "strip", z_2.ZodTypeAny, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }>, "many">>;
                    name: z_2.ZodString;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    uri: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    mimeType: z_2.ZodOptional<z_2.ZodString>;
                    size: z_2.ZodOptional<z_2.ZodNumber>;
                } & {
                    type: z_2.ZodLiteral<"resource_link">;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"resource">;
                    resource: z_2.ZodUnion<[z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        text: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>, z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        blob: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>]>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }>]>, "many">>;
            }, z_2.ZodTypeAny, "passthrough"> | undefined;
            error?: string | undefined;
        }, {
            requestId: string;
            result?: string | z_2.objectInputType<{
                textResultForLlm: z_2.ZodString;
                resultType: z_2.ZodOptional<z_2.ZodString>;
                error: z_2.ZodOptional<z_2.ZodString>;
                sessionLog: z_2.ZodOptional<z_2.ZodString>;
                toolTelemetry: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                binaryResultsForLlm: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                    type: z_2.ZodEnum<["image", "resource"]>;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    metadata: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }, {
                    type: "image" | "resource";
                    data: string;
                    mimeType: string;
                    description?: string | undefined;
                    metadata?: Record<string, unknown> | undefined;
                }>, "many">>;
                contents: z_2.ZodOptional<z_2.ZodArray<z_2.ZodUnion<[z_2.ZodObject<{
                    type: z_2.ZodLiteral<"text">;
                    text: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "text";
                    text: string;
                }, {
                    type: "text";
                    text: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"terminal">;
                    text: z_2.ZodString;
                    exitCode: z_2.ZodOptional<z_2.ZodNumber>;
                    cwd: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }, {
                    type: "terminal";
                    text: string;
                    cwd?: string | undefined;
                    exitCode?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"image">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }, {
                    type: "image";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"audio">;
                    data: z_2.ZodString;
                    mimeType: z_2.ZodString;
                }, "strip", z_2.ZodTypeAny, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }, {
                    type: "audio";
                    data: string;
                    mimeType: string;
                }>, z_2.ZodObject<{
                    icons: z_2.ZodOptional<z_2.ZodArray<z_2.ZodObject<{
                        src: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        sizes: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                        theme: z_2.ZodOptional<z_2.ZodEnum<["light", "dark"]>>;
                    }, "strip", z_2.ZodTypeAny, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }, {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }>, "many">>;
                    name: z_2.ZodString;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    uri: z_2.ZodString;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    mimeType: z_2.ZodOptional<z_2.ZodString>;
                    size: z_2.ZodOptional<z_2.ZodNumber>;
                } & {
                    type: z_2.ZodLiteral<"resource_link">;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }, {
                    type: "resource_link";
                    name: string;
                    uri: string;
                    description?: string | undefined;
                    title?: string | undefined;
                    mimeType?: string | undefined;
                    icons?: {
                        src: string;
                        theme?: "dark" | "light" | undefined;
                        mimeType?: string | undefined;
                        sizes?: string[] | undefined;
                    }[] | undefined;
                    size?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"resource">;
                    resource: z_2.ZodUnion<[z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        text: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>, z_2.ZodObject<{
                        uri: z_2.ZodString;
                        mimeType: z_2.ZodOptional<z_2.ZodString>;
                        blob: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }, {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    }>]>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }, {
                    type: "resource";
                    resource: {
                        text: string;
                        uri: string;
                        mimeType?: string | undefined;
                    } | {
                        blob: string;
                        uri: string;
                        mimeType?: string | undefined;
                    };
                }>]>, "many">>;
            }, z_2.ZodTypeAny, "passthrough"> | undefined;
            error?: string | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    initializeAndValidate: {
        description: string;
        result: z_2.ZodObject<{}, "strip", z_2.ZodTypeAny, {}, {}>;
    };
    getCurrentMetadata: {
        description: string;
        result: z_2.ZodObject<{
            tools: z_2.ZodNullable<z_2.ZodArray<z_2.ZodObject<{
                name: z_2.ZodString;
                namespacedName: z_2.ZodOptional<z_2.ZodString>;
                mcpServerName: z_2.ZodOptional<z_2.ZodString>;
                mcpToolName: z_2.ZodOptional<z_2.ZodString>;
                description: z_2.ZodString;
                input_schema: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnknown>>;
                deferLoading: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                name: string;
                description: string;
                mcpServerName?: string | undefined;
                mcpToolName?: string | undefined;
                namespacedName?: string | undefined;
                input_schema?: Record<string, unknown> | undefined;
                deferLoading?: boolean | undefined;
            }, {
                name: string;
                description: string;
                mcpServerName?: string | undefined;
                mcpToolName?: string | undefined;
                namespacedName?: string | undefined;
                input_schema?: Record<string, unknown> | undefined;
                deferLoading?: boolean | undefined;
            }>, "many">>;
        }, "strip", z_2.ZodTypeAny, {
            tools: {
                name: string;
                description: string;
                mcpServerName?: string | undefined;
                mcpToolName?: string | undefined;
                namespacedName?: string | undefined;
                input_schema?: Record<string, unknown> | undefined;
                deferLoading?: boolean | undefined;
            }[] | null;
        }, {
            tools: {
                name: string;
                description: string;
                mcpServerName?: string | undefined;
                mcpToolName?: string | undefined;
                namespacedName?: string | undefined;
                input_schema?: Record<string, unknown> | undefined;
                deferLoading?: boolean | undefined;
            }[] | null;
        }>;
    };
};

export declare type SessionToolsUpdatedEvent = z.infer<typeof SessionToolsUpdatedEventSchema>;

/**
 * Emitted when the set of available tools changes (e.g., MCP tools added/removed,
 * model change, custom agent selection). Subscribers should call `session.getToolDefinitions()`
 * to retrieve the updated tool list.
 */
declare const SessionToolsUpdatedEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    agentId: z.ZodOptional<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, {
    type: "session.tools_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
    };
    agentId?: string | undefined;
}, {
    type: "session.tools_updated";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        model: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.truncation">;
    data: z.ZodObject<{
        tokenLimit: z.ZodNumber;
        preTruncationTokensInMessages: z.ZodNumber;
        preTruncationMessagesLength: z.ZodNumber;
        postTruncationTokensInMessages: z.ZodNumber;
        postTruncationMessagesLength: z.ZodNumber;
        tokensRemovedDuringTruncation: z.ZodNumber;
        messagesRemovedDuringTruncation: z.ZodNumber;
        performedBy: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }, {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.truncation";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.truncation";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        preTruncationTokensInMessages: number;
        preTruncationMessagesLength: number;
        postTruncationTokensInMessages: number;
        postTruncationMessagesLength: number;
        tokensRemovedDuringTruncation: number;
        messagesRemovedDuringTruncation: number;
        performedBy: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionUiApi = ApiSchemaToInterface<typeof sessionUiApiSchema>;

declare const sessionUiApiSchema: {
    ephemeralQuery: {
        description: string;
        params: z_2.ZodObject<{
            question: z_2.ZodString;
            onChunk: z_2.ZodOptional<z_2.ZodUnknown>;
            abortSignal: z_2.ZodOptional<z_2.ZodUnknown>;
        }, "strip", z_2.ZodTypeAny, {
            question: string;
            abortSignal?: unknown;
            onChunk?: unknown;
        }, {
            question: string;
            abortSignal?: unknown;
            onChunk?: unknown;
        }>;
        result: z_2.ZodObject<{
            answer: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            answer: string;
        }, {
            answer: string;
        }>;
    };
    elicitation: {
        description: string;
        params: z_2.ZodObject<{
            message: z_2.ZodString;
            requestedSchema: z_2.ZodObject<{
                type: z_2.ZodLiteral<"object">;
                properties: z_2.ZodRecord<z_2.ZodString, z_2.ZodUnion<[z_2.ZodObject<{
                    type: z_2.ZodLiteral<"string">;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    enum: z_2.ZodArray<z_2.ZodString, "many">;
                    enumNames: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                    default: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.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;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"string">;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    oneOf: z_2.ZodArray<z_2.ZodObject<{
                        const: z_2.ZodString;
                        title: z_2.ZodString;
                    }, "strip", z_2.ZodTypeAny, {
                        title: string;
                        const: string;
                    }, {
                        title: string;
                        const: string;
                    }>, "many">;
                    default: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.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;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"array">;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    minItems: z_2.ZodOptional<z_2.ZodNumber>;
                    maxItems: z_2.ZodOptional<z_2.ZodNumber>;
                    items: z_2.ZodObject<{
                        type: z_2.ZodLiteral<"string">;
                        enum: z_2.ZodArray<z_2.ZodString, "many">;
                    }, "strip", z_2.ZodTypeAny, {
                        type: "string";
                        enum: string[];
                    }, {
                        type: "string";
                        enum: string[];
                    }>;
                    default: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "array";
                    items: {
                        type: "string";
                        enum: string[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                }, {
                    type: "array";
                    items: {
                        type: "string";
                        enum: string[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"array">;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    minItems: z_2.ZodOptional<z_2.ZodNumber>;
                    maxItems: z_2.ZodOptional<z_2.ZodNumber>;
                    items: z_2.ZodObject<{
                        anyOf: z_2.ZodArray<z_2.ZodObject<{
                            const: z_2.ZodString;
                            title: z_2.ZodString;
                        }, "strip", z_2.ZodTypeAny, {
                            title: string;
                            const: string;
                        }, {
                            title: string;
                            const: string;
                        }>, "many">;
                    }, "strip", z_2.ZodTypeAny, {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    }, {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    }>;
                    default: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "array";
                    items: {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                }, {
                    type: "array";
                    items: {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"boolean">;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    default: z_2.ZodOptional<z_2.ZodBoolean>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "boolean";
                    default?: boolean | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                }, {
                    type: "boolean";
                    default?: boolean | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodLiteral<"string">;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    minLength: z_2.ZodOptional<z_2.ZodNumber>;
                    maxLength: z_2.ZodOptional<z_2.ZodNumber>;
                    format: z_2.ZodOptional<z_2.ZodEnum<["email", "uri", "date", "date-time"]>>;
                    default: z_2.ZodOptional<z_2.ZodString>;
                }, "strip", z_2.ZodTypeAny, {
                    type: "string";
                    default?: string | undefined;
                    description?: string | undefined;
                    minLength?: number | undefined;
                    maxLength?: number | undefined;
                    title?: string | undefined;
                    format?: "date" | "email" | "uri" | "date-time" | undefined;
                }, {
                    type: "string";
                    default?: string | undefined;
                    description?: string | undefined;
                    minLength?: number | undefined;
                    maxLength?: number | undefined;
                    title?: string | undefined;
                    format?: "date" | "email" | "uri" | "date-time" | undefined;
                }>, z_2.ZodObject<{
                    type: z_2.ZodEnum<["number", "integer"]>;
                    title: z_2.ZodOptional<z_2.ZodString>;
                    description: z_2.ZodOptional<z_2.ZodString>;
                    minimum: z_2.ZodOptional<z_2.ZodNumber>;
                    maximum: z_2.ZodOptional<z_2.ZodNumber>;
                    default: z_2.ZodOptional<z_2.ZodNumber>;
                }, "strip", z_2.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: z_2.ZodOptional<z_2.ZodArray<z_2.ZodString, "many">>;
            }, "strip", z_2.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;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "array";
                    items: {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "boolean";
                    default?: boolean | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                } | {
                    type: "string";
                    default?: string | undefined;
                    description?: string | undefined;
                    minLength?: number | undefined;
                    maxLength?: number | 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;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "array";
                    items: {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "boolean";
                    default?: boolean | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                } | {
                    type: "string";
                    default?: string | undefined;
                    description?: string | undefined;
                    minLength?: number | undefined;
                    maxLength?: number | 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", z_2.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;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "array";
                    items: {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "boolean";
                    default?: boolean | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                } | {
                    type: "string";
                    default?: string | undefined;
                    description?: string | undefined;
                    minLength?: number | undefined;
                    maxLength?: number | 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;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "array";
                    items: {
                        anyOf: {
                            title: string;
                            const: string;
                        }[];
                    };
                    default?: string[] | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                    maxItems?: number | undefined;
                    minItems?: number | undefined;
                } | {
                    type: "boolean";
                    default?: boolean | undefined;
                    description?: string | undefined;
                    title?: string | undefined;
                } | {
                    type: "string";
                    default?: string | undefined;
                    description?: string | undefined;
                    minLength?: number | undefined;
                    maxLength?: number | 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: z_2.ZodObject<{
            action: z_2.ZodEnum<["accept", "decline", "cancel"]>;
            content: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnion<[z_2.ZodString, z_2.ZodNumber, z_2.ZodBoolean, z_2.ZodArray<z_2.ZodString, "many">]>>>;
        }, "strip", z_2.ZodTypeAny, {
            action: "accept" | "decline" | "cancel";
            content?: Record<string, string | number | boolean | string[]> | undefined;
        }, {
            action: "accept" | "decline" | "cancel";
            content?: Record<string, string | number | boolean | string[]> | undefined;
        }>;
    };
    handlePendingElicitation: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            result: z_2.ZodObject<{
                action: z_2.ZodEnum<["accept", "decline", "cancel"]>;
                content: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodUnion<[z_2.ZodString, z_2.ZodNumber, z_2.ZodBoolean, z_2.ZodArray<z_2.ZodString, "many">]>>>;
            }, "strip", z_2.ZodTypeAny, {
                action: "accept" | "decline" | "cancel";
                content?: Record<string, string | number | boolean | string[]> | undefined;
            }, {
                action: "accept" | "decline" | "cancel";
                content?: Record<string, string | number | boolean | string[]> | undefined;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            result: {
                action: "accept" | "decline" | "cancel";
                content?: Record<string, string | number | boolean | string[]> | undefined;
            };
            requestId: string;
        }, {
            result: {
                action: "accept" | "decline" | "cancel";
                content?: Record<string, string | number | boolean | string[]> | undefined;
            };
            requestId: string;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    handlePendingUserInput: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            response: z_2.ZodObject<{
                answer: z_2.ZodString;
                wasFreeform: z_2.ZodBoolean;
            }, "strip", z_2.ZodTypeAny, {
                answer: string;
                wasFreeform: boolean;
            }, {
                answer: string;
                wasFreeform: boolean;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            response: {
                answer: string;
                wasFreeform: boolean;
            };
        }, {
            requestId: string;
            response: {
                answer: string;
                wasFreeform: boolean;
            };
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    handlePendingSampling: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            response: z_2.ZodOptional<z_2.ZodObject<{}, "passthrough", z_2.ZodTypeAny, z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough">, z_2.objectInputType<{}, z_2.ZodTypeAny, "passthrough">>>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            response?: z_2.objectOutputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
        }, {
            requestId: string;
            response?: z_2.objectInputType<{}, z_2.ZodTypeAny, "passthrough"> | undefined;
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    handlePendingAutoModeSwitch: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            response: z_2.ZodEnum<["yes", "yes_always", "no"]>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            response: "yes" | "yes_always" | "no";
        }, {
            requestId: string;
            response: "yes" | "yes_always" | "no";
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    handlePendingExitPlanMode: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            response: z_2.ZodObject<{
                approved: z_2.ZodBoolean;
                selectedAction: z_2.ZodOptional<z_2.ZodEnum<["exit_only", "interactive", "autopilot", "autopilot_fleet"]>>;
                autoApproveEdits: z_2.ZodOptional<z_2.ZodBoolean>;
                feedback: z_2.ZodOptional<z_2.ZodString>;
            }, "strip", z_2.ZodTypeAny, {
                approved: boolean;
                feedback?: string | undefined;
                selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                autoApproveEdits?: boolean | undefined;
            }, {
                approved: boolean;
                feedback?: string | undefined;
                selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                autoApproveEdits?: boolean | undefined;
            }>;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
            response: {
                approved: boolean;
                feedback?: string | undefined;
                selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                autoApproveEdits?: boolean | undefined;
            };
        }, {
            requestId: string;
            response: {
                approved: boolean;
                feedback?: string | undefined;
                selectedAction?: "exit_only" | "interactive" | "autopilot" | "autopilot_fleet" | undefined;
                autoApproveEdits?: boolean | undefined;
            };
        }>;
        result: z_2.ZodObject<{
            success: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
        }, {
            success: boolean;
        }>;
    };
    registerDirectAutoModeSwitchHandler: {
        description: string;
        result: z_2.ZodObject<{
            handle: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            handle: string;
        }, {
            handle: string;
        }>;
    };
    unregisterDirectAutoModeSwitchHandler: {
        description: string;
        params: z_2.ZodObject<{
            handle: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            handle: string;
        }, {
            handle: string;
        }>;
        result: z_2.ZodObject<{
            unregistered: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            unregistered: boolean;
        }, {
            unregistered: boolean;
        }>;
    };
};

declare type SessionUsageApi = ApiSchemaToInterface<typeof sessionUsageApiSchema>;

declare const sessionUsageApiSchema: {
    getMetrics: {
        description: string;
        result: z_2.ZodObject<{
            totalPremiumRequestCost: z_2.ZodNumber;
            totalUserRequests: z_2.ZodNumber;
            totalNanoAiu: z_2.ZodOptional<z_2.ZodNumber>;
            tokenDetails: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodObject<{
                tokenCount: z_2.ZodNumber;
            }, "strip", z_2.ZodTypeAny, {
                tokenCount: number;
            }, {
                tokenCount: number;
            }>>>;
            totalApiDurationMs: z_2.ZodNumber;
            sessionStartTime: z_2.ZodString;
            codeChanges: z_2.ZodObject<{
                linesAdded: z_2.ZodNumber;
                linesRemoved: z_2.ZodNumber;
                filesModifiedCount: z_2.ZodNumber;
                filesModified: z_2.ZodArray<z_2.ZodString, "many">;
            }, "strip", z_2.ZodTypeAny, {
                linesAdded: number;
                linesRemoved: number;
                filesModified: string[];
                filesModifiedCount: number;
            }, {
                linesAdded: number;
                linesRemoved: number;
                filesModified: string[];
                filesModifiedCount: number;
            }>;
            modelMetrics: z_2.ZodRecord<z_2.ZodString, z_2.ZodObject<{
                requests: z_2.ZodObject<{
                    count: z_2.ZodNumber;
                    cost: z_2.ZodNumber;
                }, "strip", z_2.ZodTypeAny, {
                    count: number;
                    cost: number;
                }, {
                    count: number;
                    cost: number;
                }>;
                usage: z_2.ZodObject<{
                    inputTokens: z_2.ZodNumber;
                    outputTokens: z_2.ZodNumber;
                    cacheReadTokens: z_2.ZodNumber;
                    cacheWriteTokens: z_2.ZodNumber;
                    reasoningTokens: z_2.ZodOptional<z_2.ZodNumber>;
                }, "strip", z_2.ZodTypeAny, {
                    inputTokens: number;
                    outputTokens: number;
                    cacheReadTokens: number;
                    cacheWriteTokens: number;
                    reasoningTokens?: number | undefined;
                }, {
                    inputTokens: number;
                    outputTokens: number;
                    cacheReadTokens: number;
                    cacheWriteTokens: number;
                    reasoningTokens?: number | undefined;
                }>;
                totalNanoAiu: z_2.ZodOptional<z_2.ZodNumber>;
                tokenDetails: z_2.ZodOptional<z_2.ZodRecord<z_2.ZodString, z_2.ZodObject<{
                    tokenCount: z_2.ZodNumber;
                }, "strip", z_2.ZodTypeAny, {
                    tokenCount: number;
                }, {
                    tokenCount: number;
                }>>>;
            }, "strip", z_2.ZodTypeAny, {
                usage: {
                    inputTokens: number;
                    outputTokens: number;
                    cacheReadTokens: number;
                    cacheWriteTokens: number;
                    reasoningTokens?: number | undefined;
                };
                requests: {
                    count: number;
                    cost: number;
                };
                totalNanoAiu?: number | undefined;
                tokenDetails?: Record<string, {
                    tokenCount: number;
                }> | undefined;
            }, {
                usage: {
                    inputTokens: number;
                    outputTokens: number;
                    cacheReadTokens: number;
                    cacheWriteTokens: number;
                    reasoningTokens?: number | undefined;
                };
                requests: {
                    count: number;
                    cost: number;
                };
                totalNanoAiu?: number | undefined;
                tokenDetails?: Record<string, {
                    tokenCount: number;
                }> | undefined;
            }>>;
            currentModel: z_2.ZodOptional<z_2.ZodString>;
            lastCallInputTokens: z_2.ZodNumber;
            lastCallOutputTokens: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            totalApiDurationMs: number;
            sessionStartTime: string;
            codeChanges: {
                linesAdded: number;
                linesRemoved: number;
                filesModified: string[];
                filesModifiedCount: number;
            };
            modelMetrics: Record<string, {
                usage: {
                    inputTokens: number;
                    outputTokens: number;
                    cacheReadTokens: number;
                    cacheWriteTokens: number;
                    reasoningTokens?: number | undefined;
                };
                requests: {
                    count: number;
                    cost: number;
                };
                totalNanoAiu?: number | undefined;
                tokenDetails?: Record<string, {
                    tokenCount: number;
                }> | undefined;
            }>;
            totalPremiumRequestCost: number;
            totalUserRequests: number;
            lastCallInputTokens: number;
            lastCallOutputTokens: number;
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
            currentModel?: string | undefined;
        }, {
            totalApiDurationMs: number;
            sessionStartTime: string;
            codeChanges: {
                linesAdded: number;
                linesRemoved: number;
                filesModified: string[];
                filesModifiedCount: number;
            };
            modelMetrics: Record<string, {
                usage: {
                    inputTokens: number;
                    outputTokens: number;
                    cacheReadTokens: number;
                    cacheWriteTokens: number;
                    reasoningTokens?: number | undefined;
                };
                requests: {
                    count: number;
                    cost: number;
                };
                totalNanoAiu?: number | undefined;
                tokenDetails?: Record<string, {
                    tokenCount: number;
                }> | undefined;
            }>;
            totalPremiumRequestCost: number;
            totalUserRequests: number;
            lastCallInputTokens: number;
            lastCallOutputTokens: number;
            totalNanoAiu?: number | undefined;
            tokenDetails?: Record<string, {
                tokenCount: number;
            }> | undefined;
            currentModel?: string | 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>;
    agentId: z.ZodOptional<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, {
    type: "session.usage_info";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "session.usage_info";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tokenLimit: number;
        currentTokens: number;
        messagesLength: number;
        systemTokens?: number | undefined;
        conversationTokens?: number | undefined;
        toolDefinitionsTokens?: number | undefined;
        isInitial?: boolean | undefined;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "session.warning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.warning";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        message: string;
        warningType: string;
        url?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SessionWorkspaceApi = ApiSchemaToInterface<typeof sessionWorkspaceApiSchema>;

declare const sessionWorkspaceApiSchema: {
    getWorkspace: {
        description: string;
        result: z_2.ZodObject<{
            workspace: z_2.ZodNullable<z_2.ZodEffects<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>;
                name: z_2.ZodOptional<z_2.ZodString>;
                client_name: z_2.ZodOptional<z_2.ZodString>;
                user_named: z_2.ZodOptional<z_2.ZodBoolean>;
                summary_count: z_2.ZodDefault<z_2.ZodNumber>;
                created_at: z_2.ZodOptional<z_2.ZodString>;
                updated_at: z_2.ZodOptional<z_2.ZodString>;
                remote_steerable: z_2.ZodOptional<z_2.ZodBoolean>;
                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>;
                chronicle_sync_dismissed: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                id: string;
                summary_count: number;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                client_name?: string | undefined;
                updated_at?: string | undefined;
                remote_steerable?: boolean | undefined;
                mc_task_id?: string | undefined;
                mc_session_id?: string | undefined;
                mc_last_event_id?: string | undefined;
                chronicle_sync_dismissed?: boolean | undefined;
            }, {
                id: string;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                client_name?: string | undefined;
                summary_count?: number | undefined;
                updated_at?: string | undefined;
                remote_steerable?: boolean | undefined;
                mc_task_id?: string | undefined;
                mc_session_id?: string | undefined;
                mc_last_event_id?: string | undefined;
                chronicle_sync_dismissed?: boolean | undefined;
            }>, {
                id: string;
                summary_count: number;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                client_name?: string | undefined;
                updated_at?: string | undefined;
                remote_steerable?: boolean | undefined;
                mc_task_id?: string | undefined;
                mc_session_id?: string | undefined;
                mc_last_event_id?: string | undefined;
                chronicle_sync_dismissed?: boolean | undefined;
            }, unknown>>;
            path: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            workspace: {
                id: string;
                summary_count: number;
                name?: string | undefined;
                repository?: string | undefined;
                cwd?: string | undefined;
                branch?: string | undefined;
                created_at?: string | undefined;
                user_named?: boolean | undefined;
                git_root?: string | undefined;
                host_type?: "github" | "ado" | undefined;
                client_name?: string | undefined;
                updated_at?: string | undefined;
                remote_steerable?: boolean | undefined;
                mc_task_id?: string | undefined;
                mc_session_id?: string | undefined;
                mc_last_event_id?: string | undefined;
                chronicle_sync_dismissed?: boolean | undefined;
            } | null;
            path?: string | undefined;
        }, {
            path?: string | undefined;
            workspace?: unknown;
        }>;
    };
    listFiles: {
        description: string;
        result: z_2.ZodObject<{
            files: z_2.ZodArray<z_2.ZodString, "many">;
        }, "strip", z_2.ZodTypeAny, {
            files: string[];
        }, {
            files: string[];
        }>;
    };
    readFile: {
        description: string;
        params: z_2.ZodObject<{
            path: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            path: string;
        }, {
            path: string;
        }>;
        result: z_2.ZodObject<{
            content: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            content: string;
        }, {
            content: string;
        }>;
    };
    createFile: {
        description: string;
        params: z_2.ZodObject<{
            path: z_2.ZodString;
            content: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            path: string;
            content: string;
        }, {
            path: string;
            content: string;
        }>;
    };
    listCheckpoints: {
        description: string;
        result: z_2.ZodObject<{
            checkpoints: z_2.ZodArray<z_2.ZodObject<{
                number: z_2.ZodNumber;
                title: z_2.ZodString;
                filename: z_2.ZodString;
            }, "strip", z_2.ZodTypeAny, {
                number: number;
                title: string;
                filename: string;
            }, {
                number: number;
                title: string;
                filename: string;
            }>, "many">;
        }, "strip", z_2.ZodTypeAny, {
            checkpoints: {
                number: number;
                title: string;
                filename: string;
            }[];
        }, {
            checkpoints: {
                number: number;
                title: string;
                filename: string;
            }[];
        }>;
    };
    readCheckpoint: {
        description: string;
        params: z_2.ZodObject<{
            number: z_2.ZodNumber;
        }, "strip", z_2.ZodTypeAny, {
            number: number;
        }, {
            number: number;
        }>;
        result: z_2.ZodObject<{
            content: z_2.ZodNullable<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            content: string | null;
        }, {
            content: string | null;
        }>;
    };
    saveLargePaste: {
        description: string;
        params: z_2.ZodObject<{
            content: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            content: string;
        }, {
            content: string;
        }>;
        result: z_2.ZodObject<{
            saved: z_2.ZodNullable<z_2.ZodObject<{
                filePath: z_2.ZodString;
                filename: z_2.ZodString;
                sizeBytes: z_2.ZodNumber;
            }, "strip", z_2.ZodTypeAny, {
                filePath: string;
                filename: string;
                sizeBytes: number;
            }, {
                filePath: string;
                filename: string;
                sizeBytes: number;
            }>>;
        }, "strip", z_2.ZodTypeAny, {
            saved: {
                filePath: string;
                filename: string;
                sizeBytes: number;
            } | null;
        }, {
            saved: {
                filePath: string;
                filename: string;
                sizeBytes: number;
            } | null;
        }>;
    };
    diff: {
        description: string;
        params: z_2.ZodObject<{
            mode: z_2.ZodEnum<["unstaged", "branch"]>;
        }, "strip", z_2.ZodTypeAny, {
            mode: "branch" | "unstaged";
        }, {
            mode: "branch" | "unstaged";
        }>;
        result: z_2.ZodObject<{
            requestedMode: z_2.ZodEnum<["unstaged", "branch"]>;
            mode: z_2.ZodEnum<["unstaged", "branch"]>;
            changes: z_2.ZodArray<z_2.ZodObject<{
                path: z_2.ZodString;
                diff: z_2.ZodString;
                changeType: z_2.ZodEnum<["added", "modified", "deleted", "renamed"]>;
                oldPath: z_2.ZodOptional<z_2.ZodString>;
                isTruncated: z_2.ZodOptional<z_2.ZodBoolean>;
            }, "strip", z_2.ZodTypeAny, {
                path: string;
                diff: string;
                changeType: "added" | "modified" | "deleted" | "renamed";
                oldPath?: string | undefined;
                isTruncated?: boolean | undefined;
            }, {
                path: string;
                diff: string;
                changeType: "added" | "modified" | "deleted" | "renamed";
                oldPath?: string | undefined;
                isTruncated?: boolean | undefined;
            }>, "many">;
            baseBranch: z_2.ZodOptional<z_2.ZodString>;
            isFallback: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            mode: "branch" | "unstaged";
            requestedMode: "branch" | "unstaged";
            changes: {
                path: string;
                diff: string;
                changeType: "added" | "modified" | "deleted" | "renamed";
                oldPath?: string | undefined;
                isTruncated?: boolean | undefined;
            }[];
            isFallback: boolean;
            baseBranch?: string | undefined;
        }, {
            mode: "branch" | "unstaged";
            requestedMode: "branch" | "unstaged";
            changes: {
                path: string;
                diff: string;
                changeType: "added" | "modified" | "deleted" | "renamed";
                oldPath?: string | undefined;
                isTruncated?: boolean | undefined;
            }[];
            isFallback: boolean;
            baseBranch?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"session.workspace_file_changed">;
    data: z.ZodObject<{
        path: z.ZodString;
        operation: z.ZodEnum<["create", "update"]>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        operation: "create" | "update";
    }, {
        path: string;
        operation: "create" | "update";
    }>;
}, "strip", z.ZodTypeAny, {
    type: "session.workspace_file_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        operation: "create" | "update";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "session.workspace_file_changed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        operation: "create" | "update";
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type ShellApi = ApiSchemaToInterface<typeof shellApiSchema>;

declare const shellApiSchema: {
    exec: {
        description: string;
        params: z_2.ZodObject<{
            command: z_2.ZodString;
            cwd: z_2.ZodOptional<z_2.ZodString>;
            timeout: z_2.ZodOptional<z_2.ZodNumber>;
        }, "strip", z_2.ZodTypeAny, {
            command: string;
            cwd?: string | undefined;
            timeout?: number | undefined;
        }, {
            command: string;
            cwd?: string | undefined;
            timeout?: number | undefined;
        }>;
        result: z_2.ZodObject<{
            processId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            processId: string;
        }, {
            processId: string;
        }>;
    };
    kill: {
        description: string;
        params: z_2.ZodObject<{
            processId: z_2.ZodString;
            signal: z_2.ZodOptional<z_2.ZodEnum<["SIGTERM", "SIGKILL", "SIGINT"]>>;
        }, "strip", z_2.ZodTypeAny, {
            processId: string;
            signal?: "SIGINT" | "SIGKILL" | "SIGTERM" | undefined;
        }, {
            processId: string;
            signal?: "SIGINT" | "SIGKILL" | "SIGTERM" | undefined;
        }>;
        result: z_2.ZodObject<{
            killed: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            killed: boolean;
        }, {
            killed: boolean;
        }>;
    };
    executeUserRequested: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
            command: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            command: string;
            requestId: string;
        }, {
            command: string;
            requestId: string;
        }>;
        result: z_2.ZodObject<{
            toolCallId: z_2.ZodString;
            success: z_2.ZodBoolean;
            output: z_2.ZodString;
            exitCode: z_2.ZodOptional<z_2.ZodNullable<z_2.ZodNumber>>;
            error: z_2.ZodOptional<z_2.ZodString>;
        }, "strip", z_2.ZodTypeAny, {
            success: boolean;
            toolCallId: string;
            output: string;
            error?: string | undefined;
            exitCode?: number | null | undefined;
        }, {
            success: boolean;
            toolCallId: string;
            output: string;
            error?: string | undefined;
            exitCode?: number | null | undefined;
        }>;
    };
    cancelUserRequested: {
        description: string;
        params: z_2.ZodObject<{
            requestId: z_2.ZodString;
        }, "strip", z_2.ZodTypeAny, {
            requestId: string;
        }, {
            requestId: string;
        }>;
        result: z_2.ZodObject<{
            cancelled: z_2.ZodBoolean;
        }, "strip", z_2.ZodTypeAny, {
            cancelled: boolean;
        }, {
            cancelled: boolean;
        }>;
    };
};

/**
 * How a tracked shell command is managed.
 * - `"attached"`: The command runs inside a managed PTY shell session. The CLI
 *   owns the process lifetime and can cancel it directly via the session.
 * - `"detached"`: The command was launched as an independent background process
 *   (e.g. with `detach: true`). It survives session shutdown and can only be
 *   killed by PID, which may not be immediately available.
 */
export declare type ShellAttachmentMode = "attached" | "detached";

/**
 * Callback invoked when a shell command completes in the background.
 * This includes async commands and sync commands that were timed out or
 * explicitly released into the background.
 */
declare type ShellCommandCompletionCallback = (shellId: string, output: ShellOutput, description?: string) => void;

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.
     * This is pluggable so shell tools can share the same configuration shape
     * while different hosts provide the safety implementation.
     */
    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.
     * This is pluggable so shell tools can share the same configuration shape
     * while different hosts provide the safety implementation.
     */
    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;
}

/** Describes what the execution backend supports, used for conditional prompt building. */
declare type ShellExecutionCapabilities = {
    /** Whether the session supports TTY features (raw input, TUI apps, cursor control). */
    ttySupport: boolean;
    /** Whether write_* input supports terminal escape sequences ({up}, {down}, etc.). */
    terminalInput: boolean;
};

/**
 * Whether a tracked shell command is currently sync-waited or background-managed.
 */
export declare type ShellExecutionMode = "sync" | "background";

/** Options for creating a new shell execution session via the factory. */
declare type ShellExecutionSessionCreateOptions = {
    shellId: string;
    shellConfig: ShellConfig;
    cwd: string;
    env: NodeJS.ProcessEnv;
    largeOutputOptions: LargeOutputOptions;
    shellLogFile?: string;
};

/** A point-in-time snapshot of a shell execution session's status. */
declare type ShellExecutionSessionSnapshot = {
    pid?: number;
    isRunning: boolean;
    hasCommandInProgress: boolean;
    hasUnreadOutput: boolean;
    stats: ShellSessionStats;
};

/** 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];

declare interface ShellNotificationSender {
    sendOutput(notification: ShellOutputNotification): void;
    sendExit(notification: ShellExitNotification): void;
}

/**
 * Output from a shell command execution. Backend-neutral — used by both
 * PTY and future spawn-based implementations.
 */
declare type ShellOutput = {
    /** The output text (may be preview if large output was written to file) */
    output: string;
    exitCode?: number;
    /** If set, large output was written to this file */
    largeOutputFilePath?: string;
    /** Total bytes of output (set when large output was written to file) */
    largeOutputTotalBytes?: number;
};

/** 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;
}

/** Callback invoked when partial output changes during command execution. */
declare type ShellPartialOutputChangedCallback = (output: ShellOutput) => void;

/**
 * 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;
};

declare type ShellSessionStats = {
    createdAtMs: number;
    lastUsedAtMs: number;
};

/**
 * A tracked shell command, either attached to a live shell session or detached
 * into an independent background process.
 */
export declare type ShellTask = {
    type: "shell";
    id: string;
    description: string;
    status: BackgroundTaskStatus;
    startedAt: number;
    completedAt?: number;
    command: string;
    attachmentMode: ShellAttachmentMode;
    executionMode: ShellExecutionMode;
    /** Whether the shell is currently in the original sync wait and can be moved to background mode. */
    canPromoteToBackground?: boolean;
    /** Path to the detached shell log, when available. */
    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 tracked shell command, derived from either live session output
 * (attached shells) or the detached shell log.
 */
export declare type ShellTaskProgress = {
    type: "shell";
    /** Last 10 lines of log file output. */
    recentOutput: string;
    /** Process ID when available. */
    pid?: number;
};

declare type ShellType = "bash" | "powershell";

/**
 * Checks if a tool result should be written to a file based on its size.
 */
declare function shouldWriteToFile(result: ToolResultExpanded, options?: LargeOutputOptions): boolean;

/** Inferred type for {@link shutdownParamsSchema}, suitable for use as a
 *  parameter type on the impl method `Session.shutdownForSchema`. */
declare type ShutdownParams = z_2.infer<typeof shutdownParamsSchema>;

/** Parameters for {@link sessionApiSchema.shutdown}. Both fields are optional. */
declare const shutdownParamsSchema: z_2.ZodObject<{
    type: z_2.ZodOptional<z_2.ZodEnum<["routine", "error"]>>;
    reason: z_2.ZodOptional<z_2.ZodString>;
}, "strip", z_2.ZodTypeAny, {
    type?: "error" | "routine" | undefined;
    reason?: string | undefined;
}, {
    type?: "error" | "routine" | undefined;
    reason?: string | undefined;
}>;

declare class SidekickAgentManager {
    readonly inbox: Inbox;
    private readonly taskRegistry;
    private readonly latestAgentIds;
    private readonly unsubscribers;
    private initPromise?;
    private sessionContext?;
    private readonly _registeredAgentNames;
    /**
     * Returns whether any sidekick agents registered during initialization.
     * Awaits initialization so the answer is final.
     */
    hasSidekickAgents(): Promise<boolean>;
    configureInboxPersistence(dbProvider: () => SessionDatabase | undefined): void;
    /** Lists all entries in the sidekick task registry. */
    listTasks(): TaskEntry[];
    /** Wire a callback that fires whenever sidekick tasks change (for UI updates). */
    setOnTaskChange(callback: () => void): void;
    /**
     * Initialize sidekick agents: load definitions and register event hooks.
     * Store the promise so it can be awaited before the first model call.
     */
    initialize(context: SidekickAgentSessionContext): void;
    /** Await initialization. Call before first model loop to avoid missing the first turn. */
    ensureInitialized(): Promise<void>;
    /** Forcefully cancel all running sidekick agents. */
    cancelAll(): void;
    /** Send notification for an inbox entry. */
    private sendInboxNotification;
    /** Flush any unread/unnotified inbox entries as system notifications. */
    flushPendingNotifications(): Promise<void>;
    private doInitialize;
    private launchAgent;
}

/**
 * Session context interface — only the fields the sidekick agent manager needs.
 * Keeps the manager testable without requiring a full Session instance.
 */
declare type SidekickAgentSessionContext = {
    sessionId: string;
    workingDir: string;
    isDetached: boolean;
    featureFlagService: IFeatureFlagService;
    logger: RunnerLogger;
    memoryApiCache?: MemoryApiCache;
    getDynamicContextConfig?(): LaunchCheckDynamicContextConfig | null;
    getRuntimeSettings(): RuntimeSettings | undefined;
    getCachedTools(): Tool_2[];
    getToolConfig(): ToolConfig | undefined;
    isProcessing(): boolean;
    sendSystemNotification(message: string, kind: SystemNotificationKind, options?: {
        passive?: PassivePolicy;
    }): void;
    sendTelemetry(event: TelemetryEvent): void;
    on(eventType: string, handler: (event: SessionEvent) => void): () => void;
    createAgentCallbackBridge(options: {
        agentId: string;
        agentType: "sidekick";
        taskRegistry: TaskRegistry;
    }): IAgentCallback;
    /** Creates a child session for session-based sidekick execution. */
    createSubagentSession?: (agentId: string, options: SubagentSessionOptions) => LocalSession;
};

/**
 * 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 body of the skill file (YAML frontmatter stripped) */
    content: string;
    /** Tools that should be auto-approved when this skill is active */
    allowedTools?: string[];
    /** Source identifier for where the skill was discovered (project, inherited, personal-*, custom, plugin, builtin, remote, ...). */
    source?: 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;
    /**
     * The trigger that caused the skill to be invoked. Defaults to
     * `"agent-invoked"` when the producer does not specify one.
     */
    trigger?: SkillInvocationTrigger;
}

/**
 * The trigger that caused a skill to be invoked. Used for telemetry and audit.
 *
 * - `user-invoked`: explicit user action, such as via a slash command or UI affordance.
 * - `agent-invoked`: the agent requested the skill.
 * - `context-load`: the skill was loaded as part of another context, such as
 *   preloading skills configured on a custom agent or subagent.
 *
 * The skill tool reports `agent-invoked`; skills preloaded into a custom-agent
 * prompt report `context-load`. Future user-facing invocation paths can report
 * `user-invoked` once session-level state plumbing can distinguish them.
 */
declare type SkillInvocationTrigger = "user-invoked" | "agent-invoked" | "context-load";

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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">>;
        /** Source identifier for where the skill was discovered. Known values include: project, inherited, personal-copilot, personal-agents, personal-claude, custom, plugin, builtin, and remote. */
        source: z.ZodOptional<z.ZodString>;
        /** 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>;
        /** What triggered this skill invocation (`user-invoked` | `agent-invoked` | `context-load`). */
        trigger: z.ZodOptional<z.ZodEnum<["user-invoked", "agent-invoked", "context-load"]>>;
    }, "strip", z.ZodTypeAny, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    }, {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "skill.invoked";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "skill.invoked";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        path: string;
        name: string;
        content: string;
        description?: string | undefined;
        source?: string | undefined;
        allowedTools?: string[] | undefined;
        pluginName?: string | undefined;
        pluginVersion?: string | undefined;
        trigger?: "user-invoked" | "agent-invoked" | "context-load" | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SkippedTelemetry = {
    skipped: true;
    skippedReason: SkipReason;
};

declare type SkipReason = "no-changes-for-language" | "database-too-large";

/**
 * Creation-time snapshot of the raw {@link SessionOptions} fields that a
 * runtime-spawned remote session must inherit from the foreground session
 * that triggered the spawn (see `LocalSessionManager.spawnRemoteSession`).
 *
 * This is **runtime-internal**: it is read in-process by the session manager
 * and is intentionally NOT part of the wire/JSON-RPC schema surface. The
 * snapshot captures the *raw* option values supplied at construction (in
 * particular, `model` is preserved as `undefined` when the caller selected
 * auto mode — we deliberately do not substitute the later-resolved concrete
 * model, and we do not reflect mid-session model switches).
 */
declare type SpawnInheritableSessionOptions = Pick<SessionOptions, "model" | "provider" | "featureFlags" | "isExperimentalMode" | "clientName" | "lspClientName">;

/**
 * Split a SQL string into statements while respecting semicolons inside
 * single-quoted string literals and SQL comments.
 */
declare function splitSqlStatements(query: string): string[];

declare const SQL_INTENT_TRACKING_FF_NAME = "SQL_INTENT_TRACKING";

declare type SqlInput = z_2.infer<typeof sqlInputSchemaWithDb>;

/**
 * Zod schema for sql tool input with database selector (session + session_store).
 */
declare const sqlInputSchemaWithDb: z_2.ZodObject<{
    description: z_2.ZodString;
    query: z_2.ZodString;
} & {
    database: z_2.ZodDefault<z_2.ZodOptional<z_2.ZodEnum<["session", "session_store"]>>>;
}, "strip", z_2.ZodTypeAny, {
    description: string;
    query: string;
    database: "session" | "session_store";
}, {
    description: string;
    query: string;
    database?: "session" | "session_store" | undefined;
}>;

/**
 * How the sqlite query should be executed:
 * - `"exec"` — DDL or multi-statement (CREATE/ALTER/DROP, batches): no result rows.
 * - `"query"` — SELECT / WITH / EXPLAIN: returns rows.
 * - `"run"` — INSERT / UPDATE / DELETE / PRAGMA: returns rowsAffected / lastInsertRowid.
 */
declare type SqliteQueryType = "exec" | "query" | "run";

/**
 * Result of a SQL query execution.
 */
declare type SqlResult = SessionFsSqliteResult;

declare const SqlToolName = "sql";

declare interface SSETransportConfig {
    type: "sse";
    url: string;
    headers?: Record<string, string>;
    authProvider?: OAuthClientProvider;
}

/**
 * The standard (non-`extension_context`) attachment variants. Exported so the
 * extensions push API can compose a *flat* `z.discriminatedUnion` that swaps in
 * a slim `extension_context` input shape. Keeping that union flat (rather than
 * nesting `AttachmentSchema` inside another union) ensures the emitted JSON
 * Schema is a single tagged union, which SDK codegen can map to an idiomatic
 * type instead of failing on an unmappable nested `anyOf`.
 */
export declare const standardAttachmentSchemas: readonly [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, {
        start: number;
        end: number;
    }, {
        start: number;
        end: number;
    }>>;
}, "strip", z.ZodTypeAny, {
    path: string;
    type: "file";
    displayName: string;
    lineRange?: {
        start: number;
        end: number;
    } | undefined;
}, {
    path: string;
    type: "file";
    displayName: string;
    lineRange?: {
        start: number;
        end: number;
    } | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"directory">;
    path: z.ZodString;
    displayName: z.ZodString;
}, "strip", z.ZodTypeAny, {
    path: string;
    type: "directory";
    displayName: string;
}, {
    path: string;
    type: "directory";
    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, {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    }, {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "selection";
    displayName: string;
    selection: {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    };
    filePath: string;
    text: string;
}, {
    type: "selection";
    displayName: string;
    selection: {
        start: {
            line: number;
            character: number;
        };
        end: {
            line: number;
            character: number;
        };
    };
    filePath: string;
    text: string;
}>, z.ZodObject<{
    type: z.ZodLiteral<"github_reference">;
    number: z.ZodNumber;
    title: z.ZodString;
    referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
    state: z.ZodString;
    url: z.ZodString;
}, "strip", z.ZodTypeAny, {
    number: number;
    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, {
    type: "blob";
    data: string;
    mimeType: string;
    displayName?: string | undefined;
}, {
    type: "blob";
    data: string;
    mimeType: string;
    displayName?: string | undefined;
}>];

/**
 * 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;
    /**
     * When set and `sandboxConfig.enabled`, the server is launched through
     * `SandboxedStdioClientTransport`, inheriting the active MXC sandbox
     * policy. Otherwise the SDK's plain stdio transport is used.
     */
    sandboxConfig?: SandboxConfig;
}

declare const str_replace_editor: (config: ToolConfig, logger: RunnerLogger, _settings?: RuntimeSettings) => Tool_2 & {
    shutdown: NonNullable<Tool_2["shutdown"]>;
    summariseIntention: NonNullable<Tool_2["summariseIntention"]>;
};

/**
 * 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 ResponsesClient.
 * Talk to @jmoseley or @mrayermannmsft for more context.
 */
declare type StreamingChunkContext = {
    /**
     * The streaming ID of the message.
     */
    streamingId: string;
    /**
     * True when this chunk represents the start of a streamed assistant message.
     */
    messageStart?: boolean;
    /**
     * Stable generation phase metadata for the streamed assistant message.
     */
    phase?: 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;
    /**
     * Set when the server begins a server_tool_use block for the advisor.
     * Used to show the ADVISOR_INTENT in the thinking animation spinner.
     */
    advisorStarted?: boolean;
    /**
     * Set when the server returns an advisor_tool_result block.
     * Used to clear the advisor intent.
     */
    advisorCompleted?: boolean;
    /**
     * Set when the streaming source observes the start of a new reasoning
     * item in the response, signaling that the next streamed deltas belong
     * to a new chunk of the same API call. Used by `StreamingChunkDisplay`
     * to rotate `messageId` / `reasoningId` so each chunk lands in its own
     * UI bubble and aligns with the per-chunk `assistant.message` events
     * the model client yields.
     */
    chunkBoundary?: boolean;
    /**
     * Approximate byte size of this chunk, calculated from content and all tool call data.
     */
    size: number;
};

/** Streaming delta forwarded from a sub-agent's chunk processor through the callback chain. */
declare type StreamingDeltaEvent = {
    kind: "streaming_delta";
    deltaType: "message_start";
    messageId: string;
    /**
     * Stable generation phase metadata for the streamed assistant message.
     */
    phase?: string;
} | {
    kind: "streaming_delta";
    deltaType: "message";
    messageId?: string;
    deltaContent?: string;
} | {
    kind: "streaming_delta";
    deltaType: "reasoning";
    reasoningId?: string;
    deltaContent?: string;
} | {
    kind: "streaming_delta";
    deltaType: "streaming_size";
    totalResponseSizeBytes?: number;
};

/**
 * Strip model-specific reasoning/encrypted fields from assistant messages.
 * These fields are tied to the originating model and become invalid after
 * a model change, abort, or session resume.
 */
export declare function stripReasoningFields(messages: ChatCompletionMessageParam[]): void;

declare type StrReplaceArgs = z_2.infer<typeof strReplaceArgsSchema>;

declare const strReplaceArgsSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    old_str: z_2.ZodOptional<z_2.ZodString>;
    new_str: z_2.ZodOptional<z_2.ZodString>;
} & {
    command: z_2.ZodEnum<["str_replace", "edit"]>;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "str_replace" | "edit";
    old_str?: string | undefined;
    new_str?: string | undefined;
}, {
    path: string;
    command: "str_replace" | "edit";
    old_str?: string | undefined;
    new_str?: string | undefined;
}>;

declare type StrReplaceEditorArgs = z_2.infer<typeof strReplaceEditorArgsSchema>;

/**
 * Zod schema for the unified str_replace_editor tool input (discriminated union).
 */
declare const strReplaceEditorArgsSchema: z_2.ZodDiscriminatedUnion<"command", [z_2.ZodObject<{
    path: z_2.ZodString;
    view_range: z_2.ZodOptional<z_2.ZodArray<z_2.ZodNumber, "many">>;
    forceReadLargeFiles: z_2.ZodOptional<z_2.ZodBoolean>;
} & {
    command: z_2.ZodLiteral<"view">;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "view";
    view_range?: number[] | undefined;
    forceReadLargeFiles?: boolean | undefined;
}, {
    path: string;
    command: "view";
    view_range?: number[] | undefined;
    forceReadLargeFiles?: boolean | undefined;
}>, z_2.ZodObject<{
    path: z_2.ZodString;
    file_text: z_2.ZodString;
} & {
    command: z_2.ZodLiteral<"create">;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "create";
    file_text: string;
}, {
    path: string;
    command: "create";
    file_text: string;
}>, z_2.ZodObject<{
    path: z_2.ZodString;
    old_str: z_2.ZodOptional<z_2.ZodString>;
    new_str: z_2.ZodOptional<z_2.ZodString>;
} & {
    command: z_2.ZodEnum<["str_replace", "edit"]>;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "str_replace" | "edit";
    old_str?: string | undefined;
    new_str?: string | undefined;
}, {
    path: string;
    command: "str_replace" | "edit";
    old_str?: string | undefined;
    new_str?: string | undefined;
}>, z_2.ZodObject<{
    path: z_2.ZodString;
    insert_line: z_2.ZodNumber;
    new_str: z_2.ZodString;
} & {
    command: z_2.ZodLiteral<"insert">;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "insert";
    new_str: string;
    insert_line: number;
}, {
    path: string;
    command: "insert";
    new_str: string;
    insert_line: number;
}>]>;

declare type StrReplaceEditorOptions = {
    /**
     * What to base the truncation of the output of the tool on. Defaults to `"strLen"`.
     */
    truncateBasedOn?: "strLen" | "tokenCount";
    /**
     * How to style the truncation of the output of the tool. Defaults to `"middle"`.
     */
    truncateStyle?: "end" | "middle";
};

declare type StrReplaceEditorResult = Omit<ToolResultExpanded, "toolTelemetry"> & {
    toolTelemetry: StrReplaceEditorTelemetry;
};

declare type StrReplaceEditorShutdownTelemetry = TelemetryEvent_2<"str_replace_editor_shutdown", {
    properties: {
        trackedEdits: string;
    };
    metrics: Record<string, never>;
    restrictedProperties: Record<string, never>;
}>;

declare type StrReplaceEditorTelemetry = {
    properties: {
        command: "invalid" | StrReplaceEditorArgs["command"];
        resolvedPathAgainstCwd: string;
        /**
         * Stringified copy of {@link StrReplaceEditorOptions}.
         */
        options: string;
        /**
         * Stringified list of the input names passed to the tool.
         */
        inputs: string;
        /**
         * JSON-encoded array of file extensions edited (e.g. '[".ts"]').
         * Extensions are safe-for-telemetry values; unknown extensions appear as "not-safe".
         */
        fileExtension?: string;
        /**
         * JSON-encoded array of language IDs corresponding to the file extensions edited.
         * Format: '["typescript"]'.
         */
        languageId?: string;
        /**
         * JSON-encoded array of code blocks with LOC per file extension.
         * Format: '[{"fileExt":".ts","languageId":"typescript","linesAdded":10,"linesRemoved":2}]'.
         */
        codeBlocks?: string;
    };
    restrictedProperties: {
        initFeedbackError?: string;
        getEditFeedbackError?: string;
        editFeedback?: string;
    } & Partial<FileEditedRestrictedProperties>;
    metrics: {
        responseTokenLimit: number | undefined;
        resultLength: number;
        resultForLlmLength: number;
    } & Partial<FileEditedMetrics>;
};

declare const stubAssessScriptSafety: (script: string) => Promise<SafetyAssessment>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "subagent.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.completed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"subagent.deselected">;
    data: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
}, "strip", z.ZodTypeAny, {
    type: "subagent.deselected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.deselected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {};
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "subagent.failed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.failed";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        error: string;
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        model?: string | undefined;
        durationMs?: number | undefined;
        totalToolCalls?: number | undefined;
        totalTokens?: number | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "subagent.selected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.selected";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        tools: string[] | null;
        agentName: string;
        agentDisplayName: string;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare type SubagentSessionBoundary = {
    kind: "subagent_session_boundary";
    /**
     * The type of session boundary event: start, end, or failed.
     */
    sessionBoundaryType: "start" | "end" | "failed";
    agentName: string;
    agentId?: string;
    /**
     * Optional error message when the subagent failed.
     * Present on "failed" boundary events when the agent encountered an error.
     */
    error?: string;
    /**
     * Optional display name for the agent. Used by task tool agents where
     * the agent may not be in the session's customAgents list.
     */
    agentDisplayName?: string;
    /**
     * Optional description for the agent. Used by task tool agents where
     * the agent may not be in the session's customAgents list.
     */
    agentDescription?: string;
    /**
     * Resolved model the sub-agent is running with, when known.
     */
    model?: string;
};

/**
 * Options for creating a subagent session via `Session.createSubagentSession()`.
 * These control what differs from the parent session; everything else is inherited.
 */
export declare interface SubagentSessionOptions {
    /** Capabilities enabled for the subagent session. If not specified, inherits all capabilities. */
    sessionCapabilities?: Set<SessionCapability>;
    /** Whether to skip loading custom instructions (repo-level .github/copilot-instructions.md, etc.). */
    skipCustomInstructions?: boolean;
    /**
     * Whether to enable on-demand instruction discovery for the subagent
     * (AGENTS.md / CLAUDE.md / .github/copilot-instructions.md surfacing).
     *
     * Defaults to inheriting the parent session's setting. Effective behavior also requires
     * `skipCustomInstructions` to be false and the `ON_DEMAND_INSTRUCTIONS`
     * feature flag to be granted (gated at `buildSettingsAndTools()`).
     */
    enableOnDemandInstructionDiscovery?: boolean;
    /** MCP servers the subagent needs (from the agent definition). */
    mcpServers?: Record<string, MCPServerConfig>;
    /** Tool allowlist. If not specified, all tools are available. */
    availableTools?: string[];
    /**
     * System message configuration for the subagent session.
     * Use `{ mode: "replace", content: "..." }` to provide a complete custom system prompt
     * (e.g., for subagents whose prompt is built by assembleAgentPrompt).
     * If not specified, the session uses its default CLI system prompt.
     */
    systemMessage?: SystemMessageConfig;
    /** Agent name for subagent lifecycle events (subagent.started/subagent.completed). */
    agentName?: string;
    /** Agent display name for subagent lifecycle events. */
    agentDisplayName?: string;
    /** Agent description for subagent lifecycle events. */
    agentDescription?: string;
    /**
     * Event types to suppress when bridging from child to parent session.
     * Events in this set are not re-emitted on the parent. Used by
     * sidekick agents whose parent-bridge suppresses session events and
     * streaming.
     */
    suppressedBridgeEvents?: Set<string>;
    /**
     * Callback for publishing inbox entries from sidekick agents.
     * Passed through to the child session so it can create the send_inbox tool.
     */
    sendInboxPublisher?: SendInboxPublisher;
    /**
     * The parent turn's agent task ID, propagated so child CAPI requests
     * include the X-Parent-Agent-Id header for request correlation.
     */
    parentAgentTaskId?: string;
    /**
     * Explicit tool names the subagent needs. Non-standard tools (send_inbox, etc.)
     * are only created when listed here. Resolved from the agent definition's tools
     * array — ["*"] should be omitted (pass undefined instead).
     */
    requestedTools?: string[];
    /**
     * Resolved model the subagent will run with, when known at dispatch.
     * Forwarded to the `subagent.started` event so consumers (e.g. the CLI
     * timeline) can show the model the sub-agent is using.
     */
    modelOverride?: string;
    /**
     * When true, the subagent opts into lazy/deferred tool loading even when it
     * explicitly lists tools. Mirrors the `deferredToolLoading` flag on the agent
     * definition; honored by `clearDeferralForAgentTools`.
     */
    deferredToolLoading?: boolean;
}

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"subagent.started">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        agentName: z.ZodString;
        agentDisplayName: z.ZodString;
        agentDescription: z.ZodString;
        model: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    }, {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "subagent.started";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "subagent.started";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        agentName: string;
        agentDisplayName: string;
        agentDescription: string;
        model?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type SubagentStartHook = Hook<SubagentStartHookInput, SubagentStartHookOutput>;

/**
 * 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 = Hook<SubagentStopHookInput, SubagentStopHookOutput>;

/**
 * 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?: HookBlockDecision;
    reason?: string;
}

/**
 * A single entry in a subagent's timeline, derived from bridged events stamped
 * with `agentId == subagent toolCallId` on the parent session. Tool start/complete
 * pairs are collapsed into a single `tool_done` (or `tool_inflight` if no
 * completion has arrived yet).
 */
export declare type SubagentTimelineEntry = {
    /** Discriminator for rendering. */
    kind: SubagentTimelineEntryKind;
    /** Event timestamp in ms since epoch. */
    timestamp: number;
    /** One-line summary for list rendering. */
    summary: string;
    /** Tool name for tool_inflight / tool_done entries. */
    toolName?: string;
    /** Success flag for tool_done entries. */
    success?: boolean;
};

/**
 * Discriminator for {@link SubagentTimelineEntry} render variants.
 */
export declare type SubagentTimelineEntryKind = "assistant" | "tool_inflight" | "tool_done" | "skill" | "lifecycle";

/**
 * Telemetry-specific overrides that subagents pass when requesting tools
 * for their own sub-agents, so that the nested task tool captures the
 * correct parent agent context for CAPI header propagation.
 */
declare type SubAgentToolConfigOverrides = Pick<ToolConfig, "capiRequestContext">;

/**
 * Produces a human-readable summary of a tool call's intention.
 *
 * Resolution order:
 *  1. `tool.summariseIntention(args)` when the tool instance is available
 *  2. Shell-specific fallback: `description || command` for shell tools
 *  3. Generic fallback: first non-empty string among common arg field names
 *  4. `null` — caller decides what to show
 *
 * @param toolName  The name of the tool being called
 * @param args      The raw arguments passed to the tool
 * @param tools     Optional list of available tools (accepts both {@link Tool} and {@link ToolMetadata})
 */
declare function summarizeToolCall(toolName: string, args: unknown, tools?: readonly {
    name: string;
    summariseIntention?: (input: unknown) => string;
}[]): string | null;

/**
 * Information about a compaction summary for the index.
 */
declare interface SummaryIndexEntry {
    /** Summary number (1, 2, 3, ...) */
    number: number;
    /** Short title extracted from summary */
    title: string;
    /** Filename (e.g., "001-abc12345.md") */
    filename: 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-fable-5", "claude-opus-4.8", "claude-opus-4.7", "claude-opus-4.7-1m-internal", "claude-opus-4.7-high", "claude-opus-4.7-xhigh", "claude-opus-4.6", "claude-opus-4.6-fast", "claude-opus-4.6-1m", "claude-opus-4.5", "gpt-5.5", "gpt-5.4", "gpt-5.3-codex", "gpt-5.2-codex", "gpt-5.2", "gpt-5.4-mini", "gpt-5-mini", "gemini-3.1-pro-preview", "gemini-3.5-flash"];

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;
    /** Git commit SHA or version identifier for this agent. Passed to MCP servers for OIDC token cache keying. */
    version?: string;
    /**
     * 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[];
    /**
     * Opt-in to lazy/deferred tool loading even when the agent explicitly lists tools.
     * By default, tools the agent names in `tools` are eagerly visible to the model.
     * When true, MCP tools the agent lists stay deferred and are discovered via `tool_search`.
     */
    deferredToolLoading?: boolean;
    /**
     * When set, replaces the CLI system prompt entirely during send().
     * Called with the resolved tool list and cwd after tool filtering.
     * Used by built-in YAML agents running as the outer/top-level agent
     * to get the same prompt they would receive as a subagent.
     */
    buildSystemPrompt?: (tools: Tool_2[], cwd: string, consolidationContext?: ConsolidationContext) => Promise<string>;
    /**
     * Absolute local file path of the agent definition.
     * Only set for file-based agents loaded from disk (user `~/.copilot/agents`,
     * project `.github/agents`, project `.claude/agents`, and plugin agents).
     * Not set for remote agents (loaded from CAPI) or for agents constructed in
     * memory by CCA mappers, since the runtime does not have a local file path
     * for those.
     */
    path?: 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;
}

/**
 * A single block of system message content.
 * When `isStatic` is true, the block contains content that is identical
 * across users on the same build/model/tool configuration (e.g., identity,
 * guidelines, code-change instructions). This enables independent cache
 * breakpoints for static vs per-user content.
 */
declare type SystemMessageBlock = {
    content: string;
    isStatic?: boolean;
};

/**
 * 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;

/**
 * System message content that can be either a plain string (single block,
 * backward compatible) or a structured array of blocks (enabling split
 * cache breakpoints for static vs per-user content).
 */
declare type SystemMessageContent = string | {
    blocks: SystemMessageBlock[];
};

/**
 * 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>;

/**
 * Session-owned system/developer instruction snapshot emitted during request construction.
 */
declare const SystemMessageEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }, {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "system.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "system.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        role: "developer" | "system";
        name?: string | undefined;
        metadata?: {
            promptVersion?: string | undefined;
            variables?: Record<string, unknown> | undefined;
        } | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"system.notification">;
    data: z.ZodObject<{
        content: z.ZodString;
        kind: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
            type: z.ZodLiteral<"agent_completed">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            status: z.ZodEnum<["completed", "failed"]>;
            description: z.ZodOptional<z.ZodString>;
            prompt: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }, {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"agent_idle">;
            agentId: z.ZodString;
            agentType: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }, {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"new_inbox_message">;
            entryId: z.ZodString;
            senderName: z.ZodString;
            senderType: z.ZodString;
            summary: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        }, {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        }>, 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;
            description?: string | undefined;
            exitCode?: number | undefined;
        }, {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | 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;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"instruction_discovered">;
            sourcePath: z.ZodString;
            triggerFile: z.ZodString;
            triggerTool: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        }, {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        }>]>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    }, {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    }>;
}, "strip", z.ZodTypeAny, {
    type: "system.notification";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "system.notification";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        kind: {
            status: "completed" | "failed";
            type: "agent_completed";
            agentId: string;
            agentType: string;
            description?: string | undefined;
            prompt?: string | undefined;
        } | {
            type: "agent_idle";
            agentId: string;
            agentType: string;
            description?: string | undefined;
        } | {
            type: "new_inbox_message";
            summary: string;
            entryId: string;
            senderName: string;
            senderType: string;
        } | {
            type: "shell_completed";
            shellId: string;
            description?: string | undefined;
            exitCode?: number | undefined;
        } | {
            type: "shell_detached_completed";
            shellId: string;
            description?: string | undefined;
        } | {
            type: "instruction_discovered";
            sourcePath: string;
            triggerFile: string;
            triggerTool: string;
            description?: string | undefined;
        };
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

export declare type SystemNotificationKind = z.infer<typeof SystemNotificationKindSchema>;

declare const SystemNotificationKindSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
    type: z.ZodLiteral<"agent_completed">;
    agentId: z.ZodString;
    agentType: z.ZodString;
    status: z.ZodEnum<["completed", "failed"]>;
    description: z.ZodOptional<z.ZodString>;
    prompt: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    status: "completed" | "failed";
    type: "agent_completed";
    agentId: string;
    agentType: string;
    description?: string | undefined;
    prompt?: string | undefined;
}, {
    status: "completed" | "failed";
    type: "agent_completed";
    agentId: string;
    agentType: string;
    description?: string | undefined;
    prompt?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"agent_idle">;
    agentId: z.ZodString;
    agentType: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    type: "agent_idle";
    agentId: string;
    agentType: string;
    description?: string | undefined;
}, {
    type: "agent_idle";
    agentId: string;
    agentType: string;
    description?: string | undefined;
}>, z.ZodObject<{
    type: z.ZodLiteral<"new_inbox_message">;
    entryId: z.ZodString;
    senderName: z.ZodString;
    senderType: z.ZodString;
    summary: z.ZodString;
}, "strip", z.ZodTypeAny, {
    type: "new_inbox_message";
    summary: string;
    entryId: string;
    senderName: string;
    senderType: string;
}, {
    type: "new_inbox_message";
    summary: string;
    entryId: string;
    senderName: string;
    senderType: string;
}>, 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;
    description?: string | undefined;
    exitCode?: number | undefined;
}, {
    type: "shell_completed";
    shellId: string;
    description?: string | undefined;
    exitCode?: number | 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;
}>, z.ZodObject<{
    type: z.ZodLiteral<"instruction_discovered">;
    sourcePath: z.ZodString;
    triggerFile: z.ZodString;
    triggerTool: z.ZodString;
    description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
    type: "instruction_discovered";
    sourcePath: string;
    triggerFile: string;
    triggerTool: string;
    description?: string | undefined;
}, {
    type: "instruction_discovered";
    sourcePath: string;
    triggerFile: string;
    triggerTool: 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.
 *
 * `custom_instructions` targets repository and organization custom instruction
 * sources. `runtime_instructions` targets runtime-provided context and instructions,
 * assembled into the CLI prompt's internal `additionalInstructions` slot from
 * sources such as `systemMessage.content`, system notifications, memories,
 * workspace context, mode-specific instructions, and content-exclusion policy.
 */
declare type SystemPromptSection = "identity" | "tone" | "tool_efficiency" | "environment_context" | "code_change_rules" | "guidelines" | "safety" | "tool_instructions" | "custom_instructions" | "runtime_instructions" | "last_instructions";

/**
 * Callback invoked whenever the set of tracked tasks changes.
 */
declare type TaskChangeCallback = () => void;

declare interface TaskCompleteInput {
    summary: string;
}

declare const TaskCompleteToolName = "task_complete";

/**
 * 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 promotable sync waits waiting to be released into background mode */
    private readonly promotionWaiters;
    /** Resolvers for waitForAgents() callers waiting on a task to leave the running state */
    private readonly statusWaiters;
    private onChangeCallback?;
    private onCompletionCallback?;
    private onAgentIdleCallback?;
    private onAgentStartedCallback?;
    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;
    /**
     * Set a callback that fires when a new agent task is registered.
     * Used to emit session events (e.g. subagent.started) for background agents.
     */
    setOnAgentStartedCallback(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;
    /**
     * Promote an active agent task into background mode.
     *
     * If a sync caller is currently waiting on the agent's first turn, that
     * wait is released so the caller can continue while the agent keeps running.
     */
    promoteAgentToBackground(id: string, requesterId: string): boolean;
    /**
     * Whether the given agent task currently has a promotable sync wait.
     */
    canPromoteAgentToBackground(id: 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).
     * Pass null to wait without a timeout.
     * @param releaseOnPromotion - Whether explicit background promotion should release this wait early.
     * Use this only for the initial sync task-tool wait; background/read_agent waits should continue
     * waiting for the next turn or completion.
     * @returns The task entry and optional result, or undefined if not found
     */
    getAgentResult(agentId: string, wait?: boolean, timeoutMs?: number | null, releaseOnPromotion?: boolean): Promise<{
        task: AgentTaskEntry;
        result?: unknown;
        timedOut?: boolean;
        promoted?: boolean;
    } | undefined>;
    /**
     * Sends a message to an agent's message queue.
     * If the agent is idle, wakes it up to process the message.
     * For MCP-task agents with a steerCallback (SEP-2669), routes through `tasks/steer`.
     */
    sendMessage(agentId: string, message: AgentMessage): Promise<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 | undefined): void;
    /**
     * Updates MCP-task-specific progress data on an agent identified by its
     * agent ID (NOT its tool call ID — see why below). Absent fields on
     * `update` are left untouched.
     *
     * Looking up by agent ID rather than tool call ID matters because MCP
     * tasks are registered with a synthetic tool call ID that the consumer
     * doesn't generally know. The agent ID, by contrast, is returned from
     * `startAgent` and threaded through the stream consumer directly.
     *
     * Side effect: when `update.statusMessage` is provided we also mirror it
     * into `progress.latestIntent` so existing TUI surfaces (which consume the
     * generic intent line) light up without needing MCP-specific awareness.
     */
    updateMcpTask(agentId: string, update: Partial<McpTaskInfo>): void;
    /** Updates aggregate SEP-2694 event-stream state for an MCP-task agent. */
    updateMcpTaskEventStream(agentId: string, update: Partial<McpTaskEventStreamInfo>): void;
    /** Records a processed SEP-2694 task event without retaining the raw event payload. */
    recordMcpTaskEvent(agentId: string, event: {
        seq: number;
        hasSequenceGap?: boolean;
        hasNonVendorEventType?: boolean;
        warningMessage?: string;
    }): void;
    /**
     * Installs a SEP-2669 steer callback on an MCP-task agent. When present,
     * `sendMessage()` routes through this callback instead of rejecting.
     */
    setSteerCallback(agentId: string, callback: (message: string) => Promise<void>): 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;
    /**
     * Sets executor-provided telemetry on an agent's progress info.
     * Looked up by agent ID (not toolCallId).
     */
    setExecutorTelemetry(agentId: string, telemetry: AgentProgressInfo["executorTelemetry"]): void;
    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;
    /**
     * Remove a specific promotion waiter from the waiter list to prevent leaks on timeout.
     */
    private removePromotionWaiter;
}

/**
 * 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?: HydroTelemetryOptions): void;
    /** Whether restricted telemetry should be sent for eligible users who have not opted out. */
    abstract shouldSendRestrictedTelemetry(): boolean;
    abstract dispose(): Promise<void> | void;
    /**
     * Override the host-editor attribution (`common_extname` + `editor_version`)
     * applied to legacy `copilot_v0` usage events. Pass `undefined` to clear the
     * override and fall back to the default CLI attribution. Default no-op;
     * implemented by {@link AppInsightsTelemetryService}.
     */
    setUsageMetricsAttribution(_attribution: UsageMetricsAttribution | undefined): 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?: HydroTelemetryOptions): 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, {
    type: "terminal";
    text: string;
    cwd?: string | undefined;
    exitCode?: number | undefined;
}, {
    type: "terminal";
    text: string;
    cwd?: string | undefined;
    exitCode?: number | undefined;
}>;

declare interface TestInjectedScopedMemories {
    repoMemories?: string;
    userMemories?: string;
    repoName?: string;
    userLogin?: string;
    /**
     * Test-only: store_memory tool definition version to inject. When set to a
     * scope-aware version (>= 1.1.0), `getMemoryTools` registers the scope-aware
     * `store_memory` schema, allowing evals to assert that the agent picked the
     * correct memory scope. Has no effect on production paths.
     */
    storeToolDefinitionVersion?: string;
}

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, {
    type: "text";
    text: string;
}, {
    type: "text";
    text: string;
}>;

/** Tiered token pricing (API >= 2026-06-01). */
declare type TieredTokenPrices = {
    batch_size?: number;
    default: TokenPriceTier;
    long_context?: TokenPriceTier;
};

declare type TimedOutToolResult = ToolResultExpanded & {
    resultType: "timeout";
};

declare interface TodoEntry {
    content: string;
    status: TodoEntryStatus;
}

declare type TodoEntryStatus = "completed" | "pending" | "in_progress";

/** Represents a Token authentication information using in the SDK. */
declare type TokenAuthInfo = {
    readonly type: "token";
    readonly host: string;
    readonly token: string;
    readonly copilotUser?: CopilotUserResponse;
};

/**
 * Token count details for a specific token type.
 */
export declare interface TokenDetails {
    tokenCount: number;
}

/**
 * A single pricing tier (API >= 2026-06-01). `context_max` is the prompt token
 * budget (`max_prompt_tokens`); the total context window is `context_max + max_output_tokens`.
 */
declare type TokenPriceTier = {
    input_price?: number;
    output_price?: number;
    cache_price?: number;
    /**
     * Prompt token budget (`max_prompt_tokens`) for this tier. The model
     * reserves `max_output_tokens` on top, so the total context window equals
     * `context_max + max_output_tokens`.
     */
    context_max?: number;
};

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;
    /** When true, tool output should always be displayed expanded in the CLI timeline. */
    displayVerbatim?: boolean;
    safeForTelemetry: {
        name: boolean;
        inputsNames: boolean;
    };
    filterMode?: ContentFilterMode;
    disableSecretMasking?: boolean;
    /**
     * MCP Apps (SEP-1865) tool metadata, populated from the server's
     * `tools/list` response when the tool declares an `_meta.ui` block.
     * Only carried when MCP Apps is enabled for the session.
     */
    _meta?: {
        ui?: McpUiToolMeta;
    };
    /** MCP task support level declared by the tool via `execution.taskSupport`. */
    taskSupport?: "required" | "optional" | "forbidden";
};

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;
    };
};

declare type ToolConfig = {
    /**
     * Where a tool should initially set its current working directory.
     */
    location: string;
    /**
     * Session ID for the current session. Used by hooks.
     */
    sessionId?: string;
    /**
     * When set, identifies a parent session whose trajectory subagents
     * should consolidate (e.g., when this session is a detached headless
     * child spawned on the parent's interactive shutdown). Mirrors
     * {@link Session.detachedFromSpawningParentSessionId}; flows into `ConsolidationContext`
     * so the rem-agent reads the parent's turns/checkpoints rather than
     * this session's empty trajectory.
     */
    detachedFromSpawningParentSessionId?: string;
    /**
     * Path to the session transcript (events.jsonl file). Used by hooks.
     */
    transcriptPath?: string;
    /**
     * Timeout in milliseconds.
     */
    timeout?: number;
    /**
     * Optional callback for progress events.
     */
    callback?: IAgentCallback;
    /**
     * Whether to push changes to remote.
     */
    push?: boolean;
    /**
     * The branch name our work will be done within.
     */
    branchName?: string;
    /**
     * Use separate tools for file editing.
     * @default false
     */
    splitEditingTools?: boolean;
    /**
     * The style of editing tools to use. Apply patch uses the Codex Apply Patch tool to apply changes to the file.
     * @default "replace"
     */
    editingToolsStyle?: "replace" | "apply-patch";
    /**
     * Grep tool name
     * @default "grep"
     */
    grepToolName?: string;
    /**
     * Glob tool name
     * @default "glob"
     */
    globToolName?: string;
    /**
     * Whether focused grep/glob/view prompt instructions are enabled.
     */
    focusedToolPrompts?: boolean;
    /**
     * A callback that is called when a tool call is in progress, allowing for
     * partial output to be sent back to the user.
     */
    toolPartialResultCallback?: ToolPartialOutputCallback;
    /**
     * A callback that is called when a tool reports progress (e.g., from MCP servers).
     */
    toolProgressCallback?: ToolProgressCallback;
    /**
     * Factory to create a sub-agent callback that properly emits session events.
     * Used by tools like the task tool that run sub-agents.
     */
    createSubAgentCallback?: (agentId: string) => IAgentCallback;
    /**
     * Custom API provider configuration (BYOK - Bring Your Own Key).
     * When set, sub-agents use this provider instead of defaulting to Copilot API authentication.
     * Propagated from the parent session's provider config.
     */
    providerConfig?: ProviderConfig;
    /**
     * CAPI request context for sub-agent telemetry header propagation.
     * Contains fields passed to sub-agent CAPI clients for correlation.
     */
    capiRequestContext?: {
        /** The parent agent's task ID (GUID), sent as X-Parent-Agent-Id. */
        parentAgentTaskId?: string;
        /** The current interaction ID (GUID), shared across parent and sub-agents for the same user message. */
        interactionId?: string;
    };
    /**
     * List of available models for the current user (based on policy).
     * Used by tools like the task tool to validate model overrides.
     */
    availableModels?: AvailableModelInfo[];
    /**
     * Whether the current user is on usage-based (token-based) billing.
     * When `true`, the subagent cost-multiplier guard is bypassed because
     * subagent usage is billed directly rather than drawn from a quota.
     */
    tokenBasedBilling?: boolean;
    /**
     * If the codeql tool should be included. Default is false.
     */
    includeCodeQLTool?: boolean;
    /**
     * If the dependency checker tool should be included in security prompt snippets. Default is false.
     */
    includeDependencyChecker?: boolean;
    /**
     * If the secret scanning tool should be included in security prompt snippets. Default is false.
     */
    includeSecretScanning?: boolean;
    /**
     * Configuration for the shell tool.
     */
    shellConfig?: ShellConfig;
    /**
     * Request permission from the permissions service.
     */
    permissions: PermissionsConfig;
    /**
     * Options for handling large outputs (used by shell tool for streaming).
     */
    largeOutputOptions?: LargeOutputOptions;
    /**
     * Session filesystem for session-scoped file I/O.
     * Available when running within a session context.
     */
    sessionFs?: SessionFs;
    /** Session canvas API for renderer-capable sessions. */
    canvasApi?: SessionCanvasApi;
    /**
     * Custom skill directories to search for skills.
     */
    skillDirectories?: string[];
    /**
     * Whether ambient repo/user capability discovery is enabled.
     */
    enableConfigDiscovery?: boolean;
    /**
     * Whether embedding-based instruction retrieval is active.
     * When true, at least one index type is enabled for dynamic retrieval.
     */
    embeddingRetrievalEnabled?: boolean;
    /**
     * Set of enabled embedding index types.
     * Each entry indicates which instruction source should be indexed and
     * retrieved dynamically via embeddings. Extensible for future index types.
     * - "skill": enabled when skills count > 25
     * - "mcp-server": enabled when deferred MCP instructions exist
     */
    embeddingRetrievalIndexTypes?: Set<InstructionSource_2>;
    /**
     * Set of skill names that are disabled.
     */
    disabledSkills?: Set<string>;
    /**
     * Set of instruction source IDs that are disabled.
     * Used by sub-agents to respect session-scoped instruction toggles.
     */
    disabledInstructionSources?: ReadonlySet<string>;
    /**
     * List of installed plugins from user config.
     * Used for loading plugin skills.
     */
    installedPlugins?: InstalledPlugin[];
    /**
     * Current working directory for skill traversal.
     * When provided along with `location` (git root), enables loading skills
     * from parent directories between cwd and the git root (monorepo support).
     */
    cwd?: string;
    /**
     * Remote skills from Job DTO. These are merged with locally
     * loaded skills, with local taking precedence.
     */
    remoteSkills?: Skill[];
    /**
     * Skills loaded for the current session.
     * Used by sub-agent eager skill injection to resolve skill names to Skill objects.
     */
    loadedSkills?: readonly Skill[];
    /**
     * Emits audit metadata for skills that are loaded outside the skill tool lifecycle
     * (for example, custom-agent configured skills injected directly into context).
     */
    skillInvocationEmitter?: (invocation: SkillInvocation, agentId?: string) => void;
    /**
     * User-defined custom agents. If a tool exists which orchestrates the execution of
     * sub-agents, it should make these agents available for execution.
     */
    customAgents?: SweCustomAgent[];
    /**
     * MCP tools available to whoever is initializing built-in tools. If a tool exists which
     * orchestrates the execution of sub-agents, it should make these tools available to
     * those sub-agents.
     */
    mcpTools?: Tool_2[];
    /**
     * Session-level external tools (registered by SDK clients or extensions at runtime).
     * If a tool exists which orchestrates the execution of sub-agents, it should make
     * these tools available to those sub-agents.
     */
    externalTools?: Tool_2[];
    /**
     * Filter function to determine if a tool should be enabled. If a tool exists which
     * orchestrates the execution of sub-agents, it should use this to filter the
     * tools made available to those sub-agents.
     */
    filterTool?: (tool: ToolMetadata) => boolean;
    /**
     * Function to get an MCP server provider for a specific agent. If a tool exists which orchestrates the
     * execution of sub-agents, it can use this to get MCP server providers for those agents.
     */
    getMcpServerProviderForAgent?: (agentName: string, agentMcpServers: Record<string, MCPServerConfig>) => Promise<McpServerProvider | undefined>;
    /**
     * Callback invoked when a new file is created. Can be used to refresh file search caches.
     */
    onFileCreated?: (path: string) => void;
    /**
     * Callback invoked after a successful file access. Can be used to discover
     * additional instruction sources near the accessed path.
     *
     * @param path The file path that was accessed
     * @param tool The tool command that triggered the access
     * @returns Newly discovered instruction sources, or undefined if none were found
     */
    onFileAccessed?: (path: string, tool: string) => Promise<InstructionSource[] | undefined>;
    /**
     * Callback invoked when a tool wants to emit a warning to the session timeline.
     * Used for non-fatal issues that the user should be aware of.
     */
    onWarning?: (message: string) => void;
    /**
     * Function to request user input from the UI (CLI only).
     * When provided, enables the ask_user tool for interactive clarification.
     */
    requestUserInput?: (request: {
        question: string;
        choices?: string[];
        allowFreeform?: boolean;
    }) => Promise<{
        answer: string;
        wasFreeform: boolean;
    }>;
    /**
     * Function to request structured form-based input from the UI via the elicitation framework.
     * When provided alongside the ASK_USER_ELICITATION feature flag, replaces the standard ask_user tool.
     */
    requestElicitation?: (request: ElicitRequestFormParams) => Promise<ElicitResult>;
    /**
     * Path to the workspace directory for infinite sessions.
     * Used by tools that need to access session-specific storage (e.g., SQL tool).
     * Only available when INFINITE_SESSIONS feature flag is enabled.
     */
    workspacePath?: string;
    /**
     * Feature flags for the current session.
     * Used by tools to check experimental/staff features.
     */
    featureFlags?: FeatureFlags;
    /**
     * Whether the user's enterprise/org policy allows session search features.
     * When false, cloud session store queries and session sync prompts are disabled.
     * Derived from the `cloud_session_storage_enabled` field on the /copilot_internal/user response.
     */
    cloudSessionStorageEnabled?: boolean;
    /**
     * Feature flag service for accessing ExP-driven flags.
     * Used by tools that need to await ExP assignments before checking flags.
     */
    featureFlagService?: IFeatureFlagService;
    /**
     * Callback for subagentStart hook. Called when a subagent is about to be spawned.
     * Returns additionalContext to inject into the subagent.
     */
    onSubagentStart?: (input: {
        sessionId: string;
        transcriptPath: string;
        agentName: string;
        agentDisplayName?: string;
        agentDescription?: string;
    }) => Promise<{
        additionalContext?: string;
    } | undefined | void>;
    /**
     * Callback for subagentStop hook. Called when a subagent is about to complete.
     * Returns a decision to block (continue) or allow the stop.
     */
    onSubagentStop?: (input: {
        sessionId: string;
        transcriptPath: string;
        agentName: string;
        agentDisplayName?: string;
    }) => Promise<{
        decision?: "block" | "allow";
        reason?: string;
    } | undefined | void>;
    /**
     * Builds a HooksProcessor for the legacy sub-agent executor path so inner
     * tool calls run user preToolUse / postToolUse hooks. Returns undefined when
     * no hooks are configured. Session-based sub-agents build their own hook
     * pipeline inside the child LocalSession and do not consume this factory.
     */
    createSubagentHooksProcessor?: (toolCallId: string) => Promise<HooksProcessor | undefined>;
    /**
     * Whether autopilot mode is currently active.
     * When true, the task_complete tool is included in the toolset.
     */
    autopilotActive?: boolean;
    /**
     * Whether plan mode is currently active.
     * When true (and {@link onExitPlanMode} is provided), the exit_plan_mode
     * tool is included in the toolset. Outside plan mode, the tool is hidden
     * regardless of whether a responder callback or event listener exists.
     */
    planModeActive?: boolean;
    /**
     * Callback invoked when the exit_plan_mode tool is called.
     * Shows an approval dialog with the agent's summary and returns the user's response.
     *
     * Note: presence of this callback indicates that a responder is available
     * (either a direct SDK callback or an event-listener bridge). It does not
     * by itself expose the tool — see {@link planModeActive}.
     */
    onExitPlanMode?: (request: ExitPlanModeRequest) => Promise<ExitPlanModeResponse>;
    /**
     * Languages that have LSP support available in the current project.
     * Used by sub-agents to include LSP guidance in their prompts.
     */
    lspLanguages?: string[];
    /**
     * Whether automatic completion notifications are enabled for background tasks.
     * When true, the agent will be notified when background agents or shell commands complete.
     * This should only be enabled in environments that support immediate prompts (e.g., CLI).
     */
    backgroundTaskNotificationsEnabled?: boolean;
    /**
     * Whether this tool config is for a subagent (not the top-level agent).
     * When true, background task mode and multi-turn registry paths are disabled
     * to prevent notifications from leaking to the parent session.
     */
    isSubagent?: boolean;
    /**
     * Content exclusion service for filtering files based on organization policies.
     * May be undefined when the service is not yet initialized (e.g., before auth).
     */
    contentExclusionService?: ContentExclusionService;
    /**
     * Unified registry for tracking all background tasks (agents and shells).
     */
    taskRegistry?: TaskRegistry;
    /**
     * Session-owned inbox for asynchronous context from sidekick agents.
     */
    inbox?: Inbox;
    /**
     * Returns whether any sidekick agents are registered.
     * Awaits initialization so the answer is final before tools are built.
     */
    hasSidekickAgents?: () => Promise<boolean>;
    /**
     * Callback for publishing inbox entries from sidekick agents.
     * When set, the `send_inbox` tool is created in the tool pipeline.
     * The callback encapsulates per-launch state: send count, freshness checks, inbox write.
     */
    sendInboxPublisher?: SendInboxPublisher;
    /**
     * Per-session dynamic-context-board state. When present, the `context_board`
     * tool is created in the tool pipeline. Inherited by subagents through the
     * task tool's effective config so subagents that allowlist `context_board`
     * can read/write the shared board.
     */
    dynamicContext?: {
        store: SessionStore;
        repository: string;
        branch: string;
    };
    /**
     * Shell tool context for this session, created lazily by getShellTools.
     */
    shellContext?: InteractiveShellToolContext;
    /**
     * Shared mutable cache for Memory API results, passed from the
     * session into every ToolConfig.
     */
    memoryApiCache?: MemoryApiCache;
    /**
     * Client name to report in LSP sessions.
     */
    lspClientName?: string;
    /**
     * Directory path for logging raw interactive shell PTY data.
     * When set, each shell session writes a log file to this directory.
     */
    shellLogsPath?: string;
    /**
     * Optional emitter for telemetry events from tools that operate outside the
     * normal tool result lifecycle (e.g., memory retrieval during prompt construction,
     * or aggregate metrics at shutdown). Wired to session.sendTelemetry() in CLI.
     *
     * When both callback (CCA) and telemetryEmitter (CLI) are available on a tool,
     * callback.progress() takes precedence.
     */
    telemetryEmitter?: (event: TelemetryEvent_2) => void;
    /**
     * Whether LLM completions should use streaming.
     * Propagated from the parent session so sub-agents respect the session's streaming config.
     * Defaults to true when not set.
     */
    enableStreaming?: boolean;
    /**
     * Runtime context for filtering builtin agents (e.g., "cli", "cca", "sdk").
     * When set, only agents whose `contexts` include this value are available.
     */
    agentContext?: AgentContext;
    /** Current sub-agent nesting depth (0 = top-level session). */
    subAgentDepth?: number;
    /**
     * Agent executors for running subagents. Set during tool initialization
     * and used by `Session.startSubagent()` to delegate agent execution
     * without duplicating the routing logic in the task tool.
     */
    agentExecutors?: AgentExecutors;
    /**
     * Factory to create an ephemeral LocalSession configured as a subagent.
     * Set by the parent session in buildSettingsAndTools(). Used by SessionAgentExecutor
     * to create child sessions that inherit auth, working dir, depth, interaction type, etc.
     */
    createSubagentSession?: (agentId: string, options?: SubagentSessionOptions) => LocalSession;
    /**
     * Schedule management API. When present, the `manage_schedule`
     * tool is created in the CLI toolset so the model can create/list/stop
     * recurring prompts.
     */
    scheduleApi?: ScheduleApi;
    /**
     * CAPI model list from the parent session, used for model metadata lookups
     * (e.g., model family, vendor, CAPI-reported reasoning efforts).
     * Populated from `Session.getModelListCache()` when building tools.
     */
    models?: readonly Model[];
};

/**
 * Result for when a tool call is denied due to content exclusion policy.
 */
declare function toolDeniedByContentExclusionResult(filePath: string, message: string): Readonly<DeniedToolResult_2>;

declare function toolDeniedByRulesResult(rules: ReadonlyArray<Rule>, customMessage?: string): Readonly<DeniedToolResult_2>;

declare const toolDeniedWithoutUserRequest: Readonly<DeniedToolResult_2>;

export declare type ToolExecutionCompleteEvent = z.infer<typeof ToolExecutionCompleteEventSchema>;

/**
 * Tool execution completes (success or error)
 */
export declare const ToolExecutionCompleteEventSchema: z.ZodObject<{
    id: z.ZodString;
    timestamp: z.ZodString;
    parentId: z.ZodNullable<z.ZodString>;
    ephemeral: z.ZodOptional<z.ZodBoolean>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
                type: "text";
                text: string;
            }, {
                type: "text";
                text: string;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"terminal">;
                text: z.ZodString;
                exitCode: z.ZodOptional<z.ZodNumber>;
                cwd: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            }, {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"image">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                type: "image";
                data: string;
                mimeType: string;
            }, {
                type: "image";
                data: string;
                mimeType: string;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"audio">;
                data: z.ZodString;
                mimeType: z.ZodString;
            }, "strip", z.ZodTypeAny, {
                type: "audio";
                data: string;
                mimeType: string;
            }, {
                type: "audio";
                data: string;
                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?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }, {
                    src: string;
                    theme?: "dark" | "light" | 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;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            }, {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            }>, z.ZodObject<{
                type: z.ZodLiteral<"resource">;
                resource: z.ZodUnion<[z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    text: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>, z.ZodObject<{
                    uri: z.ZodString;
                    mimeType: z.ZodOptional<z.ZodString>;
                    blob: z.ZodString;
                }, "strip", z.ZodTypeAny, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }, {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                }>]>;
            }, "strip", z.ZodTypeAny, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }, {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            }>]>, "many">>;
            /**
             * MCP Apps (SEP-1865) UI resource resolved alongside the tool result.
             * Present when the tool declared `_meta.ui.resourceUri` and the host
             * fetched the resource. Hosts render this in a sandboxed iframe per
             * the SEP-1865 security model.
             */
            uiResource: z.ZodOptional<z.ZodObject<{
                uri: z.ZodString;
                mimeType: z.ZodString;
                text: z.ZodOptional<z.ZodString>;
                blob: z.ZodOptional<z.ZodString>;
                _meta: z.ZodOptional<z.ZodObject<{
                    ui: z.ZodOptional<z.ZodObject<{
                        csp: z.ZodOptional<z.ZodObject<{
                            connectDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            resourceDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            frameDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                            baseUriDomains: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                        }, "strip", z.ZodTypeAny, {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        }, {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        }>>;
                        permissions: z.ZodOptional<z.ZodObject<{
                            camera: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                            microphone: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                            geolocation: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                            clipboardWrite: z.ZodOptional<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>;
                        }, "strip", z.ZodTypeAny, {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        }, {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        }>>;
                        domain: z.ZodOptional<z.ZodString>;
                        prefersBorder: z.ZodOptional<z.ZodBoolean>;
                    }, "strip", z.ZodTypeAny, {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    }, {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    }>>;
                }, "strip", z.ZodTypeAny, {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                }, {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                }>>;
            }, "strip", z.ZodTypeAny, {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            }, {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            }>>;
        }, "strip", z.ZodTypeAny, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        }, {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        }>>;
        error: z.ZodOptional<z.ZodObject<{
            message: z.ZodString;
            code: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            message: string;
            code?: string | undefined;
        }, {
            message: string;
            code?: string | undefined;
        }>>;
        toolTelemetry: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        /** Identifier for the agent loop turn this tool was invoked in. */
        turnId: z.ZodOptional<z.ZodString>;
        /**
         * MCP Apps (SEP-1865) tool definition metadata for the completed tool.
         * Populated for MCP tools that declare `_meta.ui` so consumers can locate
         * the linked UI resource without an extra lookup.
         */
        toolDescription: z.ZodOptional<z.ZodObject<{
            name: z.ZodString;
            description: z.ZodOptional<z.ZodString>;
            _meta: z.ZodOptional<z.ZodObject<{
                ui: z.ZodOptional<z.ZodObject<{
                    resourceUri: z.ZodOptional<z.ZodString>;
                    visibility: z.ZodOptional<z.ZodArray<z.ZodEnum<["model", "app"]>, "many">>;
                }, "strip", z.ZodTypeAny, {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                }, {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                }>>;
            }, "strip", z.ZodTypeAny, {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            }, {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            }>>;
        }, "strip", z.ZodTypeAny, {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        }, {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        }>>;
        /** Whether this tool was executed inside a sandbox container. */
        sandboxed: z.ZodOptional<z.ZodBoolean>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    }, {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "tool.execution_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "tool.execution_complete";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        success: boolean;
        toolCallId: string;
        result?: {
            content: string;
            detailedContent?: string | undefined;
            contents?: ({
                type: "text";
                text: string;
            } | {
                type: "terminal";
                text: string;
                cwd?: string | undefined;
                exitCode?: number | undefined;
            } | {
                type: "image";
                data: string;
                mimeType: string;
            } | {
                type: "audio";
                data: string;
                mimeType: string;
            } | {
                type: "resource_link";
                name: string;
                uri: string;
                description?: string | undefined;
                title?: string | undefined;
                mimeType?: string | undefined;
                icons?: {
                    src: string;
                    theme?: "dark" | "light" | undefined;
                    mimeType?: string | undefined;
                    sizes?: string[] | undefined;
                }[] | undefined;
                size?: number | undefined;
            } | {
                type: "resource";
                resource: {
                    text: string;
                    uri: string;
                    mimeType?: string | undefined;
                } | {
                    blob: string;
                    uri: string;
                    mimeType?: string | undefined;
                };
            })[] | undefined;
            uiResource?: {
                mimeType: string;
                uri: string;
                blob?: string | undefined;
                text?: string | undefined;
                _meta?: {
                    ui?: {
                        permissions?: {
                            camera?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            microphone?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            geolocation?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                            clipboardWrite?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | undefined;
                        } | undefined;
                        csp?: {
                            connectDomains?: string[] | undefined;
                            resourceDomains?: string[] | undefined;
                            frameDomains?: string[] | undefined;
                            baseUriDomains?: string[] | undefined;
                        } | undefined;
                        domain?: string | undefined;
                        prefersBorder?: boolean | undefined;
                    } | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        error?: {
            message: string;
            code?: string | undefined;
        } | undefined;
        model?: string | undefined;
        interactionId?: string | undefined;
        turnId?: string | undefined;
        parentToolCallId?: string | undefined;
        isUserRequested?: boolean | undefined;
        toolTelemetry?: Record<string, unknown> | undefined;
        toolDescription?: {
            name: string;
            description?: string | undefined;
            _meta?: {
                ui?: {
                    resourceUri?: string | undefined;
                    visibility?: ("model" | "app")[] | undefined;
                } | undefined;
            } | undefined;
        } | undefined;
        sandboxed?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | 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>;
    agentId: z.ZodOptional<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, {
    type: "tool.execution_partial_result";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    agentId?: string | undefined;
}, {
    type: "tool.execution_partial_result";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        partialOutput: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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, {
    type: "tool.execution_progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    agentId?: string | undefined;
}, {
    type: "tool.execution_progress";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        progressMessage: string;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    type: z.ZodLiteral<"tool.execution_start">;
    data: z.ZodObject<{
        toolCallId: z.ZodString;
        toolName: z.ZodString;
        arguments: z.ZodUnknown;
        /** The model that generated the tool call. */
        model: z.ZodOptional<z.ZodString>;
        mcpServerName: z.ZodOptional<z.ZodString>;
        mcpToolName: z.ZodOptional<z.ZodString>;
        /** Identifier for the agent loop turn this tool was invoked in. */
        turnId: z.ZodOptional<z.ZodString>;
        displayVerbatim: z.ZodOptional<z.ZodBoolean>;
    } & {
        parentToolCallId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    }, {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "tool.execution_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "tool.execution_start";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        mcpServerName?: string | undefined;
        mcpToolName?: string | undefined;
        model?: string | undefined;
        turnId?: string | undefined;
        arguments?: unknown;
        parentToolCallId?: string | undefined;
        displayVerbatim?: boolean | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

/**
 * Controls how `availableTools` (allowlist) and `excludedTools` (denylist) combine when
 * both are set.
 *
 * - `"available"` (default): if `availableTools` is set, it is the only constraint
 *   that applies — `excludedTools` is ignored. If `availableTools` is unset, `excludedTools`
 *   acts as a denylist. This preserves the historic behaviour of the CLI
 *   `--available-tools` / `--excluded-tools` flags and pre-existing SDK / JSON-RPC clients.
 * - `"excluded"`: a tool is enabled iff it matches the allowlist (or the allowlist
 *   is unset) AND it does not match the denylist. This makes "all except X" expressible
 *   by combining the two lists, e.g. `availableTools=["builtin:*"]`, `excludedTools=["builtin:bash"]`.
 *
 * Callers opt into `"excluded"` explicitly via `SessionOptions.toolFilterPrecedence`;
 * everything else continues to use `"available"`.
 */
declare type ToolFilterPrecedence = "available" | "excluded";

/**
 * 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;
    /**
     * Where this tool came from. Always set — required so the compiler enforces that
     * every tool registration site declares its source.
     */
    source: ToolSource;
    /** 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;
    /**
     * Controls whether this tool is eligible for automatic deferral when the
     * tool-search mechanism is active.
     * - `"auto"` (default): the tool may be deferred when the total tool count
     *   exceeds the deferral threshold.
     * - `"never"`: the tool is always included in the initial tool list sent to
     *   the model, even when tool search is enabled. Use this for tools that the
     *   host system prompt mandates the model call.
     */
    defer?: "auto" | "never";
    /**
     * 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;
    /**
     * When true, the tool's output should always be displayed expanded (verbatim)
     * in the CLI timeline, similar to how local shell tool output is shown.
     * Set from the MCP tool annotation `displayVerbatim`.
     */
    displayVerbatim?: 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;
    /**
     * MCP Apps (SEP-1865) tool metadata. Carries `_meta.ui` (resourceUri,
     * visibility) for tools backed by MCP servers that opt into the UI extension.
     * Only set when MCP Apps is enabled for the session.
     */
    _meta?: {
        ui?: McpUiToolMeta;
    };
};

declare type ToolPartialOutputCallback = (callId: string, output: string) => void;

declare type ToolProgressCallback = (callId: string, progressMessage: string) => void;

/**
 * Result for when the user explicitly rejects a permission request, optionally with feedback
 * on what they'd like the tool to do differently.
 */
declare function toolRejectedByUserResult(feedback?: string): Readonly<DeniedToolResult_2 | RejectedToolResult_2>;

declare const toolRejectionResult: Readonly<RejectedToolResult_2>;

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;
    /**
     * Base64-encoded image or resource content returned to the LLM.
     */
    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;
    /**
     * MCP Apps (SEP-1865) UI resource fetched alongside the tool result.
     * Populated by the MCP transport when the invoked tool has
     * `_meta.ui.resourceUri` and the auto-fetch succeeded. Hosts render this
     * inside a sandboxed iframe.
     */
    uiResource?: McpUiResource;
    /** MCP `CallToolResult._meta`, forwarded verbatim. Populated for MCP tools when `FIDES_IFC` is on. */
    mcpMeta?: Record<string, unknown>;
};

declare namespace tools {
    export {
        isToolResultExpanded,
        buildToolCallbackOptions,
        getGrepToolNameFromTools,
        getToolSource,
        getMcpInfo,
        resolveFocusedToolPrompts,
        getRemovedToolsByName,
        getAddedToolsByName,
        getToolNamesFromHistory,
        summarizeToolCall,
        AvailableModelInfo,
        FileEditedMetrics,
        FileEditedRestrictedProperties,
        InjectedUserMessage,
        ToolResultExpanded,
        SkillInvocationTrigger,
        SkillInvocation,
        RejectedToolResult,
        DeniedToolResult,
        FailedToolResult,
        TimedOutToolResult,
        ToolResult,
        BinaryResult,
        ToolCallbackOptions,
        ToolCallback,
        ToolShutdown,
        ToolPartialOutputCallback,
        ToolProgressCallback,
        ToolInputSchema,
        CustomToolInputFormat,
        ToolSource,
        ToolMetadata,
        ValidationTool,
        Tool_2 as Tool,
        CUSTOM_TOOL_NAMES,
        MemoryApiCache,
        ToolConfig,
        SubAgentToolConfigOverrides,
        stubAssessScriptSafety,
        PossiblePath,
        PossibleUrl,
        AssessedCommand,
        SafetyAssessment,
        ShellInitProfile,
        ShellConfig,
        ShellType,
        createToolSet,
        localShellToolName,
        createAskUserTool,
        AskUserToolName,
        AUTOPILOT_ASK_USER_RESPONSE,
        AskUserRequest,
        AskUserResponse,
        RequestUserInputFn,
        AskUserInput,
        createCanvasTools,
        buildCodeReviewModelSchema,
        findAutofindBinary,
        isRateLimitError,
        isAutofindNotFoundError,
        ModelName,
        DEFAULT_CODE_REVIEW_MODEL,
        MAX_CODE_REVIEW_FILE_COUNT,
        CODE_REVIEW_TOOL_NAME,
        CODE_REVIEW_TOOL_TITLE,
        CODE_REVIEW_FF_NAME,
        CODE_REVIEW_DISABLE_FF_NAME,
        isCodeReviewFeatureEnabled,
        LineNumber,
        ColumnNumber,
        Location_2 as Location,
        DetectedResult,
        GoDetectorOutput,
        GoInputFile,
        parallelValidationInputSchema,
        CodeReviewInput,
        CodeReviewToolOptions,
        CodeReviewTool,
        CodeQLCheckerTool,
        CREATE_PULL_REQUEST_TOOL_NAME,
        createPullRequestInputSchema,
        CreatePullRequestInput,
        createPullRequestToolDescription,
        createPullRequestToolInstructions,
        createPullRequestTool,
        isDependencyCheckerEnabled,
        checkDependencies,
        DEPENDENCY_CHECKER_TOOL_NAME,
        DEPENDENCY_CHECKER_FF_NAME,
        USER_AGENT,
        dependencySchema,
        dependencyCheckerInputSchema,
        DependencyCheckerInput,
        dependencyCheckerTool,
        FETCH_DOCUMENTATION_TOOL_NAME,
        fetch_copilot_cli_documentation,
        shouldWriteToFile,
        formatBytes,
        generateLargeOutputMessage,
        writeResultToFile,
        processLargeOutput,
        buildLargeOutputOptions,
        registerTempFile,
        cleanupTempFiles,
        getCreatedTempFiles,
        LargeOutputOptions,
        DEFAULT_LARGE_OUTPUT_THRESHOLD,
        USER_REQUESTED_SHELL_OUTPUT_CONTEXT_MAX_INLINE_BYTES,
        VIEW_TOOL_LARGE_OUTPUT_THRESHOLD,
        VIEW_TOOL_SIZE_HINT,
        createLSPTool,
        createLSPRefactorTools,
        toolDeniedByRulesResult,
        getToolDeniedWithoutUserRequest,
        toolRejectedByUserResult,
        toolDeniedByContentExclusionResult,
        handlePermissionResult,
        alwaysApproveRequestPermissionFn,
        llmToolRejectionMessage,
        toolRejectionResult,
        toolDeniedWithoutUserRequest,
        PermissionResultMessages,
        HandlePermissionResultOptions,
        REPLY_TO_COMMENT_TOOL_NAME,
        replyToCommentInputSchema,
        ReplyToCommentInput,
        reply_to_comment,
        ReportIntentToolName,
        ReportIntentInput,
        reportIntentTool,
        handleProgressReport,
        REPORT_PROGRESS_TOOL_NAME,
        REPORT_PROGRESS_ONLY_PUSH_FEATURE_FLAG,
        reportProgressInputSchema,
        ReportProgressInput,
        reportProgressPushOnlyToolDescription,
        reportProgressLegacyToolDescription,
        report_progress,
        scanSecrets,
        SECRET_SCANNING_TOOL_NAME,
        secretScanningInputSchema,
        SecretScanningInput,
        secretScanningToolDescription,
        createSecretScanningTool,
        createSqlTool,
        SqlToolName,
        SQL_INTENT_TRACKING_FF_NAME,
        SqlInput,
        SessionStoreSqlToolName,
        SessionStoreSqlInput,
        createCloudSessionStoreSqlTool,
        CloudSessionStoreSqlInput,
        splitSqlStatements,
        isWriteToFileStrReplaceEditorCommand,
        isWriteToExistingFileStrReplaceEditorCommand,
        isCreateFileStrReplaceEditorCommand,
        doesStrReplaceEditorArgsWriteContentInclude,
        isStrReplaceEditorCall,
        getStrReplaceEditorArgsOrNull,
        readDirectoryListing,
        handleViewCommand,
        VIEW_TOOL_NAME,
        INSTRUCTION_DISCOVERY_MESSAGE_SOURCE,
        StrReplaceEditorOptions,
        StrReplaceEditorTelemetry,
        StrReplaceEditorResult,
        viewInputSchema,
        createInputSchema,
        editInputSchema,
        insertInputSchema,
        ViewInput,
        CreateInput,
        EditInput,
        InsertInput,
        strReplaceEditorArgsSchema,
        ViewArgs,
        CreateArgs,
        StrReplaceArgs,
        InsertArgs,
        StrReplaceEditorArgs,
        StrReplaceEditorShutdownTelemetry,
        editingTools,
        str_replace_editor,
        DirectoryListingResult,
        isAutopilotContinuationMessage,
        createTaskCompleteTool,
        TaskCompleteToolName,
        TaskCompleteInput,
        AUTOPILOT_CONTINUATION_MESSAGE,
        LARK_AUTOPILOT_CONTINUATION_MESSAGE,
        claudeModelSupportsToolSearch,
        gptModelSupportsToolSearch,
        createToolSearchTool,
        resolveIsToolSearchEnabled,
        resolveIsBuiltinToolSearchEnabled,
        markToolsAsDeferred,
        clearDeferralForAgentTools,
        ToolSearchToolName,
        GITHUB_MCP_SERVER_NAME,
        BLUEBIRD_MCP_SERVER_NAME,
        ToolSearchInput,
        ToolSearchToolOptions,
        DEFERRED_TOOLS_THRESHOLD,
        parseTodoCounts,
        parseTodoEntries,
        UpdateTodoToolName,
        UpdateTodoInput,
        TodoEntryStatus,
        TodoEntry,
        updateTodo
    }
}

declare interface ToolSearchInput {
    pattern: string;
    limit?: number;
}

declare const ToolSearchToolName = "tool_search_tool_regex";

/**
 * Options for creating the tool search tool.
 */
declare interface ToolSearchToolOptions {
    /**
     * Function that returns the current list of all tools (including deferred ones).
     * Called each time the model invokes tool_search so the results reflect the latest tool set.
     */
    getAllTools: () => ReadonlyArray<ToolMetadata>;
}

/**
 * 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>;

/**
 * Classifies a tool by where it was registered:
 * - `builtin`: shipped by the runtime
 * - `mcp`: provided by an MCP server
 * - `external`: registered by an SDK client via `externalToolDefinitions`
 *   (exposed in the tool-filter wire syntax as `custom:`)
 */
declare type ToolSource = "builtin" | "mcp" | "external";

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
    type: "tool.user_requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "tool.user_requested";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        toolCallId: string;
        toolName: string;
        arguments?: unknown;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

/**
 * Converts full Tool objects to lightweight ToolMetadata.
 * Strips non-serializable callback properties (callback, shutdown, summariseIntention)
 * and ensures `source` is populated — defaulting to "builtin" for tools registered
 * without an explicit source. After this point, downstream code can read
 * `tool.source` directly instead of deriving it.
 */
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;

/**
 * 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 | SandboxedStdioClientTransport | 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;
};

/**
 * A conversation turn (user→assistant pair).
 */
declare interface TurnRow {
    session_id: string;
    turn_index: number;
    user_message?: string;
    assistant_response?: string;
    timestamp?: unknown;
}

/** Listener registration shape returned by `Session.on(...)`. */
declare type Unsubscribe = () => void;

export declare type UpdatableSessionOptions = Omit<SessionOptions, "sessionId" | "startTime" | "modifiedTime" | "summary" | "internalCorrelationIds" | "mcpTraceContextResolver" | "otelParentContextResolver" | "remoteDelegate" | "shellNotifier" | "telemetrySender" | "extensionController" | "featureFlagService">;

export declare interface UpdateOptionsBehavior {
    emitToolDefinitionsChanged?: boolean;
}

declare const updateTodo: (_config: ToolConfig) => Tool_2 | undefined;

declare interface UpdateTodoInput {
    todos: string;
}

declare const UpdateTodoToolName = "update_todo";

declare interface UrlManager {
    /**
     * Get all allowed URLs/domains
     */
    getUrls(): string[];
    /**
     * Check if a URL is allowed
     */
    isUrlAllowed(url: string): boolean;
    /**
     * Add a URL or domain to the allowed list
     */
    addUrl(url: string): Promise<void>;
    /**
     * Enable unrestricted mode where all URLs are allowed
     */
    setUnrestrictedMode(value: boolean): void;
    /**
     * Whether unrestricted mode is currently enabled (allows all URLs).
     */
    isUnrestrictedMode(): boolean;
}

/**
 * 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;
    /** Session-wide accumulated nano-AI units cost. */
    totalNanoAiu: number;
    /** Session-wide token count details per type. */
    tokenDetails: Map<string, TokenDetails>;
    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;
}

/**
 * Overrides for the host-editor fields of legacy `copilot_v0` usage events
 * (`common_extname` + `editor_version`). Used to attribute usage to the editor
 * driving the CLI (e.g. a JetBrains IDE over ACP) instead of the CLI itself in
 * the public Copilot usage-metrics product.
 */
declare interface UsageMetricsAttribution {
    /** Value emitted as `editor_version` (e.g. `"JetBrains.PyCharm/2025.3.2.1"`). */
    editorVersion: string;
    /** Value emitted as `common_extname` (e.g. `"JetBrains.PyCharm"`). */
    commonExtName: string;
}

/**
 * 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 accumulateTokenDetails;
    private accumulateCopilotUsage;
    private processCompactionComplete;
    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;
}

declare const USER_AGENT = "security agent";

/** Smaller inline threshold for user-initiated shell output injected into the next model turn. */
declare const USER_REQUESTED_SHELL_OUTPUT_CONTEXT_MAX_INLINE_BYTES: number;

/** Represents the user-based authentication information (OAuth). */
declare type UserAuthInfo = {
    readonly type: "user";
    readonly host: string;
    readonly login: string;
    readonly copilotUser?: CopilotUserResponse;
};

/**
 * A permission request that will be presented to the user for specific commands.
 */
declare type UserCommandsPermissionRequest = {
    readonly kind: "commands";
    readonly fullCommandText: string;
    readonly intention: string;
    readonly commandIdentifiers: ReadonlyArray<string>;
    readonly canOfferSessionApproval: boolean;
    readonly warning?: string;
};

/**
 * A custom tool permission request that will be presented to the user.
 */
declare type UserCustomToolPermissionRequest = {
    readonly kind: "custom-tool";
    readonly toolName: string;
    readonly toolDescription: string;
    readonly args?: unknown;
};

/**
 * An extension management permission request that will be presented to the user.
 */
declare type UserExtensionManagementPermissionRequest = {
    readonly kind: "extension-management";
    readonly operation: string;
    readonly extensionName?: string;
};

/**
 * An extension permission access request that will be presented to the user.
 */
declare type UserExtensionPermissionAccessRequest = {
    readonly kind: "extension-permission-access";
    readonly extensionName: string;
    readonly capabilities: string[];
};

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>;
    agentId: z.ZodOptional<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, {
    type: "user_input.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "user_input.completed";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        answer?: string | undefined;
        wasFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}>;

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>;
    agentId: z.ZodOptional<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, {
    type: "user_input.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}, {
    type: "user_input.requested";
    ephemeral: true;
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        requestId: string;
        question: string;
        choices?: string[] | undefined;
        toolCallId?: string | undefined;
        allowFreeform?: boolean | undefined;
    };
    agentId?: string | undefined;
}>;

declare type UserInputResponse = {
    answer: string;
    wasFreeform: boolean;
    dismissed?: boolean;
};

/**
 * A write permission request that we expect will be presented to the user in some manner.
 */
declare type UserMCPPermissionRequest = {
    readonly kind: "mcp";
    readonly serverName: string;
    readonly toolName: string;
    readonly toolTitle: string;
    readonly args: unknown;
};

declare type UserMessage = {
    id: string;
    actor_id: number;
    content: string;
    timestamp: number;
};

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>;
    agentId: z.ZodOptional<z.ZodString>;
} & {
    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, {
                start: number;
                end: number;
            }, {
                start: number;
                end: number;
            }>>;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }, {
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"directory">;
            path: z.ZodString;
            displayName: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            type: "directory";
            displayName: string;
        }, {
            path: string;
            type: "directory";
            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, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }, {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            }>;
        }, "strip", z.ZodTypeAny, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }, {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"github_reference">;
            number: z.ZodNumber;
            title: z.ZodString;
            referenceType: z.ZodEnum<["issue", "pr", "discussion"]>;
            state: z.ZodString;
            url: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            number: number;
            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, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }, {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        }>, z.ZodObject<{
            type: z.ZodLiteral<"extension_context">;
            extensionId: z.ZodString;
            canvasId: z.ZodOptional<z.ZodString>;
            instanceId: z.ZodOptional<z.ZodString>;
            title: z.ZodString;
            payload: z.ZodUnknown;
            capturedAt: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }, {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        }>]>, "many">>;
        supportedNativeDocumentMimeTypes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        nativeDocumentPathFallbackPaths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        source: z.ZodOptional<z.ZodString>;
        /** The agent mode active when this message was sent */
        agentMode: z.ZodOptional<z.ZodEnum<["interactive", "plan", "autopilot", "shell"]>>;
        isAutopilotContinuation: z.ZodOptional<z.ZodBoolean>;
        /** The CAPI interaction ID for this user message turn */
        interactionId: z.ZodOptional<z.ZodString>;
        /** Parent agent task ID for background telemetry correlated to this user turn */
        parentAgentTaskId: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    }, {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    }>;
}, "strip", z.ZodTypeAny, {
    type: "user.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}, {
    type: "user.message";
    id: string;
    timestamp: string;
    parentId: string | null;
    data: {
        content: string;
        source?: string | undefined;
        transformedContent?: string | undefined;
        attachments?: ({
            path: string;
            type: "file";
            displayName: string;
            lineRange?: {
                start: number;
                end: number;
            } | undefined;
        } | {
            path: string;
            type: "directory";
            displayName: string;
        } | {
            type: "selection";
            displayName: string;
            selection: {
                start: {
                    line: number;
                    character: number;
                };
                end: {
                    line: number;
                    character: number;
                };
            };
            filePath: string;
            text: string;
        } | {
            number: number;
            type: "github_reference";
            url: string;
            state: string;
            title: string;
            referenceType: "pr" | "issue" | "discussion";
        } | {
            type: "blob";
            data: string;
            mimeType: string;
            displayName?: string | undefined;
        } | {
            type: "extension_context";
            title: string;
            extensionId: string;
            capturedAt: string;
            instanceId?: string | undefined;
            canvasId?: string | undefined;
            payload?: unknown;
        })[] | undefined;
        supportedNativeDocumentMimeTypes?: string[] | undefined;
        nativeDocumentPathFallbackPaths?: string[] | undefined;
        agentMode?: "interactive" | "autopilot" | "plan" | "shell" | undefined;
        isAutopilotContinuation?: boolean | undefined;
        interactionId?: string | undefined;
        parentAgentTaskId?: string | undefined;
    };
    ephemeral?: boolean | undefined;
    agentId?: string | undefined;
}>;

declare class UserMessageSentimentTelemetry implements Disposable_2 {
    private readonly session;
    private previousUserMessage;
    private unsubscribe;
    constructor(session: Session);
    private isEnabled;
    dispose(): void;
    handleUserMessage(event: UserMessageEvent): Promise<void>;
    private judgeUserMessageSentiment;
}

/**
 * A response to a user path permission request.
 */
declare type UserPathPermissionRequestResponse = {
    readonly kind: "approve-once";
} | {
    readonly kind: "approve-for-session";
} | {
    readonly kind: "reject";
} | {
    readonly kind: "user-not-available";
};

export declare type UserPromptSubmittedHook = Hook<UserPromptSubmittedHookInput, UserPromptSubmittedHookOutput>;

/**
 * User prompt submitted hook types
 */
export declare interface UserPromptSubmittedHookInput extends BaseHookInput {
    prompt: string;
}

export declare interface UserPromptSubmittedHookOutput {
    modifiedPrompt?: string;
    additionalContext?: string;
    suppressOutput?: boolean;
    /**
     * If true, the hook has fully handled the request. The agentic loop will be
     * skipped and responseContent will be displayed as the assistant's response.
     */
    handled?: boolean;
    /**
     * The response content to display when handled is true. Supports markdown.
     * Required when handled is true.
     */
    responseContent?: string;
    /**
     * Optional identifier for the handler (e.g., "typeagent", "custom-router").
     * Used for logging and attribution.
     */
    handledBy?: string;
    /**
     * If "block", the user prompt is blocked. The prompt should never reach the
     * model, chat history, or transcript.
     */
    decision?: HookBlockDecision;
    /** Human-readable explanation for why the prompt was blocked. */
    reason?: string;
}

/**
 * A read permission request that will be presented to the user.
 */
declare type UserReadPermissionRequest = {
    readonly kind: "read";
    readonly intention: string;
    readonly path: string;
};

/**
 * Options accepted by `Session.executeUserRequestedShellCommand`.
 *
 * Lives in its own module (rather than `src/core/session`) so CLI consumers
 * can import the type without violating the
 * `internal/no-direct-session-import-cli` ESLint boundary rule.
 */
declare interface UserRequestedShellCommandOptions {
    abortSignal?: AbortSignal;
}

/**
 * Result returned by `Session.executeUserRequestedShellCommand`.
 *
 * Lives in its own module (rather than `src/core/session`) so CLI consumers
 * can import the type without violating the
 * `internal/no-direct-session-import-cli` ESLint boundary rule.
 */
declare interface UserRequestedShellCommandResult {
    toolCallId: string;
    success: boolean;
    output: string;
    exitCode?: number | null;
    error?: string;
}

declare type UserSettings = z.infer<typeof _UserSettingsSchema>;

declare const UserSettings: {
    clearCache: () => void;
    load: (settings: RuntimeSettings | undefined) => Promise<UserSettings>;
    /**
     * Load only the legacy config.json store (without the settings.json overlay),
     * so callers can detect when a write to settings.json will be shadowed by an
     * unmigrated value in config.json.
     */
    loadLegacyConfig: (settings: RuntimeSettings | undefined) => Promise<UserSettings | undefined>;
    /**
     * Load only settings.json (without merging in the legacy config.json overlay).
     * Use when callers want the literal contents of the user settings file — for
     * example to compute a write payload that won't accidentally bake in legacy
     * sibling values, or to populate UI state that represents what's actually
     * persisted in settings.json.
     */
    loadSettingsFileOnly: (settings: RuntimeSettings | undefined) => Promise<UserSettings | undefined>;
    /**
     * Load only settings.json, distinguishing missing-file from parse-failure.
     * Used by write paths that need to refuse the operation when the file
     * exists but is malformed — overwriting in that state would destroy the
     * user's edits. Accepts JSONC (comments + trailing commas), matching the
     * parser the rest of the persistence layer uses.
     *
     * Returns:
     * - `"ok"` — file exists (or is empty/whitespace, treated as `{}`) and
     *   parses as a JSON object. Note: this does NOT run the full
     *   `UserSettingsSchema` validation — bad-but-typed values in unrelated
     *   fields (e.g. a typo'd `logLevel`) must not lock callers out of
     *   `/settings` set/reset for OTHER fields. Callers should validate the
     *   touched top-level subtree (see `validateUserSettingsTopKey`) before
     *   writing, not the whole file.
     * - `"missing"` — `ENOENT` / `ENOTDIR`.
     * - `"invalid"` — file exists and is non-empty but couldn't be parsed
     *   as JSONC (syntax error) or the root isn't an object.
     *
     * Other I/O errors (e.g. `EACCES`, `EISDIR`, `EBUSY`) are rethrown so
     * callers can surface an accurate read-error message rather than
     * misreporting them as "could not be parsed".
     */
    loadSettingsFileForEdit: (settings: RuntimeSettings | undefined) => Promise<{
        status: "ok";
        settings: UserSettings;
    } | {
        status: "missing";
    } | {
        status: "invalid";
    }>;
    /**
     * Replaces the contents of settings.json with `data`, deleting any
     * top-level keys not present in `data`. Unlike `write` (which merges into
     * the existing file), this is a true-replace operation — needed so the
     * /settings dialog's "open in editor" flow can delete keys.
     *
     * Uses the same locked + atomic + private-mode write path as every
     * other settings write (`writeRawAtomic`):
     *   - per-key mutex prevents races with concurrent `writeKey` callers,
     *   - tmp + rename ensures readers never see a torn settings.json,
     *   - directory created at `0o700`, file at `0o600`.
     */
    writeAll: (data: UserSettings, settings: RuntimeSettings | undefined) => Promise<void>;
    home: (settings?: RuntimeSettings) => string;
    write: (data: 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"]>>;
        showTipsOnStartup: z.ZodOptional<z.ZodBoolean>;
        beep: z.ZodOptional<z.ZodBoolean>;
        beepOnSchedule: z.ZodOptional<z.ZodBoolean>;
        keepAlive: z.ZodOptional<z.ZodEnum<["on", "off", "busy"]>>;
        includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
        compactPaste: z.ZodOptional<z.ZodBoolean>;
        copyOnSelect: z.ZodOptional<z.ZodBoolean>;
        respectGitignore: z.ZodOptional<z.ZodBoolean>;
        builtInAgents: z.ZodOptional<z.ZodObject<{
            rubberDuck: z.ZodOptional<z.ZodBoolean>;
            rubberDuckAutoInvoke: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            rubberDuck?: boolean | undefined;
            rubberDuckAutoInvoke?: boolean | undefined;
        }, {
            rubberDuck?: boolean | undefined;
            rubberDuckAutoInvoke?: boolean | undefined;
        }>>;
        memory: z.ZodOptional<z.ZodBoolean>;
        model: z.ZodOptional<z.ZodString>;
        effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
        contextTier: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "long_context"]>>>;
        continueOnAutoMode: z.ZodOptional<z.ZodBoolean>;
        renderMarkdown: z.ZodOptional<z.ZodBoolean>;
        remoteExport: z.ZodOptional<z.ZodBoolean>;
        statusLine: z.ZodOptional<z.ZodObject<{
            type: z.ZodLiteral<"command">;
            command: z.ZodString;
            padding: z.ZodOptional<z.ZodNumber>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command: string;
            padding?: number | undefined;
        }, {
            type: "command";
            command: string;
            padding?: number | undefined;
        }>>;
        screenReader: z.ZodOptional<z.ZodBoolean>;
        theme: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "dark", "light"]>, z.ZodString]>>;
        colorMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "github", "dim", "high-contrast", "colorblind"]>>>;
        allowedUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        deniedUrls: 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<{
            showModelEffort: z.ZodOptional<z.ZodBoolean>;
            showDirectory: z.ZodOptional<z.ZodBoolean>;
            showBranch: z.ZodOptional<z.ZodBoolean>;
            showContextWindow: z.ZodOptional<z.ZodBoolean>;
            showQuota: z.ZodOptional<z.ZodBoolean>;
            showAiUsed: z.ZodOptional<z.ZodBoolean>;
            showAgent: z.ZodOptional<z.ZodBoolean>;
            showCodeChanges: z.ZodOptional<z.ZodBoolean>;
            showUsername: z.ZodOptional<z.ZodBoolean>;
            showSandbox: z.ZodOptional<z.ZodBoolean>;
            showCustom: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            showModelEffort?: boolean | undefined;
            showDirectory?: boolean | undefined;
            showBranch?: boolean | undefined;
            showContextWindow?: boolean | undefined;
            showQuota?: boolean | undefined;
            showAiUsed?: boolean | undefined;
            showAgent?: boolean | undefined;
            showCodeChanges?: boolean | undefined;
            showUsername?: boolean | undefined;
            showSandbox?: boolean | undefined;
            showCustom?: boolean | undefined;
        }, {
            showModelEffort?: boolean | undefined;
            showDirectory?: boolean | undefined;
            showBranch?: boolean | undefined;
            showContextWindow?: boolean | undefined;
            showQuota?: boolean | undefined;
            showAiUsed?: boolean | undefined;
            showAgent?: boolean | undefined;
            showCodeChanges?: boolean | undefined;
            showUsername?: boolean | undefined;
            showSandbox?: boolean | undefined;
            showCustom?: boolean | undefined;
        }>>;
        tabs: z.ZodOptional<z.ZodObject<{
            /** When false, hides the home tab bar entirely. */
            enabled: z.ZodOptional<z.ZodBoolean>;
            /**
             * Order in which tabs are displayed. Tabs not listed keep their
             * default relative order after the listed ones. Unknown
             * identifiers are ignored.
             */
            sort: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            /** Tab identifiers to hide. Unknown identifiers are ignored. */
            hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        }, "strip", z.ZodTypeAny, {
            sort?: string[] | undefined;
            enabled?: boolean | undefined;
            hide?: string[] | undefined;
        }, {
            sort?: string[] | undefined;
            enabled?: boolean | undefined;
            hide?: string[] | undefined;
        }>>;
        updateTerminalTitle: z.ZodOptional<z.ZodBoolean>;
        terminalProgress: z.ZodOptional<z.ZodBoolean>;
        mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
        customAgents: z.ZodOptional<z.ZodObject<{
            defaultLocalOnly: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            defaultLocalOnly?: boolean | undefined;
        }, {
            defaultLocalOnly?: boolean | undefined;
        }>>;
        ide: z.ZodOptional<z.ZodObject<{
            autoConnect: z.ZodOptional<z.ZodBoolean>;
            openDiffOnEdit: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            autoConnect?: boolean | undefined;
            openDiffOnEdit?: boolean | undefined;
        }, {
            autoConnect?: boolean | undefined;
            openDiffOnEdit?: 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>;
            /**
             * User-managed sandbox policy fragment (edited via `/sandbox` TUI).
             * Mirrors the `SandboxPolicy` type from `@microsoft/mxc-sdk` (minus
             * `version`, which the runtime injects). Merged into the
             * auto-discovered base policy at spawn time.
             *
             * Ignored when `config` (raw `ContainerConfig` passthrough) is set.
             */
            userPolicy: z.ZodOptional<z.ZodObject<{
                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>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">>>;
                network: z.ZodOptional<z.ZodObject<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">>>;
                /**
                 * Platform-specific experimental policy fields that map to
                 * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
                 * Only honored when the runtime spawns the SDK with
                 * `{ experimental: true }` (currently macOS only).
                 */
                experimental: z.ZodOptional<z.ZodObject<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">>>;
                network: z.ZodOptional<z.ZodObject<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">>>;
                /**
                 * Platform-specific experimental policy fields that map to
                 * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
                 * Only honored when the runtime spawns the SDK with
                 * `{ experimental: true }` (currently macOS only).
                 */
                experimental: z.ZodOptional<z.ZodObject<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">>>;
                network: z.ZodOptional<z.ZodObject<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">>>;
                /**
                 * Platform-specific experimental policy fields that map to
                 * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
                 * Only honored when the runtime spawns the SDK with
                 * `{ experimental: true }` (currently macOS only).
                 */
                experimental: z.ZodOptional<z.ZodObject<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly
             * to `spawnSandboxFromConfig`, bypassing the auto-discovered base
             * policy and `userPolicy` merging. Intended for enterprise
             * governance layers that ship a pre-baked container config, and
             * for testing the passthrough path.
             *
             * When set, takes precedence over `userPolicy`.
             */
            config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            /** Whether to auto-add the current working directory to readwritePaths. Default: true. */
            addCurrentWorkingDirectory: z.ZodOptional<z.ZodBoolean>;
            /**
             * Routing flag (NOT a sandbox policy field). When `enabled` is
             * true, controls whether MCP servers are spawned inside the
             * sandbox. Defaults to true.
             */
            sandboxMcpServers: z.ZodOptional<z.ZodBoolean>;
            /**
             * Routing flag (NOT a sandbox policy field). When `enabled` is
             * true, controls whether LSP servers are spawned inside the
             * sandbox. Defaults to true.
             */
            sandboxLspServers: z.ZodOptional<z.ZodBoolean>;
        }, "strip", z.ZodTypeAny, {
            config?: Record<string, unknown> | undefined;
            enabled?: boolean | undefined;
            userPolicy?: z.objectOutputType<{
                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>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">>>;
                network: z.ZodOptional<z.ZodObject<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">>>;
                /**
                 * Platform-specific experimental policy fields that map to
                 * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
                 * Only honored when the runtime spawns the SDK with
                 * `{ experimental: true }` (currently macOS only).
                 */
                experimental: z.ZodOptional<z.ZodObject<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            addCurrentWorkingDirectory?: boolean | undefined;
            sandboxMcpServers?: boolean | undefined;
            sandboxLspServers?: boolean | undefined;
        }, {
            config?: Record<string, unknown> | undefined;
            enabled?: boolean | undefined;
            userPolicy?: z.objectInputType<{
                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>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    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>;
                }, z.ZodTypeAny, "passthrough">>>;
                network: z.ZodOptional<z.ZodObject<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    allowOutbound: z.ZodOptional<z.ZodBoolean>;
                    allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                    allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                    blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                }, z.ZodTypeAny, "passthrough">>>;
                /**
                 * Platform-specific experimental policy fields that map to
                 * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
                 * Only honored when the runtime spawns the SDK with
                 * `{ experimental: true }` (currently macOS only).
                 */
                experimental: z.ZodOptional<z.ZodObject<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    seatbelt: z.ZodOptional<z.ZodObject<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                        keychainAccess: z.ZodOptional<z.ZodBoolean>;
                    }, z.ZodTypeAny, "passthrough">>>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough"> | undefined;
            addCurrentWorkingDirectory?: boolean | undefined;
            sandboxMcpServers?: boolean | undefined;
            sandboxLspServers?: boolean | undefined;
        }>>;
        extensions: z.ZodOptional<z.ZodObject<{
            disabledExtensions: 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;
            disabledExtensions?: string[] | undefined;
        }, {
            mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
            disabledExtensions?: 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;
            };
        }>>>;
        strictKnownMarketplaces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
            source: z.ZodLiteral<"github">;
            repo: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            source: "github";
            repo: string;
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            source: "github";
            repo: string;
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"git">;
            url: z.ZodString;
            ref: z.ZodOptional<z.ZodString>;
            path: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "git";
            path?: string | undefined;
            ref?: string | undefined;
        }, {
            url: string;
            source: "git";
            path?: string | undefined;
            ref?: string | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"url">;
            url: z.ZodString;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
        }, "strip", z.ZodTypeAny, {
            url: string;
            source: "url";
            headers?: Record<string, string> | undefined;
        }, {
            url: string;
            source: "url";
            headers?: Record<string, string> | undefined;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"npm">;
            package: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "npm";
            package: string;
        }, {
            source: "npm";
            package: string;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"file">;
            path: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            path: string;
            source: "file";
        }, {
            path: string;
            source: "file";
        }>, 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<"hostPattern">;
            hostPattern: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "hostPattern";
            hostPattern: string;
        }, {
            source: "hostPattern";
            hostPattern: string;
        }>, z.ZodObject<{
            source: z.ZodLiteral<"pathPattern">;
            pathPattern: z.ZodString;
        }, "strip", z.ZodTypeAny, {
            source: "pathPattern";
            pathPattern: string;
        }, {
            source: "pathPattern";
            pathPattern: string;
        }>]>, "many">>;
        voice: z.ZodOptional<z.ZodObject<{
            /** When true, app boots with voice enabled (provided a model is selected). */
            enabled: z.ZodOptional<z.ZodBoolean>;
            /** Last-selected variant id from the foundry catalog. */
            selectedModel: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            enabled?: boolean | undefined;
            selectedModel?: string | undefined;
        }, {
            enabled?: boolean | undefined;
            selectedModel?: string | undefined;
        }>>;
        permissions: z.ZodOptional<z.ZodObject<{
            /** When set to "disable", prevents enabling bypass-permissions (yolo) mode. */
            disableBypassPermissionsMode: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            disableBypassPermissionsMode?: string | undefined;
        }, {
            disableBypassPermissionsMode?: string | undefined;
        }>>;
        copilotUrl: z.ZodOptional<z.ZodString>;
        showReasoning: z.ZodOptional<z.ZodBoolean>;
        disableAllHooks: z.ZodOptional<z.ZodBoolean>;
        hooks: z.ZodOptional<z.ZodType<z.objectOutputType<{
            sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
        }, z.ZodTypeAny, "passthrough">, z.ZodTypeDef, z.objectInputType<{
            sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            }>]>, "many">>;
            subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
            notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
                type: z.ZodLiteral<"http">;
                url: z.ZodEffects<z.ZodString, string, string>;
                headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
                allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                timeoutSec: z.ZodOptional<z.ZodNumber>;
                timeout: z.ZodOptional<z.ZodNumber>;
                _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, Omit<{
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }, "timeout">, {
                type: "http";
                url: string;
                headers?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
                allowedEnvVars?: string[] | undefined;
            }>, 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>;
                exec: z.ZodOptional<z.ZodString>;
                args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
            } & {
                matcher: z.ZodOptional<z.ZodString>;
            }, "strip", z.ZodTypeAny, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, {
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>, Omit<{
                type: "command";
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }, "command" | "timeout">, {
                type?: "command" | undefined;
                command?: string | undefined;
                bash?: string | undefined;
                powershell?: string | undefined;
                exec?: string | undefined;
                args?: string[] | undefined;
                cwd?: string | undefined;
                env?: Record<string, string> | undefined;
                timeoutSec?: number | undefined;
                timeout?: number | undefined;
                _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
                matcher?: string | undefined;
            }>]>, "many">>;
        }, z.ZodTypeAny, "passthrough">>>;
        remoteSessions: z.ZodOptional<z.ZodBoolean>;
        experimental: z.ZodOptional<z.ZodBoolean>;
        logLevel: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
    }, z.ZodTypeAny, "passthrough">, subDir?: string, settings?: RuntimeSettings) => Promise<void>;
    writeKey: (key: string | number, value: unknown, subDir?: string, settings?: RuntimeSettings, options?: {
        refuseOnReadFailure?: boolean;
    } | undefined) => Promise<void>;
    path: (subDir?: string, settings?: RuntimeSettings) => string;
    directoryFiles: (settings?: RuntimeSettings) => Promise<string[]>;
    directoryFilesWithMetadata: (settings?: RuntimeSettings) => Promise<{
        file: string;
        mtime: Date;
        birthtime: Date;
    }[]>;
};

declare const _UserSettingsSchema: 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"]>>;
    showTipsOnStartup: z.ZodOptional<z.ZodBoolean>;
    beep: z.ZodOptional<z.ZodBoolean>;
    beepOnSchedule: z.ZodOptional<z.ZodBoolean>;
    keepAlive: z.ZodOptional<z.ZodEnum<["on", "off", "busy"]>>;
    includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
    compactPaste: z.ZodOptional<z.ZodBoolean>;
    copyOnSelect: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    builtInAgents: z.ZodOptional<z.ZodObject<{
        rubberDuck: z.ZodOptional<z.ZodBoolean>;
        rubberDuckAutoInvoke: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        rubberDuck?: boolean | undefined;
        rubberDuckAutoInvoke?: boolean | undefined;
    }, {
        rubberDuck?: boolean | undefined;
        rubberDuckAutoInvoke?: boolean | undefined;
    }>>;
    memory: z.ZodOptional<z.ZodBoolean>;
    model: z.ZodOptional<z.ZodString>;
    effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    contextTier: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "long_context"]>>>;
    continueOnAutoMode: z.ZodOptional<z.ZodBoolean>;
    renderMarkdown: z.ZodOptional<z.ZodBoolean>;
    remoteExport: z.ZodOptional<z.ZodBoolean>;
    statusLine: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }>>;
    screenReader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "dark", "light"]>, z.ZodString]>>;
    colorMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "github", "dim", "high-contrast", "colorblind"]>>>;
    allowedUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    deniedUrls: 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<{
        showModelEffort: z.ZodOptional<z.ZodBoolean>;
        showDirectory: z.ZodOptional<z.ZodBoolean>;
        showBranch: z.ZodOptional<z.ZodBoolean>;
        showContextWindow: z.ZodOptional<z.ZodBoolean>;
        showQuota: z.ZodOptional<z.ZodBoolean>;
        showAiUsed: z.ZodOptional<z.ZodBoolean>;
        showAgent: z.ZodOptional<z.ZodBoolean>;
        showCodeChanges: z.ZodOptional<z.ZodBoolean>;
        showUsername: z.ZodOptional<z.ZodBoolean>;
        showSandbox: z.ZodOptional<z.ZodBoolean>;
        showCustom: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        showModelEffort?: boolean | undefined;
        showDirectory?: boolean | undefined;
        showBranch?: boolean | undefined;
        showContextWindow?: boolean | undefined;
        showQuota?: boolean | undefined;
        showAiUsed?: boolean | undefined;
        showAgent?: boolean | undefined;
        showCodeChanges?: boolean | undefined;
        showUsername?: boolean | undefined;
        showSandbox?: boolean | undefined;
        showCustom?: boolean | undefined;
    }, {
        showModelEffort?: boolean | undefined;
        showDirectory?: boolean | undefined;
        showBranch?: boolean | undefined;
        showContextWindow?: boolean | undefined;
        showQuota?: boolean | undefined;
        showAiUsed?: boolean | undefined;
        showAgent?: boolean | undefined;
        showCodeChanges?: boolean | undefined;
        showUsername?: boolean | undefined;
        showSandbox?: boolean | undefined;
        showCustom?: boolean | undefined;
    }>>;
    tabs: z.ZodOptional<z.ZodObject<{
        /** When false, hides the home tab bar entirely. */
        enabled: z.ZodOptional<z.ZodBoolean>;
        /**
         * Order in which tabs are displayed. Tabs not listed keep their
         * default relative order after the listed ones. Unknown
         * identifiers are ignored.
         */
        sort: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Tab identifiers to hide. Unknown identifiers are ignored. */
        hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        sort?: string[] | undefined;
        enabled?: boolean | undefined;
        hide?: string[] | undefined;
    }, {
        sort?: string[] | undefined;
        enabled?: boolean | undefined;
        hide?: string[] | undefined;
    }>>;
    updateTerminalTitle: z.ZodOptional<z.ZodBoolean>;
    terminalProgress: z.ZodOptional<z.ZodBoolean>;
    mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
    customAgents: z.ZodOptional<z.ZodObject<{
        defaultLocalOnly: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        defaultLocalOnly?: boolean | undefined;
    }, {
        defaultLocalOnly?: boolean | undefined;
    }>>;
    ide: z.ZodOptional<z.ZodObject<{
        autoConnect: z.ZodOptional<z.ZodBoolean>;
        openDiffOnEdit: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        autoConnect?: boolean | undefined;
        openDiffOnEdit?: boolean | undefined;
    }, {
        autoConnect?: boolean | undefined;
        openDiffOnEdit?: 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>;
        /**
         * User-managed sandbox policy fragment (edited via `/sandbox` TUI).
         * Mirrors the `SandboxPolicy` type from `@microsoft/mxc-sdk` (minus
         * `version`, which the runtime injects). Merged into the
         * auto-discovered base policy at spawn time.
         *
         * Ignored when `config` (raw `ContainerConfig` passthrough) is set.
         */
        userPolicy: z.ZodOptional<z.ZodObject<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">>>;
        /**
         * Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly
         * to `spawnSandboxFromConfig`, bypassing the auto-discovered base
         * policy and `userPolicy` merging. Intended for enterprise
         * governance layers that ship a pre-baked container config, and
         * for testing the passthrough path.
         *
         * When set, takes precedence over `userPolicy`.
         */
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        /** Whether to auto-add the current working directory to readwritePaths. Default: true. */
        addCurrentWorkingDirectory: z.ZodOptional<z.ZodBoolean>;
        /**
         * Routing flag (NOT a sandbox policy field). When `enabled` is
         * true, controls whether MCP servers are spawned inside the
         * sandbox. Defaults to true.
         */
        sandboxMcpServers: z.ZodOptional<z.ZodBoolean>;
        /**
         * Routing flag (NOT a sandbox policy field). When `enabled` is
         * true, controls whether LSP servers are spawned inside the
         * sandbox. Defaults to true.
         */
        sandboxLspServers: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        config?: Record<string, unknown> | undefined;
        enabled?: boolean | undefined;
        userPolicy?: z.objectOutputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        addCurrentWorkingDirectory?: boolean | undefined;
        sandboxMcpServers?: boolean | undefined;
        sandboxLspServers?: boolean | undefined;
    }, {
        config?: Record<string, unknown> | undefined;
        enabled?: boolean | undefined;
        userPolicy?: z.objectInputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        addCurrentWorkingDirectory?: boolean | undefined;
        sandboxMcpServers?: boolean | undefined;
        sandboxLspServers?: boolean | undefined;
    }>>;
    extensions: z.ZodOptional<z.ZodObject<{
        disabledExtensions: 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;
        disabledExtensions?: string[] | undefined;
    }, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabledExtensions?: 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;
        };
    }>>>;
    strictKnownMarketplaces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
        source: z.ZodLiteral<"github">;
        repo: z.ZodString;
        ref: z.ZodOptional<z.ZodString>;
        path: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        source: "github";
        repo: string;
        path?: string | undefined;
        ref?: string | undefined;
    }, {
        source: "github";
        repo: string;
        path?: string | undefined;
        ref?: string | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"git">;
        url: z.ZodString;
        ref: z.ZodOptional<z.ZodString>;
        path: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        source: "git";
        path?: string | undefined;
        ref?: string | undefined;
    }, {
        url: string;
        source: "git";
        path?: string | undefined;
        ref?: string | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"url">;
        url: z.ZodString;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        source: "url";
        headers?: Record<string, string> | undefined;
    }, {
        url: string;
        source: "url";
        headers?: Record<string, string> | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"npm">;
        package: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "npm";
        package: string;
    }, {
        source: "npm";
        package: string;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"file">;
        path: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        path: string;
        source: "file";
    }, {
        path: string;
        source: "file";
    }>, 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<"hostPattern">;
        hostPattern: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "hostPattern";
        hostPattern: string;
    }, {
        source: "hostPattern";
        hostPattern: string;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"pathPattern">;
        pathPattern: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "pathPattern";
        pathPattern: string;
    }, {
        source: "pathPattern";
        pathPattern: string;
    }>]>, "many">>;
    voice: z.ZodOptional<z.ZodObject<{
        /** When true, app boots with voice enabled (provided a model is selected). */
        enabled: z.ZodOptional<z.ZodBoolean>;
        /** Last-selected variant id from the foundry catalog. */
        selectedModel: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        enabled?: boolean | undefined;
        selectedModel?: string | undefined;
    }, {
        enabled?: boolean | undefined;
        selectedModel?: string | undefined;
    }>>;
    permissions: z.ZodOptional<z.ZodObject<{
        /** When set to "disable", prevents enabling bypass-permissions (yolo) mode. */
        disableBypassPermissionsMode: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        disableBypassPermissionsMode?: string | undefined;
    }, {
        disableBypassPermissionsMode?: string | undefined;
    }>>;
    copilotUrl: z.ZodOptional<z.ZodString>;
    showReasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: z.ZodOptional<z.ZodBoolean>;
    hooks: z.ZodOptional<z.ZodType<z.objectOutputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.ZodTypeDef, z.objectInputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    remoteSessions: 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"]>>;
    showTipsOnStartup: z.ZodOptional<z.ZodBoolean>;
    beep: z.ZodOptional<z.ZodBoolean>;
    beepOnSchedule: z.ZodOptional<z.ZodBoolean>;
    keepAlive: z.ZodOptional<z.ZodEnum<["on", "off", "busy"]>>;
    includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
    compactPaste: z.ZodOptional<z.ZodBoolean>;
    copyOnSelect: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    builtInAgents: z.ZodOptional<z.ZodObject<{
        rubberDuck: z.ZodOptional<z.ZodBoolean>;
        rubberDuckAutoInvoke: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        rubberDuck?: boolean | undefined;
        rubberDuckAutoInvoke?: boolean | undefined;
    }, {
        rubberDuck?: boolean | undefined;
        rubberDuckAutoInvoke?: boolean | undefined;
    }>>;
    memory: z.ZodOptional<z.ZodBoolean>;
    model: z.ZodOptional<z.ZodString>;
    effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    contextTier: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "long_context"]>>>;
    continueOnAutoMode: z.ZodOptional<z.ZodBoolean>;
    renderMarkdown: z.ZodOptional<z.ZodBoolean>;
    remoteExport: z.ZodOptional<z.ZodBoolean>;
    statusLine: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }>>;
    screenReader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "dark", "light"]>, z.ZodString]>>;
    colorMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "github", "dim", "high-contrast", "colorblind"]>>>;
    allowedUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    deniedUrls: 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<{
        showModelEffort: z.ZodOptional<z.ZodBoolean>;
        showDirectory: z.ZodOptional<z.ZodBoolean>;
        showBranch: z.ZodOptional<z.ZodBoolean>;
        showContextWindow: z.ZodOptional<z.ZodBoolean>;
        showQuota: z.ZodOptional<z.ZodBoolean>;
        showAiUsed: z.ZodOptional<z.ZodBoolean>;
        showAgent: z.ZodOptional<z.ZodBoolean>;
        showCodeChanges: z.ZodOptional<z.ZodBoolean>;
        showUsername: z.ZodOptional<z.ZodBoolean>;
        showSandbox: z.ZodOptional<z.ZodBoolean>;
        showCustom: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        showModelEffort?: boolean | undefined;
        showDirectory?: boolean | undefined;
        showBranch?: boolean | undefined;
        showContextWindow?: boolean | undefined;
        showQuota?: boolean | undefined;
        showAiUsed?: boolean | undefined;
        showAgent?: boolean | undefined;
        showCodeChanges?: boolean | undefined;
        showUsername?: boolean | undefined;
        showSandbox?: boolean | undefined;
        showCustom?: boolean | undefined;
    }, {
        showModelEffort?: boolean | undefined;
        showDirectory?: boolean | undefined;
        showBranch?: boolean | undefined;
        showContextWindow?: boolean | undefined;
        showQuota?: boolean | undefined;
        showAiUsed?: boolean | undefined;
        showAgent?: boolean | undefined;
        showCodeChanges?: boolean | undefined;
        showUsername?: boolean | undefined;
        showSandbox?: boolean | undefined;
        showCustom?: boolean | undefined;
    }>>;
    tabs: z.ZodOptional<z.ZodObject<{
        /** When false, hides the home tab bar entirely. */
        enabled: z.ZodOptional<z.ZodBoolean>;
        /**
         * Order in which tabs are displayed. Tabs not listed keep their
         * default relative order after the listed ones. Unknown
         * identifiers are ignored.
         */
        sort: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Tab identifiers to hide. Unknown identifiers are ignored. */
        hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        sort?: string[] | undefined;
        enabled?: boolean | undefined;
        hide?: string[] | undefined;
    }, {
        sort?: string[] | undefined;
        enabled?: boolean | undefined;
        hide?: string[] | undefined;
    }>>;
    updateTerminalTitle: z.ZodOptional<z.ZodBoolean>;
    terminalProgress: z.ZodOptional<z.ZodBoolean>;
    mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
    customAgents: z.ZodOptional<z.ZodObject<{
        defaultLocalOnly: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        defaultLocalOnly?: boolean | undefined;
    }, {
        defaultLocalOnly?: boolean | undefined;
    }>>;
    ide: z.ZodOptional<z.ZodObject<{
        autoConnect: z.ZodOptional<z.ZodBoolean>;
        openDiffOnEdit: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        autoConnect?: boolean | undefined;
        openDiffOnEdit?: boolean | undefined;
    }, {
        autoConnect?: boolean | undefined;
        openDiffOnEdit?: 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>;
        /**
         * User-managed sandbox policy fragment (edited via `/sandbox` TUI).
         * Mirrors the `SandboxPolicy` type from `@microsoft/mxc-sdk` (minus
         * `version`, which the runtime injects). Merged into the
         * auto-discovered base policy at spawn time.
         *
         * Ignored when `config` (raw `ContainerConfig` passthrough) is set.
         */
        userPolicy: z.ZodOptional<z.ZodObject<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">>>;
        /**
         * Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly
         * to `spawnSandboxFromConfig`, bypassing the auto-discovered base
         * policy and `userPolicy` merging. Intended for enterprise
         * governance layers that ship a pre-baked container config, and
         * for testing the passthrough path.
         *
         * When set, takes precedence over `userPolicy`.
         */
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        /** Whether to auto-add the current working directory to readwritePaths. Default: true. */
        addCurrentWorkingDirectory: z.ZodOptional<z.ZodBoolean>;
        /**
         * Routing flag (NOT a sandbox policy field). When `enabled` is
         * true, controls whether MCP servers are spawned inside the
         * sandbox. Defaults to true.
         */
        sandboxMcpServers: z.ZodOptional<z.ZodBoolean>;
        /**
         * Routing flag (NOT a sandbox policy field). When `enabled` is
         * true, controls whether LSP servers are spawned inside the
         * sandbox. Defaults to true.
         */
        sandboxLspServers: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        config?: Record<string, unknown> | undefined;
        enabled?: boolean | undefined;
        userPolicy?: z.objectOutputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        addCurrentWorkingDirectory?: boolean | undefined;
        sandboxMcpServers?: boolean | undefined;
        sandboxLspServers?: boolean | undefined;
    }, {
        config?: Record<string, unknown> | undefined;
        enabled?: boolean | undefined;
        userPolicy?: z.objectInputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        addCurrentWorkingDirectory?: boolean | undefined;
        sandboxMcpServers?: boolean | undefined;
        sandboxLspServers?: boolean | undefined;
    }>>;
    extensions: z.ZodOptional<z.ZodObject<{
        disabledExtensions: 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;
        disabledExtensions?: string[] | undefined;
    }, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabledExtensions?: 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;
        };
    }>>>;
    strictKnownMarketplaces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
        source: z.ZodLiteral<"github">;
        repo: z.ZodString;
        ref: z.ZodOptional<z.ZodString>;
        path: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        source: "github";
        repo: string;
        path?: string | undefined;
        ref?: string | undefined;
    }, {
        source: "github";
        repo: string;
        path?: string | undefined;
        ref?: string | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"git">;
        url: z.ZodString;
        ref: z.ZodOptional<z.ZodString>;
        path: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        source: "git";
        path?: string | undefined;
        ref?: string | undefined;
    }, {
        url: string;
        source: "git";
        path?: string | undefined;
        ref?: string | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"url">;
        url: z.ZodString;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        source: "url";
        headers?: Record<string, string> | undefined;
    }, {
        url: string;
        source: "url";
        headers?: Record<string, string> | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"npm">;
        package: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "npm";
        package: string;
    }, {
        source: "npm";
        package: string;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"file">;
        path: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        path: string;
        source: "file";
    }, {
        path: string;
        source: "file";
    }>, 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<"hostPattern">;
        hostPattern: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "hostPattern";
        hostPattern: string;
    }, {
        source: "hostPattern";
        hostPattern: string;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"pathPattern">;
        pathPattern: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "pathPattern";
        pathPattern: string;
    }, {
        source: "pathPattern";
        pathPattern: string;
    }>]>, "many">>;
    voice: z.ZodOptional<z.ZodObject<{
        /** When true, app boots with voice enabled (provided a model is selected). */
        enabled: z.ZodOptional<z.ZodBoolean>;
        /** Last-selected variant id from the foundry catalog. */
        selectedModel: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        enabled?: boolean | undefined;
        selectedModel?: string | undefined;
    }, {
        enabled?: boolean | undefined;
        selectedModel?: string | undefined;
    }>>;
    permissions: z.ZodOptional<z.ZodObject<{
        /** When set to "disable", prevents enabling bypass-permissions (yolo) mode. */
        disableBypassPermissionsMode: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        disableBypassPermissionsMode?: string | undefined;
    }, {
        disableBypassPermissionsMode?: string | undefined;
    }>>;
    copilotUrl: z.ZodOptional<z.ZodString>;
    showReasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: z.ZodOptional<z.ZodBoolean>;
    hooks: z.ZodOptional<z.ZodType<z.objectOutputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.ZodTypeDef, z.objectInputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    remoteSessions: 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"]>>;
    showTipsOnStartup: z.ZodOptional<z.ZodBoolean>;
    beep: z.ZodOptional<z.ZodBoolean>;
    beepOnSchedule: z.ZodOptional<z.ZodBoolean>;
    keepAlive: z.ZodOptional<z.ZodEnum<["on", "off", "busy"]>>;
    includeCoAuthoredBy: z.ZodOptional<z.ZodBoolean>;
    compactPaste: z.ZodOptional<z.ZodBoolean>;
    copyOnSelect: z.ZodOptional<z.ZodBoolean>;
    respectGitignore: z.ZodOptional<z.ZodBoolean>;
    builtInAgents: z.ZodOptional<z.ZodObject<{
        rubberDuck: z.ZodOptional<z.ZodBoolean>;
        rubberDuckAutoInvoke: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        rubberDuck?: boolean | undefined;
        rubberDuckAutoInvoke?: boolean | undefined;
    }, {
        rubberDuck?: boolean | undefined;
        rubberDuckAutoInvoke?: boolean | undefined;
    }>>;
    memory: z.ZodOptional<z.ZodBoolean>;
    model: z.ZodOptional<z.ZodString>;
    effortLevel: z.ZodCatch<z.ZodOptional<z.ZodString>>;
    contextTier: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "long_context"]>>>;
    continueOnAutoMode: z.ZodOptional<z.ZodBoolean>;
    renderMarkdown: z.ZodOptional<z.ZodBoolean>;
    remoteExport: z.ZodOptional<z.ZodBoolean>;
    statusLine: z.ZodOptional<z.ZodObject<{
        type: z.ZodLiteral<"command">;
        command: z.ZodString;
        padding: z.ZodOptional<z.ZodNumber>;
    }, "strip", z.ZodTypeAny, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }, {
        type: "command";
        command: string;
        padding?: number | undefined;
    }>>;
    screenReader: z.ZodOptional<z.ZodBoolean>;
    theme: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "dark", "light"]>, z.ZodString]>>;
    colorMode: z.ZodCatch<z.ZodOptional<z.ZodEnum<["default", "github", "dim", "high-contrast", "colorblind"]>>>;
    allowedUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    deniedUrls: 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<{
        showModelEffort: z.ZodOptional<z.ZodBoolean>;
        showDirectory: z.ZodOptional<z.ZodBoolean>;
        showBranch: z.ZodOptional<z.ZodBoolean>;
        showContextWindow: z.ZodOptional<z.ZodBoolean>;
        showQuota: z.ZodOptional<z.ZodBoolean>;
        showAiUsed: z.ZodOptional<z.ZodBoolean>;
        showAgent: z.ZodOptional<z.ZodBoolean>;
        showCodeChanges: z.ZodOptional<z.ZodBoolean>;
        showUsername: z.ZodOptional<z.ZodBoolean>;
        showSandbox: z.ZodOptional<z.ZodBoolean>;
        showCustom: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        showModelEffort?: boolean | undefined;
        showDirectory?: boolean | undefined;
        showBranch?: boolean | undefined;
        showContextWindow?: boolean | undefined;
        showQuota?: boolean | undefined;
        showAiUsed?: boolean | undefined;
        showAgent?: boolean | undefined;
        showCodeChanges?: boolean | undefined;
        showUsername?: boolean | undefined;
        showSandbox?: boolean | undefined;
        showCustom?: boolean | undefined;
    }, {
        showModelEffort?: boolean | undefined;
        showDirectory?: boolean | undefined;
        showBranch?: boolean | undefined;
        showContextWindow?: boolean | undefined;
        showQuota?: boolean | undefined;
        showAiUsed?: boolean | undefined;
        showAgent?: boolean | undefined;
        showCodeChanges?: boolean | undefined;
        showUsername?: boolean | undefined;
        showSandbox?: boolean | undefined;
        showCustom?: boolean | undefined;
    }>>;
    tabs: z.ZodOptional<z.ZodObject<{
        /** When false, hides the home tab bar entirely. */
        enabled: z.ZodOptional<z.ZodBoolean>;
        /**
         * Order in which tabs are displayed. Tabs not listed keep their
         * default relative order after the listed ones. Unknown
         * identifiers are ignored.
         */
        sort: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
        /** Tab identifiers to hide. Unknown identifiers are ignored. */
        hide: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
    }, "strip", z.ZodTypeAny, {
        sort?: string[] | undefined;
        enabled?: boolean | undefined;
        hide?: string[] | undefined;
    }, {
        sort?: string[] | undefined;
        enabled?: boolean | undefined;
        hide?: string[] | undefined;
    }>>;
    updateTerminalTitle: z.ZodOptional<z.ZodBoolean>;
    terminalProgress: z.ZodOptional<z.ZodBoolean>;
    mergeStrategy: z.ZodOptional<z.ZodEnum<["rebase", "merge"]>>;
    customAgents: z.ZodOptional<z.ZodObject<{
        defaultLocalOnly: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        defaultLocalOnly?: boolean | undefined;
    }, {
        defaultLocalOnly?: boolean | undefined;
    }>>;
    ide: z.ZodOptional<z.ZodObject<{
        autoConnect: z.ZodOptional<z.ZodBoolean>;
        openDiffOnEdit: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        autoConnect?: boolean | undefined;
        openDiffOnEdit?: boolean | undefined;
    }, {
        autoConnect?: boolean | undefined;
        openDiffOnEdit?: 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>;
        /**
         * User-managed sandbox policy fragment (edited via `/sandbox` TUI).
         * Mirrors the `SandboxPolicy` type from `@microsoft/mxc-sdk` (minus
         * `version`, which the runtime injects). Merged into the
         * auto-discovered base policy at spawn time.
         *
         * Ignored when `config` (raw `ContainerConfig` passthrough) is set.
         */
        userPolicy: z.ZodOptional<z.ZodObject<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough">>>;
        /**
         * Raw `ContainerConfig` (per `@microsoft/mxc-sdk`) passed directly
         * to `spawnSandboxFromConfig`, bypassing the auto-discovered base
         * policy and `userPolicy` merging. Intended for enterprise
         * governance layers that ship a pre-baked container config, and
         * for testing the passthrough path.
         *
         * When set, takes precedence over `userPolicy`.
         */
        config: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        /** Whether to auto-add the current working directory to readwritePaths. Default: true. */
        addCurrentWorkingDirectory: z.ZodOptional<z.ZodBoolean>;
        /**
         * Routing flag (NOT a sandbox policy field). When `enabled` is
         * true, controls whether MCP servers are spawned inside the
         * sandbox. Defaults to true.
         */
        sandboxMcpServers: z.ZodOptional<z.ZodBoolean>;
        /**
         * Routing flag (NOT a sandbox policy field). When `enabled` is
         * true, controls whether LSP servers are spawned inside the
         * sandbox. Defaults to true.
         */
        sandboxLspServers: z.ZodOptional<z.ZodBoolean>;
    }, "strip", z.ZodTypeAny, {
        config?: Record<string, unknown> | undefined;
        enabled?: boolean | undefined;
        userPolicy?: z.objectOutputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        addCurrentWorkingDirectory?: boolean | undefined;
        sandboxMcpServers?: boolean | undefined;
        sandboxLspServers?: boolean | undefined;
    }, {
        config?: Record<string, unknown> | undefined;
        enabled?: boolean | undefined;
        userPolicy?: z.objectInputType<{
            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>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                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>;
            }, z.ZodTypeAny, "passthrough">>>;
            network: z.ZodOptional<z.ZodObject<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                allowOutbound: z.ZodOptional<z.ZodBoolean>;
                allowLocalNetwork: z.ZodOptional<z.ZodBoolean>;
                allowedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
                blockedHosts: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            }, z.ZodTypeAny, "passthrough">>>;
            /**
             * Platform-specific experimental policy fields that map to
             * `ContainerConfig.experimental` in `@microsoft/mxc-sdk`.
             * Only honored when the runtime spawns the SDK with
             * `{ experimental: true }` (currently macOS only).
             */
            experimental: z.ZodOptional<z.ZodObject<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                seatbelt: z.ZodOptional<z.ZodObject<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
                    keychainAccess: z.ZodOptional<z.ZodBoolean>;
                }, z.ZodTypeAny, "passthrough">>>;
            }, z.ZodTypeAny, "passthrough">>>;
        }, z.ZodTypeAny, "passthrough"> | undefined;
        addCurrentWorkingDirectory?: boolean | undefined;
        sandboxMcpServers?: boolean | undefined;
        sandboxLspServers?: boolean | undefined;
    }>>;
    extensions: z.ZodOptional<z.ZodObject<{
        disabledExtensions: 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;
        disabledExtensions?: string[] | undefined;
    }, {
        mode?: "disabled" | "load_only" | "load_and_augment" | undefined;
        disabledExtensions?: 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;
        };
    }>>>;
    strictKnownMarketplaces: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<"source", [z.ZodObject<{
        source: z.ZodLiteral<"github">;
        repo: z.ZodString;
        ref: z.ZodOptional<z.ZodString>;
        path: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        source: "github";
        repo: string;
        path?: string | undefined;
        ref?: string | undefined;
    }, {
        source: "github";
        repo: string;
        path?: string | undefined;
        ref?: string | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"git">;
        url: z.ZodString;
        ref: z.ZodOptional<z.ZodString>;
        path: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        source: "git";
        path?: string | undefined;
        ref?: string | undefined;
    }, {
        url: string;
        source: "git";
        path?: string | undefined;
        ref?: string | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"url">;
        url: z.ZodString;
        headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
    }, "strip", z.ZodTypeAny, {
        url: string;
        source: "url";
        headers?: Record<string, string> | undefined;
    }, {
        url: string;
        source: "url";
        headers?: Record<string, string> | undefined;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"npm">;
        package: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "npm";
        package: string;
    }, {
        source: "npm";
        package: string;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"file">;
        path: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        path: string;
        source: "file";
    }, {
        path: string;
        source: "file";
    }>, 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<"hostPattern">;
        hostPattern: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "hostPattern";
        hostPattern: string;
    }, {
        source: "hostPattern";
        hostPattern: string;
    }>, z.ZodObject<{
        source: z.ZodLiteral<"pathPattern">;
        pathPattern: z.ZodString;
    }, "strip", z.ZodTypeAny, {
        source: "pathPattern";
        pathPattern: string;
    }, {
        source: "pathPattern";
        pathPattern: string;
    }>]>, "many">>;
    voice: z.ZodOptional<z.ZodObject<{
        /** When true, app boots with voice enabled (provided a model is selected). */
        enabled: z.ZodOptional<z.ZodBoolean>;
        /** Last-selected variant id from the foundry catalog. */
        selectedModel: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        enabled?: boolean | undefined;
        selectedModel?: string | undefined;
    }, {
        enabled?: boolean | undefined;
        selectedModel?: string | undefined;
    }>>;
    permissions: z.ZodOptional<z.ZodObject<{
        /** When set to "disable", prevents enabling bypass-permissions (yolo) mode. */
        disableBypassPermissionsMode: z.ZodOptional<z.ZodString>;
    }, "strip", z.ZodTypeAny, {
        disableBypassPermissionsMode?: string | undefined;
    }, {
        disableBypassPermissionsMode?: string | undefined;
    }>>;
    copilotUrl: z.ZodOptional<z.ZodString>;
    showReasoning: z.ZodOptional<z.ZodBoolean>;
    disableAllHooks: z.ZodOptional<z.ZodBoolean>;
    hooks: z.ZodOptional<z.ZodType<z.objectOutputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">, z.ZodTypeDef, z.objectInputType<{
        sessionStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | 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.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        userPromptSubmitted: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        preToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preMcpToolCall: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        postToolUse: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        postToolUseFailure: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        errorOccurred: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        agentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStop: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
        }>]>, "many">>;
        subagentStart: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        preCompact: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        permissionRequest: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
        notification: z.ZodOptional<z.ZodArray<z.ZodUnion<[z.ZodEffects<z.ZodEffects<z.ZodObject<{
            type: z.ZodLiteral<"http">;
            url: z.ZodEffects<z.ZodString, string, string>;
            headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
            allowedEnvVars: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            timeoutSec: z.ZodOptional<z.ZodNumber>;
            timeout: z.ZodOptional<z.ZodNumber>;
            _vsCodeCompat: z.ZodOptional<z.ZodEnum<["SessionStart", "SessionEnd", "UserPromptSubmit", "PreToolUse", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, Omit<{
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }, "timeout">, {
            type: "http";
            url: string;
            headers?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
            allowedEnvVars?: string[] | undefined;
        }>, 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>;
            exec: z.ZodOptional<z.ZodString>;
            args: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
            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", "PreMcpToolCall", "PostToolUse", "PostToolUseFailure", "ErrorOccurred", "Stop", "SubagentStop", "SubagentStart", "PreCompact", "PermissionRequest", "Notification"]>>;
        } & {
            matcher: z.ZodOptional<z.ZodString>;
        }, "strip", z.ZodTypeAny, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, {
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>, Omit<{
            type: "command";
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }, "command" | "timeout">, {
            type?: "command" | undefined;
            command?: string | undefined;
            bash?: string | undefined;
            powershell?: string | undefined;
            exec?: string | undefined;
            args?: string[] | undefined;
            cwd?: string | undefined;
            env?: Record<string, string> | undefined;
            timeoutSec?: number | undefined;
            timeout?: number | undefined;
            _vsCodeCompat?: "SessionStart" | "SessionEnd" | "UserPromptSubmit" | "PreToolUse" | "PreMcpToolCall" | "PostToolUse" | "PostToolUseFailure" | "ErrorOccurred" | "Stop" | "SubagentStop" | "SubagentStart" | "PreCompact" | "PermissionRequest" | "Notification" | undefined;
            matcher?: string | undefined;
        }>]>, "many">>;
    }, z.ZodTypeAny, "passthrough">>>;
    remoteSessions: z.ZodOptional<z.ZodBoolean>;
    experimental: z.ZodOptional<z.ZodBoolean>;
    logLevel: z.ZodOptional<z.ZodEnum<["none", "error", "warning", "info", "debug", "all", "default"]>>;
}, z.ZodTypeAny, "passthrough">>;

/**
 * A tool permission request that we expect will be presented to the user in some manner.
 *
 * This is distinct from the PermissionRequest type that is passed into the permission service
 * because it provides more clarity based on interactions with rules and session approvals.
 */
declare type UserToolPermissionRequest = {
    toolCallId?: string;
} & (UserCommandsPermissionRequest | WritePermissionRequest | UserMCPPermissionRequest | MemoryPermissionRequest | UserCustomToolPermissionRequest | UserReadPermissionRequest | UserExtensionManagementPermissionRequest | UserExtensionPermissionAccessRequest);

/**
 * A response to a user tool permission request.
 *
 * Note that it is generic over the kind of request, so that we can get type narrowing and only
 * handle session approvals that make sense for the request kind we made.
 */
declare type UserToolPermissionRequestResponse<K extends UserToolPermissionRequest["kind"]> = {
    readonly kind: "approve-once";
} | {
    readonly kind: "approve-for-session";
    readonly approval: SessionApprovalFor<K>;
} | {
    readonly kind: "approve-for-location";
    readonly approval: SessionApprovalFor<K>;
    readonly locationKey: string;
} | {
    readonly kind: "reject";
    readonly feedback?: string;
} | {
    readonly kind: "user-not-available";
};

/**
 * A URL permission request that we expect will be presented to the user in some manner.
 */
declare type UserUrlPermissionRequest = {
    readonly url: string;
    readonly intention: string;
    readonly toolCallId?: string;
};

/**
 * A response to a user URL permission request.
 */
declare type UserUrlPermissionRequestResponse = {
    readonly kind: "approve-once";
} | {
    readonly kind: "approve-for-session";
    readonly domain: string;
} | {
    readonly kind: "approve-permanently";
    readonly domain: string;
} | {
    readonly kind: "reject";
    readonly feedback?: string;
} | {
    readonly kind: "user-not-available";
};

/**
 * A validation tool that requires a human-readable title in order to display results.
 */
declare type ValidationTool = Tool_2 & {
    title: string;
};

declare const VIEW_TOOL_LARGE_OUTPUT_THRESHOLD: number;

declare const VIEW_TOOL_NAME = "view";

/** Human-readable size hint for the view tool truncation threshold, for use in prompts. */
declare const VIEW_TOOL_SIZE_HINT = "50KB";

declare type ViewArgs = z_2.infer<typeof viewArgsSchema>;

declare const viewArgsSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    view_range: z_2.ZodOptional<z_2.ZodArray<z_2.ZodNumber, "many">>;
    forceReadLargeFiles: z_2.ZodOptional<z_2.ZodBoolean>;
} & {
    command: z_2.ZodLiteral<"view">;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    command: "view";
    view_range?: number[] | undefined;
    forceReadLargeFiles?: boolean | undefined;
}, {
    path: string;
    command: "view";
    view_range?: number[] | undefined;
    forceReadLargeFiles?: boolean | undefined;
}>;

/**
 * Types inferred from Zod schemas for the individual tool inputs (without command).
 */
declare type ViewInput = z_2.infer<typeof viewInputSchema>;

/**
 * Zod schema for view command input (without command field, as it's added by the tool).
 */
declare const viewInputSchema: z_2.ZodObject<{
    path: z_2.ZodString;
    view_range: z_2.ZodOptional<z_2.ZodArray<z_2.ZodNumber, "many">>;
    forceReadLargeFiles: z_2.ZodOptional<z_2.ZodBoolean>;
}, "strip", z_2.ZodTypeAny, {
    path: string;
    view_range?: number[] | undefined;
    forceReadLargeFiles?: boolean | undefined;
}, {
    path: string;
    view_range?: number[] | undefined;
    forceReadLargeFiles?: boolean | undefined;
}>;

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;
    /** Raw host string from the git remote URL (e.g. "github.com", "mycompany.ghe.com", "dev.azure.com") */
    repositoryHost?: string;
    /** 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.
 *
 * Mirrors the Rust `WorkspaceContextInput` struct used by the native
 * orchestration layer; the TS shim sends this via `JSON.stringify`.
 */
declare interface WorkspaceContext {
    cwd?: string;
    gitRoot?: string;
    repository?: string;
    hostType?: "github" | "ado";
    branch?: string;
    clientName?: 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[];
}

/**
 * Per-session workspace manager backed by SessionFs.
 *
 * This class is a thin TypeScript shim over the Rust workspace manager
 * implementation in `src/runtime/src/workspace_manager.rs`. Every async
 * method forwards to a `nativeRuntime.workspaceManager*` napi binding,
 * which performs all filesystem orchestration through a Rust-side
 * `SessionFsDispatch` (either tokio::fs for `LocalSessionFs` or a reverse
 * call into the JS handler for `RpcSessionFs`). Per-session creation
 * mutexes also live in Rust, so this class holds no state beyond the
 * `sessionId` / `sessionFs` pair it was constructed with.
 *
 * Cross-session operations (listing, deleting, pruning workspaces) belong
 * in {@link LocalWorkspaceStore}, not here — SessionFs is scoped to one
 * session and cannot access other sessions' storage.
 *
 * Storage layout (relative to sessionStatePath):
 * ├── workspace.yaml             # Metadata: id, owner, repo, name, summary_count
 * ├── plan.md                    # Optional implementation plan
 * ├── autopilot-objective.json   # Optional machine-managed autopilot objective state
 * ├── checkpoints/
 * │   ├── index.md               # Checkpoint listing/index
 * │   ├── 001-{short-title}.md   # Compaction checkpoints
 * │   └── ...
 * └── files/                     # User-specified persistent files
 */
declare class WorkspaceManager {
    readonly sessionId: string;
    private readonly sessionFs;
    constructor(sessionId: string, sessionFs: SessionFs);
    /** Root directory for this session's workspace (same as sessionStatePath). */
    getWorkspacePath(): string;
    /** Path to plan.md file. */
    getPlanPath(): string;
    /** Path to the machine-managed autopilot objective state file. */
    getAutopilotObjectivePath(): string;
    /** Path to workspace database file. */
    getDatabasePath(): string;
    private get sessionStatePath();
    private get convention();
    private get handler();
    /** Check if a workspace exists. */
    workspaceExists(): Promise<boolean>;
    /**
     * Load workspace metadata from storage. Returns null if the workspace
     * doesn't exist.
     */
    loadWorkspace(): Promise<Workspace | null>;
    /**
     * Save workspace metadata to storage. Creates parent directories if they
     * don't exist.
     */
    saveWorkspace(workspace: Workspace): Promise<void>;
    /**
     * Create a new workspace for this session.
     * The workspace ID equals the session ID (1:1 mapping).
     */
    createWorkspace(context: WorkspaceContext | undefined, name: string | undefined): Promise<Workspace>;
    /**
     * Get or create a workspace for this session. Uses a Rust-side per-session
     * mutex to prevent race conditions when multiple callers try to create
     * simultaneously.
     *
     * Note: unlike {@link loadWorkspace}, this method does NOT fall back to
     * the TS `yaml.parse + Zod` path on native parse failure — the Rust
     * mutex and load+create-or-return logic are atomic and not safely
     * splittable from TS. In practice, the only inputs that exercise the
     * fallback (`summary_count > u64::MAX`) are synthetic/hand-edited; the
     * counter increments by 1 per checkpoint and cannot realistically reach
     * `1.8e19`. The same applies to {@link updateContext},
     * {@link updateSummary}, {@link renameSession}, and
     * {@link updateWorkspaceFields} below.
     */
    getOrCreateWorkspace(context: WorkspaceContext | undefined, name: string | undefined): Promise<Workspace>;
    /**
     * Update the context for a workspace, creating it if it doesn't exist yet.
     * Called on session start/resume to update the cwd, repo, branch.
     * Fields not present in the new context are cleared (e.g., moving out of a git repo).
     */
    updateContext(context: WorkspaceContext, name?: string): Promise<void>;
    /**
     * Update the auto-generated name for an existing workspace.
     * Has no effect when the user has manually named the session (user_named=true).
     */
    updateSummary(summary: string): Promise<void>;
    /** Rename the session (set custom name). */
    renameSession(name: string): Promise<void>;
    /**
     * Update arbitrary fields on this session's workspace.
     * Creates the workspace if it doesn't exist yet.
     */
    updateWorkspaceFields(fields: Partial<Workspace>): Promise<void>;
    /** Delete the workspace and its directory. */
    deleteWorkspace(): Promise<void>;
    /**
     * Add a compaction summary to the workspace.
     * Called when CompactionProcessor completes.
     *
     * @returns The summary number assigned and the path to the checkpoint file
     */
    addSummary(summaryContent: string, title: string): Promise<{
        number: number;
        path: string;
    }>;
    /**
     * Truncate compaction summaries/checkpoints to a specific count.
     * Removes checkpoint files and updates index + workspace summary_count.
     */
    truncateSummaries(keepCount: number): Promise<void>;
    /** Load the checkpoint index entries from the index.md file. */
    listCheckpoints(): Promise<SummaryIndexEntry[]>;
    /** Read a specific checkpoint by number. */
    readCheckpoint(checkpointNumber: number): Promise<string | null>;
    /** Read the plan content for this workspace. */
    readPlan(): Promise<string | null>;
    /** Write plan content for this workspace. */
    writePlan(content: string): Promise<void>;
    /** Delete the plan file for this workspace. */
    deletePlan(): Promise<void>;
    /** Check if a plan exists for this workspace. */
    planExists(): Promise<boolean>;
    /** Read the machine-managed autopilot objective state for this workspace. */
    readAutopilotObjective(): Promise<string | null>;
    /** Atomically write machine-managed autopilot objective state for this workspace. */
    writeAutopilotObjective(content: string): Promise<"create" | "update">;
    /** Delete the machine-managed autopilot objective state for this workspace. */
    deleteAutopilotObjective(): Promise<boolean>;
    /** Check if an autopilot objective state file exists for this workspace. */
    autopilotObjectiveExists(): Promise<boolean>;
    /** List files in the workspace's files directory. */
    listFiles(): Promise<string[]>;
    /**
     * Read a file from the workspace files directory.
     * @param filePath - Relative path within the files directory
     */
    readWorkspaceFile(filePath: string): Promise<string>;
    /**
     * Write a file to the workspace files directory.
     * @param filePath - Relative path within the files directory
     * @param content - File content to write
     * @returns Whether the file already existed ("update") or is new ("create")
     */
    writeWorkspaceFile(filePath: string, content: string): Promise<"create" | "update">;
    /**
     * Save large paste content to a unique file in the files directory.
     * @returns The absolute file path within SessionFs, filename, and size
     */
    saveLargePaste(content: string): Promise<{
        filePath: string;
        filename: string;
        sizeBytes: number;
    }>;
}

declare const WorkspaceSchema: z_2.ZodEffects<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>;
    name: z_2.ZodOptional<z_2.ZodString>;
    client_name: z_2.ZodOptional<z_2.ZodString>;
    user_named: z_2.ZodOptional<z_2.ZodBoolean>;
    summary_count: z_2.ZodDefault<z_2.ZodNumber>;
    created_at: z_2.ZodOptional<z_2.ZodString>;
    updated_at: z_2.ZodOptional<z_2.ZodString>;
    remote_steerable: z_2.ZodOptional<z_2.ZodBoolean>;
    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>;
    chronicle_sync_dismissed: z_2.ZodOptional<z_2.ZodBoolean>;
}, "strip", z_2.ZodTypeAny, {
    id: string;
    summary_count: number;
    name?: string | undefined;
    repository?: string | undefined;
    cwd?: string | undefined;
    branch?: string | undefined;
    created_at?: string | undefined;
    user_named?: boolean | undefined;
    git_root?: string | undefined;
    host_type?: "github" | "ado" | undefined;
    client_name?: string | undefined;
    updated_at?: string | undefined;
    remote_steerable?: boolean | undefined;
    mc_task_id?: string | undefined;
    mc_session_id?: string | undefined;
    mc_last_event_id?: string | undefined;
    chronicle_sync_dismissed?: boolean | undefined;
}, {
    id: string;
    name?: string | undefined;
    repository?: string | undefined;
    cwd?: string | undefined;
    branch?: string | undefined;
    created_at?: string | undefined;
    user_named?: boolean | undefined;
    git_root?: string | undefined;
    host_type?: "github" | "ado" | undefined;
    client_name?: string | undefined;
    summary_count?: number | undefined;
    updated_at?: string | undefined;
    remote_steerable?: boolean | undefined;
    mc_task_id?: string | undefined;
    mc_session_id?: string | undefined;
    mc_last_event_id?: string | undefined;
    chronicle_sync_dismissed?: boolean | undefined;
}>, {
    id: string;
    summary_count: number;
    name?: string | undefined;
    repository?: string | undefined;
    cwd?: string | undefined;
    branch?: string | undefined;
    created_at?: string | undefined;
    user_named?: boolean | undefined;
    git_root?: string | undefined;
    host_type?: "github" | "ado" | undefined;
    client_name?: string | undefined;
    updated_at?: string | undefined;
    remote_steerable?: boolean | undefined;
    mc_task_id?: string | undefined;
    mc_session_id?: string | undefined;
    mc_last_event_id?: string | undefined;
    chronicle_sync_dismissed?: boolean | undefined;
}, unknown>;

/**
 * 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;
};

/**
 * Writes a large tool result to a temp file and returns a modified
 * result with instructions for the LLM.
 *
 * When a sessionFs is provided, the file is written to `sessionFs.tmpdir`.
 * Otherwise a local temp-file fallback is used.
 */
declare function writeResultToFile(result: ToolResultExpanded, options: LargeOutputOptions): Promise<ToolResultExpanded>;

export { }
