/* Generated by @deepseek-ai/dsh-typert-generator from FaceModel — do not edit. */
import { z } from 'zod'

const _deepseek_ai_dsh_commands_commands_execute_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_commands_commands_execute_parameter_1$schema = z.string()
const _deepseek_ai_dsh_commands_commands_execute_parameter_2$schema = z.array(z.object({
  'mediaType': z.union([z.literal("image/png"), z.literal("image/jpeg"), z.literal("image/webp"), z.literal("image/gif")]),
  'data': z.string(),
  'name': z.string().optional(),
}))
const _deepseek_ai_dsh_commands_commands_execute_result$schema = z.union([z.undefined(), z.object({
  'commandId': z.intersection(z.string(), z.unknown()).readonly(),
  'result': z.union([z.object({
  'kind': z.literal("success").readonly(),
  'text': z.string().readonly().optional(),
  'sourceEventSeq': z.number().readonly().optional(),
}), z.object({
  'kind': z.literal("error").readonly(),
  'text': z.string().readonly(),
})]).readonly(),
})])
const _deepseek_ai_dsh_commands_commands_list_parameter_0$schema = z.intersection(z.string(), z.unknown())
const _deepseek_ai_dsh_commands_commands_list_result$schema = z.array(z.object({
  'name': z.string().readonly(),
  'description': z.string().readonly(),
  'input': z.object({
  'hint': z.string().readonly(),
  'images': z.boolean().readonly().optional(),
}).readonly().optional(),
}))

export const TYPERT = {
  package: '@deepseek-ai/dsh-commands',
  face: 'host',
  schemas: [
  ],
  invocations: [
    {
      id: '@deepseek-ai/dsh-commands#commands/execute',
      service: 'commands',
      namespace: 'commands',
      method: 'execute',
      invocation: { kind: 'direct' },
      scope: {
        context: 'agent',
        wire: 'agentId',
      },
      parameters: [
        {
          name: 'agent',
          wire: 'agentId',
          source: 'lookup',
          lookup: 'agent',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
            schema: _deepseek_ai_dsh_commands_commands_execute_parameter_0$schema,
          },
        },
        {
          name: 'line',
          wire: 'line',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-commands#commands/execute:line',
            schema: _deepseek_ai_dsh_commands_commands_execute_parameter_1$schema,
          },
        },
        {
          name: 'images',
          wire: 'images',
          source: 'json',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-commands#commands/execute:images',
            schema: _deepseek_ai_dsh_commands_commands_execute_parameter_2$schema,
          },
        },
      ],
      cancellation: { parameter: 'signal' },
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-commands#commands/execute:result',
        schema: _deepseek_ai_dsh_commands_commands_execute_result$schema,
      },
      sourceLocation: {"file":"packages/interaction/commands/src/index.ts","line":330,"column":9},
    },
    {
      id: '@deepseek-ai/dsh-commands#commands/list',
      service: 'commands',
      namespace: 'commands',
      method: 'list',
      invocation: { kind: 'direct' },
      scope: {
        context: 'agent',
        wire: 'agentId',
      },
      parameters: [
        {
          name: 'agent',
          wire: 'agentId',
          source: 'lookup',
          lookup: 'agent',
          codec: {
            mode: 'strict',
            typeSymbol: '@deepseek-ai/dsh-session/types#SessionId',
            schema: _deepseek_ai_dsh_commands_commands_list_parameter_0$schema,
          },
        },
      ],
      result: {
        mode: 'strict',
        typeSymbol: '@deepseek-ai/dsh-commands#commands/list:result',
        schema: _deepseek_ai_dsh_commands_commands_list_result$schema,
      },
      sourceLocation: {"file":"packages/interaction/commands/src/index.ts","line":286,"column":3},
    },
  ],
  model: {
    "services": [
      {
        "description": "Human-command registry. Plain-context definitions are global; definitions registered through a command-injected child of an agent context shadow globals for that agent.",
        "summary": "Human-command registry.",
        "tags": [],
        "jsDoc": "/**\n * Human-command registry. Plain-context definitions are global; definitions\n * registered through a command-injected child of an agent context shadow\n * globals for that agent.\n */",
        "key": "commands",
        "exportName": "CommandRuntime",
        "members": [
          {
            "kind": "method",
            "name": "register",
            "signature": "register(definition: CommandDefinition): () => void",
            "summary": "Register a global or calling-agent-scoped command.",
            "jsDoc": "/**\n * Register a global or calling-agent-scoped command.\n * @param definition - discovery metadata and direct UI handler.\n * @returns the exact effect disposer that unregisters this definition.\n */"
          },
          {
            "kind": "method",
            "name": "list",
            "signature": "@Remote list(agent: Agent): readonly CommandDescriptor[]",
            "summary": "List the effective immutable command descriptors for one agent.",
            "jsDoc": "/**\n * List the effective immutable command descriptors for one agent.\n * @param agent - exact receiving agent and scoped-layer key.\n * @returns name-sorted descriptors after scoped shadowing.\n */"
          },
          {
            "kind": "method",
            "name": "find",
            "signature": "find(agent: Agent, name: string): CommandDefinition | undefined",
            "summary": "Resolve one effective command definition.",
            "jsDoc": "/**\n * Resolve one effective command definition.\n * @param agent - exact receiving agent and scoped-layer key.\n * @param name - command name without a slash.\n * @returns the scoped shadow or global definition.\n */"
          },
          {
            "kind": "method",
            "name": "execute",
            "signature": "@Remote async execute( agent: Agent, line: string, images: readonly EncodedImageAttachment[], signal: AbortSignal, ): Promise<CommandExecution | undefined>",
            "summary": "Parse and execute a known command without sending it to the model.",
            "jsDoc": "/**\n * Parse and execute a known command without sending it to the model.\n *\n * A resolved command's lifecycle is logged: `command/run` is appended\n * before the handler is invoked and `command/done` after settlement (a\n * thrown or aborted handler settles as `kind: 'error'`). Both are direct\n * log-only appends — no turn wraps them, and persistence drains them at\n * ordinary checkpoints. Admission misses (syntax or unknown name) log\n * nothing — they never entered a handler. A `command/run` append failure\n * fails the execution loud; a `command/done` append failure on the\n * handler-failure path is contained so the handler's own error stays the\n * reported failure.\n *\n * Image admission is enforced here, not in the composer: images sent to a\n * command that does not declare `input.images`, an absent attachment store,\n * and an exceeded attachment limit each settle as an error result before\n * the handler runs, and a rejected batch publishes no durable object.\n *\n * @param agent - exact receiving agent.\n * @param line - complete slash-command line.\n * @param images - base64-encoded composer images accompanying the line, in\n *   submission order; empty for a plain invocation.\n * @param signal - cancellation signal owned by the UI request.\n * @returns the settled execution (result + lifecycle pairing id), or\n *   `undefined` when syntax or name does not resolve.\n */"
          }
        ],
        "types": [
          {
            "name": "Agent",
            "declaration": "export interface Agent {\n    readonly id: SessionId;\n    readonly options: AgentOptions;\n    readonly session: Session;\n    readonly inbox: Inbox;\n    readonly status: AgentStatus;\n    readonly ctx: Context;\n    cancel(cause: AgentCancelCause, options?: CancelOptions): void;\n    whenIdle(): Promise<void>;\n    runMaintenance<T>(task: (signal: AbortSignal) => Promise<T>): Promise<T>;\n    send(message: UserMessage, target: InboxTarget, wakeup: boolean): void;\n    followup(message: UserMessage): void;\n    steer(message: UserMessage): void;\n    inject(message: UserMessage): void;\n}"
          },
          {
            "name": "AgentCancelCause",
            "declaration": "export type AgentCancelCause = { readonly kind: 'user'; } | { readonly kind: 'parent'; } | { readonly kind: 'hook'; readonly reason: string; } | { readonly kind: 'disposed'; };"
          },
          {
            "name": "AgentOptions",
            "declaration": "export interface AgentOptions {\n    provider?: string;\n    model?: string;\n    reasoningEffort?: ReasoningEffortId;\n    maxTokens?: number;\n    subagentDepth?: number;\n}"
          },
          {
            "name": "AgentStatus",
            "declaration": "export type AgentStatus = 'idle' | 'running';"
          },
          {
            "name": "ApprovalOutcome",
            "declaration": "export type ApprovalOutcome = 'allowed-once' | 'rejected' | 'cancelled' | 'unavailable';"
          },
          {
            "name": "ApprovalPolicy",
            "declaration": "export type ApprovalPolicy = 'ask' | 'never';"
          },
          {
            "name": "ApprovalRequestId",
            "declaration": "export type ApprovalRequestId = Branded<'ApprovalRequestId'>;"
          },
          {
            "name": "AssistantMessage",
            "declaration": "export interface AssistantMessage extends Message {\n    readonly role: 'assistant';\n    readonly source: ModelMessageSource;\n}"
          },
          {
            "name": "AssistantProvenance",
            "declaration": "export interface AssistantProvenance {\n    provider: string;\n    model: string;\n    replayState?: unknown;\n}"
          },
          {
            "name": "AttachmentId",
            "declaration": "export type AttachmentId = Branded<'AttachmentId'>;"
          },
          {
            "name": "Branded",
            "declaration": "export type Branded<B extends string> = string & { readonly [BRAND]: B; };"
          },
          {
            "name": "CancelOptions",
            "declaration": "export interface CancelOptions {\n    keepInbox?: boolean | undefined;\n}"
          },
          {
            "name": "CommandDefinition",
            "declaration": "export interface CommandDefinition {\n    readonly name: string;\n    readonly description: string;\n    readonly input?: CommandInputDescriptor;\n    readonly recordInput?: boolean;\n    readonly handler: (invocation: CommandInvocation) => CommandResult | Promise<CommandResult>;\n}"
          },
          {
            "name": "CommandDescriptor",
            "declaration": "export interface CommandDescriptor {\n    readonly name: string;\n    readonly description: string;\n    readonly input?: CommandInputDescriptor;\n}"
          },
          {
            "name": "CommandExecution",
            "declaration": "export interface CommandExecution {\n    readonly commandId: CommandId;\n    readonly result: CommandResult;\n}"
          },
          {
            "name": "CommandId",
            "declaration": "export type CommandId = Branded<'CommandId'>;"
          },
          {
            "name": "CommandInputDescriptor",
            "declaration": "export interface CommandInputDescriptor {\n    readonly hint: string;\n    readonly images?: boolean;\n}"
          },
          {
            "name": "CommandInvocation",
            "declaration": "export interface CommandInvocation {\n    readonly commandId: CommandId;\n    readonly agent: Agent;\n    readonly rawInput: string;\n    readonly attachments: readonly ImageBlock[];\n    readonly signal: AbortSignal;\n}"
          },
          {
            "name": "CommandResult",
            "declaration": "export type CommandResult = { readonly kind: 'success'; readonly text?: string; readonly sourceEventSeq?: number; } | { readonly kind: 'error'; readonly text: string; };"
          },
          {
            "name": "CommandSource",
            "declaration": "export type CommandSource = CommandSourceMap[keyof CommandSourceMap];"
          },
          {
            "name": "CommandSourceMap",
            "declaration": "export interface CommandSourceMap {\n    user: { kind: 'user'; };\n}"
          },
          {
            "name": "CompactionId",
            "declaration": "export type CompactionId = Branded<'CompactionId'>;"
          },
          {
            "name": "ContentBlock",
            "declaration": "export type ContentBlock = ContentBlockMap[ContentBlockType];"
          },
          {
            "name": "ContentBlockMap",
            "declaration": "export interface ContentBlockMap {\n    text: TextBlock;\n    reasoning: ReasoningBlock;\n    image: ImageBlock;\n    'tool-call': ToolCallBlock;\n    'tool-result': ToolResultBlock;\n}"
          },
          {
            "name": "ContentBlockType",
            "declaration": "export type ContentBlockType = keyof ContentBlockMap;"
          },
          {
            "name": "ContextFormed",
            "declaration": "export type ContextFormed = { readonly form?: never; } | { readonly form: 'instructions'; } | { readonly form: 'catalog'; } | { readonly form: 'snapshot'; readonly sections: readonly ContextSnapshotSection[]; } | { readonly form: 'notice'; readonly summary: string; } | { readonly form: 'relay'; } | { readonly form: 'recall'; };"
          },
          {
            "name": "ContextSnapshotSection",
            "declaration": "export interface ContextSnapshotSection {\n    readonly name: string;\n    readonly text: string;\n}"
          },
          {
            "name": "ContinuableSubagentDescriptorData",
            "declaration": "export interface ContinuableSubagentDescriptorData extends SubagentDescriptorBase {\n    readonly mode: 'continuable';\n    readonly label: string;\n    readonly agentProvider?: string;\n    readonly agentModel?: string;\n    readonly agentReasoningEffort?: ReasoningEffortId;\n    readonly persona?: string;\n    readonly toolFilter?: ToolRestriction;\n}"
          },
          {
            "name": "CoordinatorMessageSource",
            "declaration": "export interface CoordinatorMessageSource {\n    readonly kind: 'coordinator';\n    readonly form: 'relay';\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "EncodedImageAttachment",
            "declaration": "export interface EncodedImageAttachment {\n    mediaType: ImageMediaType;\n    data: string;\n    name?: string;\n}"
          },
          {
            "name": "EpochHeader",
            "declaration": "export interface EpochHeader {\n    config: LlmCallConfig;\n    adapterDefaults?: LlmCallConfigAdapterDefaults;\n    system?: string;\n    tools?: ToolSchema[];\n}"
          },
          {
            "name": "FinishReason",
            "declaration": "export type FinishReason = FinishReasonMap[keyof FinishReasonMap];"
          },
          {
            "name": "FinishReasonMap",
            "declaration": "export interface FinishReasonMap {\n    stop: { kind: 'stop'; };\n    'tool-calls': { kind: 'tool-calls'; };\n    'max-tokens': { kind: 'max-tokens'; };\n    aborted: { kind: 'aborted'; failure: LlmFailure; };\n    error: { kind: 'error'; failure: LlmFailure; };\n}"
          },
          {
            "name": "GoalBlockReason",
            "declaration": "export interface GoalBlockReason {\n    readonly code: string;\n    readonly message: string;\n}"
          },
          {
            "name": "GoalChangeMeta",
            "declaration": "export type GoalChangeMeta = GoalSnapshotChangeMeta | GoalClearChangeMeta;"
          },
          {
            "name": "GoalClearChangeMeta",
            "declaration": "export interface GoalClearChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: 'clear';\n    readonly cleared: GoalRef;\n    readonly clearedAt: number;\n}"
          },
          {
            "name": "GoalId",
            "declaration": "export type GoalId = Branded<'GoalId'>;"
          },
          {
            "name": "GoalMessageSource",
            "declaration": "export interface GoalMessageSource {\n    readonly kind: 'goal';\n    readonly goalId: GoalId;\n    readonly revision: number;\n    readonly round: number;\n}"
          },
          {
            "name": "GoalOperation",
            "declaration": "export type GoalOperation = 'create' | 'edit' | 'pause' | 'resume' | 'complete' | 'block' | 'clear';"
          },
          {
            "name": "GoalPhase",
            "declaration": "export type GoalPhase = 'active' | 'paused' | 'blocked' | 'complete';"
          },
          {
            "name": "GoalRef",
            "declaration": "export interface GoalRef {\n    readonly id: GoalId;\n    readonly revision: number;\n}"
          },
          {
            "name": "GoalSnapshot",
            "declaration": "export interface GoalSnapshot extends GoalRef {\n    readonly objective: string;\n    readonly phase: GoalPhase;\n    readonly blockedReason?: GoalBlockReason;\n    readonly maxGoalRounds: number;\n}"
          },
          {
            "name": "GoalSnapshotChangeMeta",
            "declaration": "export interface GoalSnapshotChangeMeta {\n    readonly kind: 'goal/change';\n    readonly version: 1;\n    readonly operation: Exclude<GoalOperation, 'clear'>;\n    readonly goal: GoalSnapshot;\n    readonly roundsStarted: number;\n    readonly createdAt: number;\n    readonly updatedAt: number;\n}"
          },
          {
            "name": "ImageAttachmentRef",
            "declaration": "export interface ImageAttachmentRef {\n    attachmentId: AttachmentId;\n    mediaType: ImageMediaType;\n    bytes: number;\n    width: number;\n    height: number;\n    name?: string;\n    originalDimensions?: { width: number; height: number; };\n}"
          },
          {
            "name": "ImageBlock",
            "declaration": "export interface ImageBlock {\n    type: 'image';\n    attachment: ImageAttachmentRef;\n}"
          },
          {
            "name": "ImageMediaType",
            "declaration": "export type ImageMediaType = 'image/png' | 'image/jpeg' | 'image/webp' | 'image/gif';"
          },
          {
            "name": "Inbox",
            "declaration": "export class Inbox {\n    get nextTurn(): readonly UserMessage[];\n    get nextStep(): readonly UserMessage[];\n    get hasPending(): boolean;\n    clear(): void;\n    claim(target: InboxTarget, turn: number): UserMessage[];\n    append(target: InboxTarget, message: UserMessage): void;\n    prepend(target: InboxTarget, message: UserMessage): void;\n    replace(messageId: MessageId, newMessage: UserMessage): boolean;\n    remove(messageId: MessageId): boolean;\n    splice(target: InboxTarget, start: number, deleteCount: number, inserted: UserMessage[]): UserMessage[];\n}"
          },
          {
            "name": "InboxTarget",
            "declaration": "export type InboxTarget = 'next-turn' | 'next-step';"
          },
          {
            "name": "JsonValue",
            "declaration": "export type JsonValue = null | boolean | number | string | JsonValue[] | { [key: string]: JsonValue; };"
          },
          {
            "name": "LlmCallConfig",
            "declaration": "export interface LlmCallConfig {\n    provider: string;\n    model: string;\n    reasoningEffort?: ReasoningEffortId;\n    temperature?: number;\n    maxTokens?: number;\n    stop?: string[];\n}"
          },
          {
            "name": "LlmCallConfigAdapterDefaults",
            "declaration": "export interface LlmCallConfigAdapterDefaults {\n    reasoningEffort?: true;\n    maxTokens?: true;\n}"
          },
          {
            "name": "LlmFailure",
            "declaration": "export interface LlmFailure {\n    readonly message: string;\n    readonly code: string;\n    readonly status?: number;\n    readonly providerRetryAfterMs?: number;\n    readonly requestId?: ProviderRequestId;\n}"
          },
          {
            "name": "Message",
            "declaration": "export interface Message {\n    readonly id: MessageId;\n    readonly role: 'system' | 'user' | 'assistant';\n    readonly content: ContentBlock[];\n    readonly source: MessageSource;\n}"
          },
          {
            "name": "MessageId",
            "declaration": "export type MessageId = Branded<'MessageId'>;"
          },
          {
            "name": "MessageSource",
            "declaration": "export type MessageSource = MessageSourceMap[keyof MessageSourceMap];"
          },
          {
            "name": "MessageSourceMap",
            "declaration": "export interface MessageSourceMap {\n    user: { kind: 'user'; };\n    plugin: { kind: 'plugin'; plugin: string; } & ContextFormed;\n    model: ModelMessageSource;\n    tool: ToolMessageSource;\n    'user-rpc': { kind: 'user'; rpcId: SessionRequestId; clientTimeZone?: string; };\n    coordinator: CoordinatorMessageSource;\n    'subagent-report': SubagentReportMessageSource;\n    'subagent-settled': SubagentSettledMessageSource;\n    'skill-invocation': SkillInvocationSource;\n    'team-message': TeamMessageSource;\n    goal: GoalMessageSource;\n    'session-reference': SessionReferenceSource;\n}"
          },
          {
            "name": "ModelMessageSource",
            "declaration": "export interface ModelMessageSource extends AssistantProvenance {\n    kind: 'model';\n}"
          },
          {
            "name": "ModelSelection",
            "declaration": "export interface ModelSelection {\n    readonly provider: string;\n    readonly model: string;\n    readonly reasoningEffort?: string;\n}"
          },
          {
            "name": "OneShotSubagentDescriptorData",
            "declaration": "export interface OneShotSubagentDescriptorData extends SubagentDescriptorBase {\n    readonly mode: 'one-shot';\n    readonly label?: string;\n}"
          },
          {
            "name": "ProviderRequestId",
            "declaration": "export type ProviderRequestId = Branded<'ProviderRequestId'>;"
          },
          {
            "name": "PtcDispatchEventData",
            "declaration": "export interface PtcDispatchEventData extends PtcDispatchStartEventData {\n    isError: boolean;\n    content: ContentBlock[];\n}"
          },
          {
            "name": "PtcDispatchStartEventData",
            "declaration": "export interface PtcDispatchStartEventData {\n    rootCallId: ToolCallId;\n    parentCallId: ToolCallId;\n    subCallId: ToolCallId;\n    name: string;\n    arguments: unknown;\n}"
          },
          {
            "name": "ReasoningBlock",
            "declaration": "export interface ReasoningBlock {\n    type: 'reasoning';\n    text: string;\n}"
          },
          {
            "name": "ReasoningEffortId",
            "declaration": "export type ReasoningEffortId = Branded<'ReasoningEffortId'>;"
          },
          {
            "name": "ReplayEnvelope",
            "declaration": "export interface ReplayEnvelope {\n    response: unknown;\n    blocks?: readonly unknown[];\n}"
          },
          {
            "name": "RequestContext",
            "declaration": "export interface RequestContext {\n    provider: string;\n    model: string;\n    contextWindow?: number;\n}"
          },
          {
            "name": "RequestHeaderReason",
            "declaration": "export type RequestHeaderReason = 'initial' | 'resume' | 'change' | 'series';"
          },
          {
            "name": "SandboxMode",
            "declaration": "export type SandboxMode = 'read-only' | 'workspace-write' | 'danger-full-access';"
          },
          {
            "name": "Session",
            "declaration": "export class Session {\n    get surface(): SessionSurface;\n    readonly header: SessionHeader;\n    get id(): SessionId;\n    readonly firstLiveSeq: number;\n    get events(): readonly SessionEvent[];\n    get seq(): number;\n    append<T extends SessionEventType>(type: T, data: SessionEventMap[T], ...opts: T extends SurfaceEventType ? [opts: SurfaceIntent] : []): SessionEvent<T>;\n    requestHeader(): EpochHeader | undefined;\n    requestContext(): RequestContext | undefined;\n    deriveMessages(): Message[];\n    deriveEventMessage(event: SessionEvent): Message | null;\n}"
          },
          {
            "name": "SessionEvent",
            "declaration": "export type SessionEvent<T extends SessionEventType = SessionEventType> = { [K in SessionEventType]: { type: K; seq: number; time: number; data: SessionEventMap[K]; } & (K extends SurfaceEventType ? { sourceEventSeqs?: number[]; surfaceOp?: SurfaceOp; } : object) }[T];"
          },
          {
            "name": "SessionEventMap",
            "declaration": "export interface SessionEventMap {\n    'turn/start': { turn: number; };\n    'turn/end': { turn: number; reason: TurnEndReason; };\n    'step/start': { turn: number; step: number; };\n    'step/end': { turn: number; step: number; };\n    'user/message': UserMessage;\n    'assistant/chunk': { turn: number; step: number; chunk: StreamChunk; };\n    'assistant/message': { turn: number; step: number; message: AssistantMessage; usage?: TokenUsage; interrupted?: true; };\n    'tool/call': { turn: number; step: number; callId: ToolCallId; name: string; arguments: string; };\n    'tool/result': { turn: number; step: number; message: ToolResultMessage; error?: { name: string; code: string; }; meta?: JsonValue; };\n    'request/header': { header: EpochHeader; reason: RequestHeaderReason; startsSeries?: true; };\n    'request/context': RequestContext;\n    'session/end-seed': Record<string, never>;\n    'agent/inbox/spliced': { target: InboxTarget; start: number; removedCount?: number; inserted: UserMessage[]; outcome?: 'canceled'; };\n    'approval/asked': { id: ApprovalRequestId; toolName: string; callId?: ToolCallId; reason?: string; };\n    'approval/decided': { id: ApprovalRequestId; outcome: ApprovalOutcome; };\n    'approval/policy': { policy: ApprovalPolicy; source?: 'delegation'; };\n    'tool/code-dispatch-start': PtcDispatchStartEventData;\n    'tool/code-dispatch': PtcDispatchEventData;\n    'agent-preset/selected': { agentPreset: string; };\n    'session/title': SessionTitleEventData;\n    'todo/write': { todos: TodoItem[]; };\n    'model/selection': ModelSelection;\n    'subagent/descriptor': SubagentDescriptorData;\n    'sandbox/mode': { mode: SandboxMode; source?: 'delegation'; };\n    'command/run': { commandId: CommandId; name: string; args?: string; source: CommandSource; };\n    'command/done': { commandId: CommandId; kind: 'success' | 'error'; text?: string; sourceEventSeq?: number; };\n    'team/member': { version: 1; teamId: TeamId; member: TeamMemberSnapshot; };\n    'team/task': { version: 1; teamId: TeamId; task: TeamTaskSnapshot; };\n    'team/message/queued': { version: 1; teamId: TeamId; message: TeamMessageSnapshot; };\n    'team/message/delivered': { version: 1; teamId: TeamId; messageId: TeamMessageId; targetId: SessionId; };\n    'goal/change': GoalChangeMeta;\n    'compaction/start': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; };\n    'compaction/summary': { compactionId: CompactionId; sourceCommandId?: CommandId; summary: ContentBlock[]; shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; provider: string; model: string; maxTokens?: number; usage?: TokenUsage; } & ({ rawOutput: ContentBlock[]; llmStreamCall: true; } | { rawOutput?: ContentBlock[]; llmStreamCall?: never; });\n    'compaction/end': { compactionId: CompactionId; sourceCommandId?: CommandId; turn: number | null; error?: string; };\n    'compaction/prune': { shadowedRange: { start: number; end: number; }; shadowedSeqs: number[]; shadowedTokenCount: number; };\n}"
          },
          {
            "name": "SessionEventType",
            "declaration": "export type SessionEventType = keyof SessionEventMap;"
          },
          {
            "name": "SessionHeader",
            "declaration": "export interface SessionHeader {\n    readonly version: number;\n    readonly id: SessionId;\n    readonly createdAt: number;\n    readonly cwd?: string;\n    readonly parentSession?: SessionId;\n    readonly seedLength?: number;\n    readonly origin?: 'subagent';\n    readonly delegationDepth?: number;\n    readonly agentPreset?: string;\n}"
          },
          {
            "name": "SessionId",
            "declaration": "export type SessionId = Branded<'SessionId'>;"
          },
          {
            "name": "SessionReferenceSource",
            "declaration": "export interface SessionReferenceSource {\n    kind: 'session-reference';\n    form: 'recall';\n    version: 1;\n    references: { sessionId: string; label: string; capturedThroughSeq: number | null; compacted: boolean; originalMessages: number; retainedMessages: number; omittedMessages: number; omittedBytes: number; truncated: boolean; inputIndex: number; }[];\n}"
          },
          {
            "name": "SessionRequestId",
            "declaration": "export type SessionRequestId = Branded<'session-request-id'>;"
          },
          {
            "name": "SessionSurface",
            "declaration": "export interface SessionSurface {\n    readonly nodes: readonly number[];\n    readonly replaceGeneration: number;\n}"
          },
          {
            "name": "SessionTitleEventData",
            "declaration": "export interface SessionTitleEventData {\n    readonly title: string;\n    readonly messageSeqs: number[];\n    readonly source: SessionTitleSource;\n}"
          },
          {
            "name": "SessionTitleModelProvenance",
            "declaration": "export interface SessionTitleModelProvenance {\n    readonly provider: string;\n    readonly model: string;\n}"
          },
          {
            "name": "SessionTitleProviderId",
            "declaration": "export type SessionTitleProviderId = Branded<'SessionTitleProviderId'>;"
          },
          {
            "name": "SessionTitleSource",
            "declaration": "export type SessionTitleSource = { readonly kind: 'fallback'; } | { readonly kind: 'provider'; readonly provider: SessionTitleProviderId; readonly model?: SessionTitleModelProvenance; } | { readonly kind: 'user'; };"
          },
          {
            "name": "SkillInvocationSource",
            "declaration": "export interface SkillInvocationSource {\n    readonly kind: 'skill-invocation';\n    readonly name: string;\n    readonly form: 'instructions';\n}"
          },
          {
            "name": "StreamChunk",
            "declaration": "export type StreamChunk = { type: 'block-start'; index: number; blockType: ContentBlockType; } | { type: 'text-delta'; index: number; text: string; } | { type: 'reasoning-delta'; index: number; text: string; } | { type: 'tool-call-delta'; index: number; id: ToolCallId; name?: string; argumentsDelta: string; } | { type: 'block-end'; index: number; block: ContentBlock; } | { type: 'usage'; usage: TokenUsage; } | { type: 'finish'; reason: FinishReason; replayState?: ReplayEnvelope; };"
          },
          {
            "name": "SubagentDescriptorBase",
            "declaration": "export interface SubagentDescriptorBase {\n    readonly version: number;\n    readonly mode: 'one-shot' | 'continuable';\n    readonly provider: string;\n}"
          },
          {
            "name": "SubagentDescriptorData",
            "declaration": "export type SubagentDescriptorData = OneShotSubagentDescriptorData | ContinuableSubagentDescriptorData;"
          },
          {
            "name": "SubagentReportMessageSource",
            "declaration": "export interface SubagentReportMessageSource {\n    readonly kind: 'subagent-report';\n    readonly form: 'relay';\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "SubagentSettledMessageSource",
            "declaration": "export interface SubagentSettledMessageSource {\n    readonly kind: 'subagent-settled';\n    readonly form: 'notice';\n    readonly summary: string;\n    readonly senderSessionId: SessionId;\n}"
          },
          {
            "name": "SurfaceEventType",
            "declaration": "export type SurfaceEventType = 'user/message' | 'assistant/message' | 'tool/result';"
          },
          {
            "name": "SurfaceIntent",
            "declaration": "export interface SurfaceIntent {\n    surfaceOp: SurfaceOp;\n    sourceEventSeqs?: number[];\n}"
          },
          {
            "name": "SurfaceOp",
            "declaration": "export type SurfaceOp = 'append' | { op: 'replace'; start: number; end: number; };"
          },
          {
            "name": "TeamId",
            "declaration": "export type TeamId = Branded<'TeamId'>;"
          },
          {
            "name": "TeamMemberPhase",
            "declaration": "export type TeamMemberPhase = 'provisioning' | 'active' | 'failed';"
          },
          {
            "name": "TeamMemberSnapshot",
            "declaration": "export interface TeamMemberSnapshot {\n    readonly id: SessionId;\n    readonly name: string;\n    readonly description: string;\n    readonly provider: string;\n    readonly context: 'fresh' | 'fork';\n    readonly phase: TeamMemberPhase;\n    readonly error?: string;\n}"
          },
          {
            "name": "TeamMessageId",
            "declaration": "export type TeamMessageId = Branded<'TeamMessageId'>;"
          },
          {
            "name": "TeamMessageSnapshot",
            "declaration": "export interface TeamMessageSnapshot {\n    readonly id: TeamMessageId;\n    readonly senderId: SessionId;\n    readonly senderName: string;\n    readonly targetId: SessionId;\n    readonly delivery: 'quiet' | 'wakeup';\n    readonly content: ContentBlock[];\n}"
          },
          {
            "name": "TeamMessageSource",
            "declaration": "export interface TeamMessageSource {\n    readonly kind: 'team-message';\n    readonly teamId: TeamId;\n    readonly messageId: TeamMessageId;\n    readonly senderId: SessionId;\n    readonly senderName: string;\n}"
          },
          {
            "name": "TeamTaskId",
            "declaration": "export type TeamTaskId = Branded<'TeamTaskId'>;"
          },
          {
            "name": "TeamTaskSnapshot",
            "declaration": "export interface TeamTaskSnapshot {\n    readonly id: TeamTaskId;\n    readonly revision: number;\n    readonly subject: string;\n    readonly description: string;\n    readonly status: TeamTaskStatus;\n    readonly ownerId?: SessionId;\n    readonly blockedBy: TeamTaskId[];\n    readonly writeScopes: string[];\n}"
          },
          {
            "name": "TeamTaskStatus",
            "declaration": "export type TeamTaskStatus = 'pending' | 'in_progress' | 'completed' | 'deleted';"
          },
          {
            "name": "TextBlock",
            "declaration": "export interface TextBlock {\n    type: 'text';\n    text: string;\n}"
          },
          {
            "name": "TodoItem",
            "declaration": "export interface TodoItem {\n    content: string;\n    status: 'pending' | 'in_progress' | 'completed';\n}"
          },
          {
            "name": "TokenUsage",
            "declaration": "export interface TokenUsage {\n    inputTokens: number;\n    outputTokens: number;\n    totalTokens?: number;\n    cacheReadTokens?: number;\n    cacheWriteTokens?: number;\n    reasoningTokens?: number;\n}"
          },
          {
            "name": "ToolCallBlock",
            "declaration": "export interface ToolCallBlock {\n    type: 'tool-call';\n    id: ToolCallId;\n    name: string;\n    arguments: string;\n}"
          },
          {
            "name": "ToolCallId",
            "declaration": "export type ToolCallId = Branded<'ToolCallId'>;"
          },
          {
            "name": "ToolMessageSource",
            "declaration": "export interface ToolMessageSource {\n    kind: 'tool';\n    callId: ToolCallId;\n}"
          },
          {
            "name": "ToolRestriction",
            "declaration": "export interface ToolRestriction {\n    readonly allow?: readonly string[];\n    readonly deny?: readonly string[];\n}"
          },
          {
            "name": "ToolResultBlock",
            "declaration": "export interface ToolResultBlock {\n    type: 'tool-result';\n    toolCallId: ToolCallId;\n    content: ContentBlock[];\n    isError?: boolean;\n}"
          },
          {
            "name": "ToolResultMessage",
            "declaration": "export interface ToolResultMessage extends Message {\n    readonly role: 'user';\n    readonly content: [ToolResultBlock];\n    readonly source: ToolMessageSource;\n}"
          },
          {
            "name": "ToolSchema",
            "declaration": "export interface ToolSchema {\n    name: string;\n    description: string;\n    parameters: Record<string, unknown>;\n}"
          },
          {
            "name": "TurnEndCancelCause",
            "declaration": "export type TurnEndCancelCause = AgentCancelCause | { readonly kind: 'legacy'; };"
          },
          {
            "name": "TurnEndReason",
            "declaration": "export type TurnEndReason = TurnEndReasonMap[keyof TurnEndReasonMap];"
          },
          {
            "name": "TurnEndReasonMap",
            "declaration": "export interface TurnEndReasonMap {\n    completed: { kind: 'completed'; };\n    aborted: { kind: 'aborted'; reason: TurnEndCancelCause; };\n    blocked: { kind: 'blocked'; };\n    error: { kind: 'error'; error: LlmFailure; };\n    'max-tokens': { kind: 'max-tokens'; };\n    interrupted: { kind: 'interrupted'; };\n}"
          },
          {
            "name": "UserMessage",
            "declaration": "export interface UserMessage extends Message {\n    readonly role: 'user';\n}"
          }
        ]
      }
    ],
    "events": [
      {
        "description": "A command was registered or unregistered. This is an unfiltered registry notification because a global or scoped change may affect any UI view. Observer failures are contained and cannot veto the registry mutation.",
        "summary": "A command was registered or unregistered.",
        "tags": [
          {
            "name": "mode",
            "comment": "emit",
            "text": "@mode emit"
          }
        ],
        "jsDoc": "/**\n * A command was registered or unregistered. This is an unfiltered registry\n * notification because a global or scoped change may affect any UI view.\n * Observer failures are contained and cannot veto the registry mutation.\n * @mode emit\n */",
        "name": "commands/change",
        "mode": "emit",
        "signature": "'commands/change'(): void"
      }
    ],
    "objects": []
  },
}
