@github/copilot-sdk 1.0.13-preview.6 → 1.0.14-preview.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -9,9 +9,9 @@ export type JsonValue = null | boolean | number | string | JsonValue[] | {
9
9
  /**
10
10
  * Union of all session event variants emitted by the Copilot CLI runtime.
11
11
  */
12
- export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
12
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | AutoTierRecommendationEvent | AutoTierSwitchFailedEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | PermissionCarriedForwardEvent | PermissionMessageAuthorizationEvent | PermissionMessageAuthorizationReadEvent | PermissionMessageAuthorizationDegradedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
- * Routing preference used when the session model is `auto`.
14
+ * Routing preference used when the session model is `auto`. `fast` is an integrator-only latency preset and is not a first-party GitHub Copilot product preference.
15
15
  */
16
16
  export type AutoTier =
17
17
  /** Optimize for efficiency. */
@@ -19,7 +19,9 @@ export type AutoTier =
19
19
  /** Balance efficiency and intelligence. */
20
20
  | "balance"
21
21
  /** Optimize for intelligence. */
22
- | "intelligence";
22
+ | "intelligence"
23
+ /** Integrator-only preset that optimizes for latency. */
24
+ | "fast";
23
25
  /**
24
26
  * Hosting platform type of the repository (github or ado)
25
27
  */
@@ -56,6 +58,20 @@ export type Verbosity =
56
58
  | "medium"
57
59
  /** A more detailed response was requested. */
58
60
  | "high";
61
+ /**
62
+ * What the user must do to recover from a failure, named as an action rather than as one client's affordance. The runtime cannot know which affordance a client offers — a slash command, a settings pane, a link — so the accompanying message stays host-agnostic and each client renders its own copy from this value. Absent when the runtime knows of no action the user can take.
63
+ */
64
+ export type RemediationAction =
65
+ /** Authenticate again with the Copilot backend. The current credential is absent, expired, or rejected. */
66
+ "sign_in"
67
+ /** Authenticate as a different account. The current account exists but lacks access to the requested resource. */
68
+ | "switch_account"
69
+ /** Inspect which account is currently authenticated before deciding what to change. */
70
+ | "show_account"
71
+ /** Review or widen the sandbox policy. The blocked path or host is named by the accompanying message or by the tool result the action arrived with. */
72
+ | "review_sandbox_policy"
73
+ /** Permit outbound network access in the sandbox policy. */
74
+ | "allow_sandbox_outbound";
59
75
  /**
60
76
  * The session mode the agent is operating in
61
77
  */
@@ -122,6 +138,28 @@ export type ModelChangeSource =
122
138
  | "automatic"
123
139
  /** An SDK or RPC caller selected the model. */
124
140
  | "sdk";
141
+ /**
142
+ * Auto preferences that Copilot API can recommend.
143
+ */
144
+ export type RecommendedAutoTier =
145
+ /** Optimize for efficiency. */
146
+ "efficiency"
147
+ /** Balance efficiency and intelligence. */
148
+ | "balance"
149
+ /** Optimize for intelligence. */
150
+ | "intelligence";
151
+ /**
152
+ * Terminal reason an Auto preference activation failed.
153
+ */
154
+ export type AutoTierSwitchFailureReason =
155
+ /** The candidate model was rejected by model policy. */
156
+ "policy_rejected"
157
+ /** The Auto routing request failed or returned an unusable response. */
158
+ | "request_failed"
159
+ /** The runtime could not prepare the Auto routing request. */
160
+ | "setup_failed"
161
+ /** The provider does not support Auto routing. */
162
+ | "unsupported";
125
163
  /**
126
164
  * Permission mode for the session.
127
165
  */
@@ -444,6 +482,18 @@ export type AbortReason =
444
482
  | "user_abort"
445
483
  /** Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit. */
446
484
  | "autopilot_credit_limit";
485
+ /**
486
+ * Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
487
+ */
488
+ export type McpServerTransport =
489
+ /** Server communicates over stdio with a local child process. */
490
+ "stdio"
491
+ /** Server communicates over streamable HTTP. */
492
+ | "http"
493
+ /** Server communicates over Server-Sent Events (deprecated). */
494
+ | "sse"
495
+ /** Server is backed by an in-memory runtime implementation. */
496
+ | "memory";
447
497
  /**
448
498
  * Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration.
449
499
  */
@@ -515,6 +565,36 @@ export type SkillInvokedTrigger =
515
565
  | "agent-invoked"
516
566
  /** Skill content loaded as part of another context, such as a configured custom agent or subagent. */
517
567
  | "context-load";
568
+ /**
569
+ * Where the model input for a task-tool sub-agent came from.
570
+ */
571
+ export type SubagentTaskModelSource =
572
+ /** The spawning agent supplied the task tool's model argument. */
573
+ "task_argument"
574
+ /** The task omitted a model and the per-sub-agent settings entry supplied a concrete one. */
575
+ | "subagent_configuration"
576
+ /** The task omitted a model and the user-defined custom agent's definition supplied one. */
577
+ | "custom_agent_definition"
578
+ /** Neither the task call, the per-sub-agent settings entry, nor a custom agent definition supplied a model. */
579
+ | "unset";
580
+ /**
581
+ * Authority or runtime mechanism responsible for sub-agent model selection.
582
+ */
583
+ export type SubagentModelSelectionSource =
584
+ /** Explicit model supplied by the parent agent on the task call and selected for dispatch. */
585
+ "explicit_override"
586
+ /** Required model policy configured for the sub-agent. */
587
+ | "configured_required"
588
+ /** Non-required model preference configured for the sub-agent. */
589
+ | "configured_preference"
590
+ /** Complementary-model default selected for the sub-agent. */
591
+ | "complementary_default"
592
+ /** Model inherited from the parent session. */
593
+ | "session_inheritance"
594
+ /** Default model declared by the agent definition. */
595
+ | "agent_definition_default"
596
+ /** Runtime policy, Auto mode, or an experiment selected the model. */
597
+ | "runtime_policy";
518
598
  /**
519
599
  * Binary asset type discriminator. Use "image" for images and "resource" otherwise.
520
600
  */
@@ -543,6 +623,24 @@ export type SystemNotificationAgentCompletedStatus =
543
623
  "completed"
544
624
  /** The agent failed. */
545
625
  | "failed";
626
+ /**
627
+ * Durable metadata describing who initiated a factory pause.
628
+ */
629
+ export type SystemNotificationFactoryPauseInfo = {
630
+ /**
631
+ * Factory pause initiator discriminator.
632
+ */
633
+ type: "user";
634
+ } | {
635
+ /**
636
+ * Stable author-defined checkpoint key that initiated the pause.
637
+ */
638
+ key: string;
639
+ /**
640
+ * Factory pause initiator discriminator.
641
+ */
642
+ type: "checkpoint";
643
+ };
546
644
  /**
547
645
  * Terminal status reached by a factory execution attempt.
548
646
  */
@@ -551,6 +649,8 @@ export type SystemNotificationFactoryCompletedStatus =
551
649
  "completed"
552
650
  /** The factory was halted. */
553
651
  | "halted"
652
+ /** The factory attempt paused intentionally. */
653
+ | "paused"
554
654
  /** The factory was cancelled. */
555
655
  | "cancelled"
556
656
  /** The factory failed. */
@@ -640,6 +740,20 @@ export type PermissionPromptRequestPathAccessKind =
640
740
  | "shell"
641
741
  /** Write access to a filesystem path. */
642
742
  | "write";
743
+ /**
744
+ * Controlled reason or actor responsible for a permission response.
745
+ */
746
+ export type PermissionDecisionSource =
747
+ /** The response followed the assisted-approval judge recommendation. */
748
+ "assisted_approval"
749
+ /** A human supplied the response through an interactive prompt. */
750
+ | "human_response"
751
+ /** The host applied a standing policy or override rather than a judge recommendation or human decision. */
752
+ | "host_policy"
753
+ /** The host denied the request because no interactive user response was available. */
754
+ | "unattended_fallback"
755
+ /** A live authorization record from an earlier human decision in this session contained the proposal, so it ran without another prompt. This is not a new human decision and never mints authority of its own. */
756
+ | "authorization_carry_forward";
643
757
  /**
644
758
  * The result of the permission request
645
759
  */
@@ -648,6 +762,15 @@ export type PermissionResult = PermissionApproved | PermissionApprovedForSession
648
762
  * The approval to add as a session-scoped rule
649
763
  */
650
764
  export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalFactory | UserToolSessionApprovalExtensionPermissionAccess | UserToolSessionApprovalExtensionEnvAccess;
765
+ /**
766
+ * Which direction a message-backed authorization claim moves authority in.
767
+ */
768
+ /** @experimental */
769
+ export type PermissionMessageAuthorizationPolarity =
770
+ /** The human's words authorized an effect. */
771
+ "grant"
772
+ /** The human's words refused an effect. */
773
+ | "denial";
651
774
  /**
652
775
  * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent.
653
776
  */
@@ -819,6 +942,8 @@ export type FactoryRunSettledStatus =
819
942
  "completed"
820
943
  /** The run was stopped by a limit, an approval refusal or another policy decision. */
821
944
  | "halted"
945
+ /** The attempt paused intentionally while preserving resumable run state. */
946
+ | "paused"
822
947
  /** The run was cancelled by its caller or by session disposal. */
823
948
  | "cancelled"
824
949
  /** The run failed, with `failureType` carrying the class when it has one. */
@@ -881,18 +1006,6 @@ export type McpServerStatus =
881
1006
  | "stopped"
882
1007
  /** The server is not configured for this session. */
883
1008
  | "not_configured";
884
- /**
885
- * Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
886
- */
887
- export type McpServerTransport =
888
- /** Server communicates over stdio with a local child process. */
889
- "stdio"
890
- /** Server communicates over streamable HTTP. */
891
- | "http"
892
- /** Server communicates over Server-Sent Events (deprecated). */
893
- | "sse"
894
- /** Server is backed by an in-memory runtime implementation. */
895
- | "memory";
896
1009
  /**
897
1010
  * Discovery source
898
1011
  */
@@ -1246,6 +1359,7 @@ export interface ErrorData {
1246
1359
  * GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
1247
1360
  */
1248
1361
  providerCallId?: string;
1362
+ remediation?: RemediationAction;
1249
1363
  /**
1250
1364
  * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
1251
1365
  */
@@ -1626,6 +1740,7 @@ export interface WarningData {
1626
1740
  * Human-readable warning message for display in the timeline
1627
1741
  */
1628
1742
  message: string;
1743
+ remediation?: RemediationAction;
1629
1744
  /**
1630
1745
  * Optional URL associated with this warning that the user can open in a browser
1631
1746
  */
@@ -1669,6 +1784,10 @@ export interface ModelChangeEvent {
1669
1784
  * Model change details including previous and new model identifiers
1670
1785
  */
1671
1786
  export interface ModelChangeData {
1787
+ /**
1788
+ * Committed Auto preference after the model configuration change, when applicable.
1789
+ */
1790
+ autoTier?: AutoTier | null;
1672
1791
  /**
1673
1792
  * Reason the change happened, when not user-initiated. `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path, or `"refusal_fallback"` when the active model declined a request (content refusal) and the runtime switched to the configured refusal-fallback model. UI clients can use this to render contextual copy.
1674
1793
  */
@@ -1681,6 +1800,7 @@ export interface ModelChangeData {
1681
1800
  * Newly selected model identifier
1682
1801
  */
1683
1802
  newModel: string;
1803
+ previousAutoTier?: AutoTier;
1684
1804
  /**
1685
1805
  * Model that was previously selected, if any
1686
1806
  */
@@ -1699,6 +1819,85 @@ export interface ModelChangeData {
1699
1819
  source?: ModelChangeSource;
1700
1820
  verbosity?: Verbosity;
1701
1821
  }
1822
+ /**
1823
+ * Session event "session.auto_tier_recommendation". Live-only Auto preference recommendation from Copilot API after a successful Auto model call.
1824
+ */
1825
+ /** @experimental */
1826
+ export interface AutoTierRecommendationEvent {
1827
+ /**
1828
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
1829
+ */
1830
+ agentId?: string;
1831
+ data: AutoTierRecommendationData;
1832
+ /**
1833
+ * Always true for events that are transient and not persisted to the session event log on disk.
1834
+ */
1835
+ ephemeral: true;
1836
+ /**
1837
+ * Unique event identifier (UUID v4), generated when the event is emitted
1838
+ */
1839
+ id: string;
1840
+ /**
1841
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
1842
+ */
1843
+ parentId: string | null;
1844
+ /**
1845
+ * ISO 8601 timestamp when the event was created
1846
+ */
1847
+ timestamp: string;
1848
+ /**
1849
+ * Type discriminator. Always "session.auto_tier_recommendation".
1850
+ */
1851
+ type: "session.auto_tier_recommendation";
1852
+ }
1853
+ /**
1854
+ * Live-only Auto preference recommendation from Copilot API after a successful Auto model call.
1855
+ */
1856
+ /** @experimental */
1857
+ export interface AutoTierRecommendationData {
1858
+ recommendedAutoTier: RecommendedAutoTier;
1859
+ }
1860
+ /**
1861
+ * Session event "session.auto_tier_switch_failed". A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume.
1862
+ */
1863
+ export interface AutoTierSwitchFailedEvent {
1864
+ /**
1865
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
1866
+ */
1867
+ agentId?: string;
1868
+ data: AutoTierSwitchFailedData;
1869
+ /**
1870
+ * Always true for events that are transient and not persisted to the session event log on disk.
1871
+ */
1872
+ ephemeral: true;
1873
+ /**
1874
+ * Unique event identifier (UUID v4), generated when the event is emitted
1875
+ */
1876
+ id: string;
1877
+ /**
1878
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
1879
+ */
1880
+ parentId: string | null;
1881
+ /**
1882
+ * ISO 8601 timestamp when the event was created
1883
+ */
1884
+ timestamp: string;
1885
+ /**
1886
+ * Type discriminator. Always "session.auto_tier_switch_failed".
1887
+ */
1888
+ type: "session.auto_tier_switch_failed";
1889
+ }
1890
+ /**
1891
+ * A transient Auto preference failure emitted when the runtime cannot mint or accept a usable model and token pair. The previously effective preference remains active, so SDK clients can surface a non-blocking failure without changing their committed-tier state. This event is ephemeral and is not persisted or replayed on resume.
1892
+ */
1893
+ export interface AutoTierSwitchFailedData {
1894
+ effectiveAutoTier?: AutoTier;
1895
+ reason: AutoTierSwitchFailureReason;
1896
+ /**
1897
+ * Auto preference that failed to activate, or null when returning to provider-default routing failed.
1898
+ */
1899
+ requestedAutoTier: AutoTier | null;
1900
+ }
1702
1901
  /**
1703
1902
  * Session event "session.mode_changed". Agent mode change details including previous and new modes
1704
1903
  */
@@ -1862,13 +2061,13 @@ export interface PermissionsChangedData {
1862
2061
  *
1863
2062
  * @experimental
1864
2063
  */
1865
- mode: PermissionMode;
2064
+ mode?: PermissionMode;
1866
2065
  /**
1867
2066
  * Permission mode before the change
1868
2067
  *
1869
2068
  * @experimental
1870
2069
  */
1871
- previousMode: PermissionMode;
2070
+ previousMode?: PermissionMode;
1872
2071
  }
1873
2072
  /**
1874
2073
  * Session event "session.plan_changed". Plan file operation details indicating what changed
@@ -2774,6 +2973,10 @@ export interface CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail {
2774
2973
  * Cost per batch of tokens
2775
2974
  */
2776
2975
  costPerBatch: number;
2976
+ /**
2977
+ * Model responsible for this billing entry
2978
+ */
2979
+ model?: string;
2777
2980
  /**
2778
2981
  * Total token count for this entry
2779
2982
  */
@@ -5192,6 +5395,10 @@ export interface AssistantUsageData {
5192
5395
  * Per-request cost and usage data from the CAPI copilot_usage response field
5193
5396
  */
5194
5397
  export interface AssistantUsageCopilotUsage {
5398
+ /**
5399
+ * Default billing model for token details that do not identify their own model
5400
+ */
5401
+ model?: string;
5195
5402
  /**
5196
5403
  * Total cost in nano-AI units for this request
5197
5404
  */
@@ -5209,6 +5416,10 @@ export interface AssistantUsageCopilotUsageTokenDetail {
5209
5416
  * Cost per batch of tokens
5210
5417
  */
5211
5418
  costPerBatch: number;
5419
+ /**
5420
+ * Model responsible for this billing entry
5421
+ */
5422
+ model?: string;
5212
5423
  /**
5213
5424
  * Total token count for this entry
5214
5425
  */
@@ -5561,6 +5772,7 @@ export interface ToolExecutionStartData {
5561
5772
  * Original tool name on the MCP server, when the tool is an MCP tool
5562
5773
  */
5563
5774
  mcpToolName?: string;
5775
+ mcpTransport?: McpServerTransport;
5564
5776
  /**
5565
5777
  * Model identifier that generated this tool call
5566
5778
  */
@@ -5832,6 +6044,7 @@ export interface ToolExecutionCompleteError {
5832
6044
  * Human-readable error message
5833
6045
  */
5834
6046
  message: string;
6047
+ remediation?: RemediationAction;
5835
6048
  }
5836
6049
  /**
5837
6050
  * Tool execution result on success
@@ -6494,6 +6707,7 @@ export interface SubagentStartedData {
6494
6707
  * Whether this sub-agent can be resumed. Currently always false.
6495
6708
  */
6496
6709
  resumable?: boolean;
6710
+ taskModelSource?: SubagentTaskModelSource;
6497
6711
  /**
6498
6712
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6499
6713
  */
@@ -6628,6 +6842,7 @@ export interface SubagentCompletedData {
6628
6842
  * Why an explicit task-call model did not become the effective model
6629
6843
  */
6630
6844
  modelOverrideReason?: string;
6845
+ modelSelectionSource?: SubagentModelSelectionSource;
6631
6846
  /**
6632
6847
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6633
6848
  */
@@ -6719,6 +6934,7 @@ export interface SubagentFailedData {
6719
6934
  * Why an explicit task-call model did not become the effective model
6720
6935
  */
6721
6936
  modelOverrideReason?: string;
6937
+ modelSelectionSource?: SubagentModelSelectionSource;
6722
6938
  /**
6723
6939
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6724
6940
  */
@@ -7319,6 +7535,7 @@ export interface SystemNotificationFactoryCompleted {
7319
7535
  * Machine-readable terminal failure details, when present.
7320
7536
  */
7321
7537
  failure?: JsonValue;
7538
+ pauseInfo?: SystemNotificationFactoryPauseInfo;
7322
7539
  /**
7323
7540
  * Bounded prompt-safe preview of the completed result.
7324
7541
  */
@@ -7445,13 +7662,31 @@ export interface PermissionRequestShell {
7445
7662
  */
7446
7663
  possibleUrls: PermissionRequestShellPossibleUrl[];
7447
7664
  /**
7448
- * True when the model has requested to run this command outside the sandbox (it set requestSandboxBypass: true and the host opted in via sandbox.allowBypass). This is a request, not a grant: the command runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
7665
+ * True when the tool is asking to run this command outside the sandbox, either because the command detaches and cannot be sandboxed at all, or because a sandboxed run looked blocked (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the command runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
7449
7666
  */
7450
7667
  requestSandboxBypass?: boolean;
7451
7668
  /**
7452
- * Model-provided justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
7669
+ * What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
7453
7670
  */
7454
7671
  requestSandboxBypassReason?: string;
7672
+ /**
7673
+ * True when the requested escalation is a permissive retry rather than a full bypass: the command re-runs inside the sandbox with its file and process restrictions recording instead of blocking, while the network policy stays enforced. Always accompanied by requestSandboxBypass, so hosts that do not recognize this field still treat the request as the escalation it is. Hosts that do recognize it must not describe the command as running outside the sandbox, which would overstate the privilege being granted.
7674
+ */
7675
+ requestSandboxPermissive?: boolean;
7676
+ /**
7677
+ * Runtime-resolved canonical object each possiblePaths entry names, keyed by the requested spelling, used for authorization identity checks. Internal and experimental; clients should continue to display possiblePaths.
7678
+ *
7679
+ * @experimental
7680
+ */
7681
+ resolvedPaths?: {
7682
+ [k: string]: string | undefined;
7683
+ };
7684
+ /**
7685
+ * Runtime-resolved canonical working directory the command runs in, used for authorization identity checks. Internal and experimental; clients should not display it.
7686
+ *
7687
+ * @experimental
7688
+ */
7689
+ resolvedWorkingDirectory?: string;
7455
7690
  /**
7456
7691
  * Tool call ID that triggered this permission request
7457
7692
  */
@@ -7536,6 +7771,12 @@ export interface PermissionRequestWrite {
7536
7771
  * Justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
7537
7772
  */
7538
7773
  requestSandboxBypassReason?: string;
7774
+ /**
7775
+ * Runtime-resolved canonical path used for authorization identity checks. Internal and experimental; clients should continue to display fileName.
7776
+ *
7777
+ * @experimental
7778
+ */
7779
+ resolvedPath?: string;
7539
7780
  /**
7540
7781
  * Tool call ID that triggered this permission request
7541
7782
  */
@@ -7562,13 +7803,19 @@ export interface PermissionRequestRead {
7562
7803
  */
7563
7804
  path: string;
7564
7805
  /**
7565
- * True when the model has requested to run this search outside the sandbox (it set requestSandboxBypass: true and the host opted in via sandbox.allowBypass). This is a request, not a grant: the search runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
7806
+ * True when the tool is asking to re-run this search outside the sandbox, after a sandboxed run looked blocked (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the search runs unsandboxed only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
7566
7807
  */
7567
7808
  requestSandboxBypass?: boolean;
7568
7809
  /**
7569
- * Model-provided justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
7810
+ * What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
7570
7811
  */
7571
7812
  requestSandboxBypassReason?: string;
7813
+ /**
7814
+ * Runtime-resolved canonical path used for authorization identity checks. Internal and experimental; clients should continue to display path.
7815
+ *
7816
+ * @experimental
7817
+ */
7818
+ resolvedPath?: string;
7572
7819
  /**
7573
7820
  * Tool call ID that triggered this permission request
7574
7821
  */
@@ -7634,11 +7881,11 @@ export interface PermissionRequestUrl {
7634
7881
  */
7635
7882
  redirectedFrom?: string;
7636
7883
  /**
7637
- * True when this URL fetch is requesting to bypass the sandbox network policy: either the model set requestSandboxBypass: true, or the tool re-issued the request as an interactive bypass after the network policy denied the approved URL (host opted in via sandbox.allowBypass). This is a request, not a grant: the fetch runs only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
7884
+ * True when the tool is asking to run this URL fetch outside the sandbox, after the network policy denied the approved URL or the sandbox proxy could not reach it (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the fetch runs only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
7638
7885
  */
7639
7886
  requestSandboxBypass?: boolean;
7640
7887
  /**
7641
- * Model-provided justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
7888
+ * What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
7642
7889
  */
7643
7890
  requestSandboxBypassReason?: string;
7644
7891
  /**
@@ -7940,6 +8187,18 @@ export interface PermissionPromptRequestCommands {
7940
8187
  * Whether managed policy requires a human response and forbids host auto-approval
7941
8188
  */
7942
8189
  managedApprovalRequired?: boolean;
8190
+ /**
8191
+ * True when the shell command is requesting sandbox escalation. This is a request, not a grant.
8192
+ */
8193
+ requestSandboxBypass?: boolean;
8194
+ /**
8195
+ * Reason for the sandbox escalation request.
8196
+ */
8197
+ requestSandboxBypassReason?: string;
8198
+ /**
8199
+ * True when the escalation is a permissive retry that keeps the sandbox and network policy attached while recording file and process accesses instead of blocking them.
8200
+ */
8201
+ requestSandboxPermissive?: boolean;
7943
8202
  /**
7944
8203
  * Tool call ID that triggered this permission request
7945
8204
  */
@@ -7987,6 +8246,12 @@ export interface PermissionPromptRequestWrite {
7987
8246
  * Complete new file contents for newly created files
7988
8247
  */
7989
8248
  newFileContents?: string;
8249
+ /**
8250
+ * Runtime-resolved canonical path used for authorization identity checks. Internal and experimental; clients should continue to display fileName.
8251
+ *
8252
+ * @experimental
8253
+ */
8254
+ resolvedPath?: string;
7990
8255
  /**
7991
8256
  * Tool call ID that triggered this permission request
7992
8257
  */
@@ -8018,6 +8283,12 @@ export interface PermissionPromptRequestRead {
8018
8283
  * Path of the file or directory being read
8019
8284
  */
8020
8285
  path: string;
8286
+ /**
8287
+ * Runtime-resolved canonical path used for authorization identity checks. Internal and experimental; clients should continue to display path.
8288
+ *
8289
+ * @experimental
8290
+ */
8291
+ resolvedPath?: string;
8021
8292
  /**
8022
8293
  * Tool call ID that triggered this permission request
8023
8294
  */
@@ -8095,11 +8366,11 @@ export interface PermissionPromptRequestUrl {
8095
8366
  */
8096
8367
  redirectedFrom?: string;
8097
8368
  /**
8098
- * True when this URL fetch is requesting to bypass the sandbox network policy: either the model set requestSandboxBypass: true, or the tool re-issued the request as an interactive bypass after the network policy denied the approved URL (host opted in via sandbox.allowBypass). This is a request, not a grant: the fetch runs only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
8369
+ * True when the tool is asking to run this URL fetch outside the sandbox, after the network policy denied the approved URL or the sandbox proxy could not reach it (host opted in via sandbox.allowBypass). The model cannot ask for this; only the tool raises it. This is a request, not a grant: the fetch runs only if the user approves this permission request. Hosts should highlight the elevated risk in the approval UI.
8099
8370
  */
8100
8371
  requestSandboxBypass?: boolean;
8101
8372
  /**
8102
- * Model-provided justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
8373
+ * What the tool tells the user about the bypass on offer: which policy rule blocked the call, or why it cannot be sandboxed. Only meaningful when requestSandboxBypass is true.
8103
8374
  */
8104
8375
  requestSandboxBypassReason?: string;
8105
8376
  /**
@@ -8427,6 +8698,12 @@ export interface PermissionCompletedEvent {
8427
8698
  * Permission request completion notification signaling UI dismissal
8428
8699
  */
8429
8700
  export interface PermissionCompletedData {
8701
+ /**
8702
+ * Who decided this permission request. Absent on completions recorded before this field existed, which consumers must treat as "not a human decision" rather than assuming one. Authorization records are minted only for `human_response`; an assisted-approval verdict, a host policy, an unattended fallback, and a hook resolution all produce the same `result` a person does, so this is the only field that distinguishes them.
8703
+ *
8704
+ * @experimental
8705
+ */
8706
+ decisionSource?: PermissionDecisionSource;
8430
8707
  /**
8431
8708
  * Request ID of the resolved permission request; clients should dismiss any UI for this request
8432
8709
  */
@@ -8709,6 +8986,244 @@ export interface PermissionDeniedByPermissionRequestHook {
8709
8986
  */
8710
8987
  message?: string;
8711
8988
  }
8989
+ /**
8990
+ * Session event "permission.carriedForward". Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
8991
+ */
8992
+ /** @experimental */
8993
+ export interface PermissionCarriedForwardEvent {
8994
+ /**
8995
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
8996
+ */
8997
+ agentId?: string;
8998
+ data: PermissionCarriedForwardData;
8999
+ /**
9000
+ * When true, the event is transient and not persisted to the session event log on disk
9001
+ */
9002
+ ephemeral?: boolean;
9003
+ /**
9004
+ * Unique event identifier (UUID v4), generated when the event is emitted
9005
+ */
9006
+ id: string;
9007
+ /**
9008
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
9009
+ */
9010
+ parentId: string | null;
9011
+ /**
9012
+ * ISO 8601 timestamp when the event was created
9013
+ */
9014
+ timestamp: string;
9015
+ /**
9016
+ * Type discriminator. Always "permission.carriedForward".
9017
+ */
9018
+ type: "permission.carriedForward";
9019
+ }
9020
+ /**
9021
+ * Records that a live authorization record from an earlier human decision in this session contained a permission proposal, so it ran without another prompt. This mints no authority: it accounts for one more effect against the prior grant, which is what lets a replayed session agree with the live one about how much of that grant is left.
9022
+ */
9023
+ /** @experimental */
9024
+ export interface PermissionCarriedForwardData {
9025
+ /**
9026
+ * Always `authorization_carry_forward`. Stated explicitly so a consumer reading this event cannot mistake it for a human, host-policy, or assisted-approval decision.
9027
+ *
9028
+ * @experimental
9029
+ */
9030
+ decisionSource: PermissionDecisionSource;
9031
+ /**
9032
+ * Identity of the prior authorization record that contained the proposal.
9033
+ *
9034
+ * @experimental
9035
+ */
9036
+ recordId: string;
9037
+ /**
9038
+ * Authorization edge minted for this admission. Not a prompt id: no prompt was raised, so no client should expect a request with this id.
9039
+ *
9040
+ * @experimental
9041
+ */
9042
+ requestId: string;
9043
+ /**
9044
+ * Tool call this admission authorizes. Its execution receipts the prior grant, which is how a single-effect approval is spent rather than carried forward again.
9045
+ *
9046
+ * @experimental
9047
+ */
9048
+ toolCallId: string;
9049
+ }
9050
+ /**
9051
+ * Session event "permission.messageAuthorization". Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
9052
+ */
9053
+ /** @experimental */
9054
+ export interface PermissionMessageAuthorizationEvent {
9055
+ /**
9056
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
9057
+ */
9058
+ agentId?: string;
9059
+ data: PermissionMessageAuthorizationData;
9060
+ /**
9061
+ * When true, the event is transient and not persisted to the session event log on disk
9062
+ */
9063
+ ephemeral?: boolean;
9064
+ /**
9065
+ * Unique event identifier (UUID v4), generated when the event is emitted
9066
+ */
9067
+ id: string;
9068
+ /**
9069
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
9070
+ */
9071
+ parentId: string | null;
9072
+ /**
9073
+ * ISO 8601 timestamp when the event was created
9074
+ */
9075
+ timestamp: string;
9076
+ /**
9077
+ * Type discriminator. Always "permission.messageAuthorization".
9078
+ */
9079
+ type: "permission.messageAuthorization";
9080
+ }
9081
+ /**
9082
+ * Freezes one blinded, verbatim-verified authorization claim the runtime minted from a human user message, so a resumed session re-establishes the same grant deterministically instead of re-running the extraction model. This mints no authority on its own: it records what a blinded proposer pointed at and the trusted discriminator the runtime established, and deterministic establishment runs on replay. Persisted so recorded authority survives compaction and process resume.
9083
+ */
9084
+ /** @experimental */
9085
+ export interface PermissionMessageAuthorizationData {
9086
+ /**
9087
+ * The kind of effect authorized, as an action-class identifier.
9088
+ *
9089
+ * @experimental
9090
+ */
9091
+ actionClass: string;
9092
+ /**
9093
+ * Whether the claim granted or denied authority.
9094
+ *
9095
+ * @experimental
9096
+ */
9097
+ polarity: PermissionMessageAuthorizationPolarity;
9098
+ /**
9099
+ * Deterministic identity of the record, derived from the turn and span offsets so re-extracting the same span mints nothing new.
9100
+ *
9101
+ * @experimental
9102
+ */
9103
+ recordId: string;
9104
+ /**
9105
+ * End byte offset of the authorizing span within the turn.
9106
+ *
9107
+ * @experimental
9108
+ */
9109
+ spanEnd: number;
9110
+ /**
9111
+ * Start byte offset of the authorizing span within the turn.
9112
+ *
9113
+ * @experimental
9114
+ */
9115
+ spanStart: number;
9116
+ /**
9117
+ * Concrete named targets that appear verbatim inside the span.
9118
+ *
9119
+ * @experimental
9120
+ */
9121
+ targetMembers?: string[];
9122
+ /**
9123
+ * The task the permission is scoped to, when the human named one.
9124
+ *
9125
+ * @experimental
9126
+ */
9127
+ task?: string;
9128
+ /**
9129
+ * The human turn the quoted span was read from.
9130
+ *
9131
+ * @experimental
9132
+ */
9133
+ turnIndex: number;
9134
+ /**
9135
+ * The trusted version discriminator, when one exists. Exact shell-command grants carry the byte-identical commands grounded in the human span; world-derived classes carry a file object, remote tip, or runner only when that state was captured safely. An opaque object mirroring the runtime's adjacently-tagged resolution.
9136
+ *
9137
+ * @experimental
9138
+ */
9139
+ world?: JsonValue;
9140
+ }
9141
+ /**
9142
+ * Session event "permission.messageAuthorizationRead". Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Persisted purely to avoid wasted model calls across resume; it is never a correctness mechanism.
9143
+ */
9144
+ /** @experimental */
9145
+ export interface PermissionMessageAuthorizationReadEvent {
9146
+ /**
9147
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
9148
+ */
9149
+ agentId?: string;
9150
+ data: PermissionMessageAuthorizationReadData;
9151
+ /**
9152
+ * When true, the event is transient and not persisted to the session event log on disk
9153
+ */
9154
+ ephemeral?: boolean;
9155
+ /**
9156
+ * Unique event identifier (UUID v4), generated when the event is emitted
9157
+ */
9158
+ id: string;
9159
+ /**
9160
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
9161
+ */
9162
+ parentId: string | null;
9163
+ /**
9164
+ * ISO 8601 timestamp when the event was created
9165
+ */
9166
+ timestamp: string;
9167
+ /**
9168
+ * Type discriminator. Always "permission.messageAuthorizationRead".
9169
+ */
9170
+ type: "permission.messageAuthorizationRead";
9171
+ }
9172
+ /**
9173
+ * Records that one human turn has been read by the blinded authorization proposer, whether or not it minted anything, so a resumed session does not re-run the extraction model on a turn the live session already read. Persisted purely to avoid wasted model calls across resume; it is never a correctness mechanism.
9174
+ */
9175
+ /** @experimental */
9176
+ export interface PermissionMessageAuthorizationReadData {
9177
+ /**
9178
+ * The human turn that was read by the proposer.
9179
+ *
9180
+ * @experimental
9181
+ */
9182
+ turnIndex: number;
9183
+ }
9184
+ /**
9185
+ * Session event "permission.messageAuthorizationDegraded". Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
9186
+ */
9187
+ /** @experimental */
9188
+ export interface PermissionMessageAuthorizationDegradedEvent {
9189
+ /**
9190
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
9191
+ */
9192
+ agentId?: string;
9193
+ data: PermissionMessageAuthorizationDegradedData;
9194
+ /**
9195
+ * When true, the event is transient and not persisted to the session event log on disk
9196
+ */
9197
+ ephemeral?: boolean;
9198
+ /**
9199
+ * Unique event identifier (UUID v4), generated when the event is emitted
9200
+ */
9201
+ id: string;
9202
+ /**
9203
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
9204
+ */
9205
+ parentId: string | null;
9206
+ /**
9207
+ * ISO 8601 timestamp when the event was created
9208
+ */
9209
+ timestamp: string;
9210
+ /**
9211
+ * Type discriminator. Always "permission.messageAuthorizationDegraded".
9212
+ */
9213
+ type: "permission.messageAuthorizationDegraded";
9214
+ }
9215
+ /**
9216
+ * Records that message-backed authorization could not safely represent one human turn before compaction. The runtime may compact the original message after this marker is durable, but message-derived carry-forward and assisted auto-approval remain disabled for the rest of the session so subsequent commands continue through the ordinary permission prompt.
9217
+ */
9218
+ /** @experimental */
9219
+ export interface PermissionMessageAuthorizationDegradedData {
9220
+ /**
9221
+ * The human turn that could not be represented safely.
9222
+ *
9223
+ * @experimental
9224
+ */
9225
+ turnIndex: number;
9226
+ }
8712
9227
  /**
8713
9228
  * Session event "user_input.requested". User input request notification with question and optional predefined choices
8714
9229
  */
@@ -10602,6 +11117,10 @@ export interface CustomAgentsUpdatedAgent {
10602
11117
  * Description of what the agent does
10603
11118
  */
10604
11119
  description: string;
11120
+ /**
11121
+ * Whether model-driven invocation is disabled for this agent.
11122
+ */
11123
+ disableModelInvocation?: boolean;
10605
11124
  /**
10606
11125
  * Human-readable display name
10607
11126
  */
@@ -10695,10 +11214,20 @@ export interface McpServersLoadedServer {
10695
11214
  * Version of the plugin that supplied the effective MCP server config, only when source is plugin
10696
11215
  */
10697
11216
  pluginVersion?: string;
11217
+ serverMetadata?: McpServerMetadata;
10698
11218
  source?: McpServerSource;
10699
11219
  status: McpServerStatus;
10700
11220
  transport?: McpServerTransport;
10701
11221
  }
11222
+ /**
11223
+ * Server-advertised metadata learned through modern discovery or legacy initialization.
11224
+ */
11225
+ export interface McpServerMetadata {
11226
+ /**
11227
+ * Non-empty natural-language guidance for using the server, or null when the server omitted instructions or advertised an empty string.
11228
+ */
11229
+ instructions: string | null;
11230
+ }
10702
11231
  /**
10703
11232
  * Session event "session.mcp_server_status_changed". Payload of `session.mcp_server_status_changed` for one MCP server's status and optional failure error.
10704
11233
  */
@@ -10743,6 +11272,84 @@ export interface McpServerStatusChangedData {
10743
11272
  serverName: string;
10744
11273
  status: McpServerStatus;
10745
11274
  }
11275
+ /**
11276
+ * Session event "session.mcp_server_removed". Payload of `session.mcp_server_removed` identifying an MCP server the graph no longer runs.
11277
+ */
11278
+ export interface McpServerRemovedEvent {
11279
+ /**
11280
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
11281
+ */
11282
+ agentId?: string;
11283
+ data: McpServerRemovedData;
11284
+ /**
11285
+ * Always true for events that are transient and not persisted to the session event log on disk.
11286
+ */
11287
+ ephemeral: true;
11288
+ /**
11289
+ * Unique event identifier (UUID v4), generated when the event is emitted
11290
+ */
11291
+ id: string;
11292
+ /**
11293
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
11294
+ */
11295
+ parentId: string | null;
11296
+ /**
11297
+ * ISO 8601 timestamp when the event was created
11298
+ */
11299
+ timestamp: string;
11300
+ /**
11301
+ * Type discriminator. Always "session.mcp_server_removed".
11302
+ */
11303
+ type: "session.mcp_server_removed";
11304
+ }
11305
+ /**
11306
+ * Payload of `session.mcp_server_removed` identifying an MCP server the graph no longer runs.
11307
+ */
11308
+ export interface McpServerRemovedData {
11309
+ /**
11310
+ * Name of the MCP server that was removed from the graph
11311
+ */
11312
+ serverName: string;
11313
+ }
11314
+ /**
11315
+ * Session event "session.mcp_server_needs_reconnect". Payload of `session.mcp_server_needs_reconnect` identifying an MCP server whose connection must be re-established.
11316
+ */
11317
+ export interface McpServerNeedsReconnectEvent {
11318
+ /**
11319
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
11320
+ */
11321
+ agentId?: string;
11322
+ data: McpServerNeedsReconnectData;
11323
+ /**
11324
+ * Always true for events that are transient and not persisted to the session event log on disk.
11325
+ */
11326
+ ephemeral: true;
11327
+ /**
11328
+ * Unique event identifier (UUID v4), generated when the event is emitted
11329
+ */
11330
+ id: string;
11331
+ /**
11332
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
11333
+ */
11334
+ parentId: string | null;
11335
+ /**
11336
+ * ISO 8601 timestamp when the event was created
11337
+ */
11338
+ timestamp: string;
11339
+ /**
11340
+ * Type discriminator. Always "session.mcp_server_needs_reconnect".
11341
+ */
11342
+ type: "session.mcp_server_needs_reconnect";
11343
+ }
11344
+ /**
11345
+ * Payload of `session.mcp_server_needs_reconnect` identifying an MCP server whose connection must be re-established.
11346
+ */
11347
+ export interface McpServerNeedsReconnectData {
11348
+ /**
11349
+ * Name of the MCP server that needs to reconnect
11350
+ */
11351
+ serverName: string;
11352
+ }
10746
11353
  /**
10747
11354
  * Session event "mcp.tools.list_changed". Payload identifying the MCP server associated with a list change.
10748
11355
  */