@github/copilot-sdk 1.0.13 → 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 | 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 | 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;
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
  */
@@ -136,6 +138,16 @@ export type ModelChangeSource =
136
138
  | "automatic"
137
139
  /** An SDK or RPC caller selected the model. */
138
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";
139
151
  /**
140
152
  * Terminal reason an Auto preference activation failed.
141
153
  */
@@ -470,6 +482,18 @@ export type AbortReason =
470
482
  | "user_abort"
471
483
  /** Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit. */
472
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";
473
497
  /**
474
498
  * Allowed values for the `ToolExecutionStartToolDescriptionMetaUIVisibility` enumeration.
475
499
  */
@@ -541,6 +565,36 @@ export type SkillInvokedTrigger =
541
565
  | "agent-invoked"
542
566
  /** Skill content loaded as part of another context, such as a configured custom agent or subagent. */
543
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";
544
598
  /**
545
599
  * Binary asset type discriminator. Use "image" for images and "resource" otherwise.
546
600
  */
@@ -569,6 +623,24 @@ export type SystemNotificationAgentCompletedStatus =
569
623
  "completed"
570
624
  /** The agent failed. */
571
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
+ };
572
644
  /**
573
645
  * Terminal status reached by a factory execution attempt.
574
646
  */
@@ -577,6 +649,8 @@ export type SystemNotificationFactoryCompletedStatus =
577
649
  "completed"
578
650
  /** The factory was halted. */
579
651
  | "halted"
652
+ /** The factory attempt paused intentionally. */
653
+ | "paused"
580
654
  /** The factory was cancelled. */
581
655
  | "cancelled"
582
656
  /** The factory failed. */
@@ -666,6 +740,20 @@ export type PermissionPromptRequestPathAccessKind =
666
740
  | "shell"
667
741
  /** Write access to a filesystem path. */
668
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";
669
757
  /**
670
758
  * The result of the permission request
671
759
  */
@@ -674,6 +762,15 @@ export type PermissionResult = PermissionApproved | PermissionApprovedForSession
674
762
  * The approval to add as a session-scoped rule
675
763
  */
676
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";
677
774
  /**
678
775
  * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent.
679
776
  */
@@ -845,6 +942,8 @@ export type FactoryRunSettledStatus =
845
942
  "completed"
846
943
  /** The run was stopped by a limit, an approval refusal or another policy decision. */
847
944
  | "halted"
945
+ /** The attempt paused intentionally while preserving resumable run state. */
946
+ | "paused"
848
947
  /** The run was cancelled by its caller or by session disposal. */
849
948
  | "cancelled"
850
949
  /** The run failed, with `failureType` carrying the class when it has one. */
@@ -907,18 +1006,6 @@ export type McpServerStatus =
907
1006
  | "stopped"
908
1007
  /** The server is not configured for this session. */
909
1008
  | "not_configured";
910
- /**
911
- * Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
912
- */
913
- export type McpServerTransport =
914
- /** Server communicates over stdio with a local child process. */
915
- "stdio"
916
- /** Server communicates over streamable HTTP. */
917
- | "http"
918
- /** Server communicates over Server-Sent Events (deprecated). */
919
- | "sse"
920
- /** Server is backed by an in-memory runtime implementation. */
921
- | "memory";
922
1009
  /**
923
1010
  * Discovery source
924
1011
  */
@@ -1732,6 +1819,44 @@ export interface ModelChangeData {
1732
1819
  source?: ModelChangeSource;
1733
1820
  verbosity?: Verbosity;
1734
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
+ }
1735
1860
  /**
1736
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.
1737
1862
  */
@@ -1936,13 +2061,13 @@ export interface PermissionsChangedData {
1936
2061
  *
1937
2062
  * @experimental
1938
2063
  */
1939
- mode: PermissionMode;
2064
+ mode?: PermissionMode;
1940
2065
  /**
1941
2066
  * Permission mode before the change
1942
2067
  *
1943
2068
  * @experimental
1944
2069
  */
1945
- previousMode: PermissionMode;
2070
+ previousMode?: PermissionMode;
1946
2071
  }
1947
2072
  /**
1948
2073
  * Session event "session.plan_changed". Plan file operation details indicating what changed
@@ -2848,6 +2973,10 @@ export interface CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail {
2848
2973
  * Cost per batch of tokens
2849
2974
  */
2850
2975
  costPerBatch: number;
2976
+ /**
2977
+ * Model responsible for this billing entry
2978
+ */
2979
+ model?: string;
2851
2980
  /**
2852
2981
  * Total token count for this entry
2853
2982
  */
@@ -5266,6 +5395,10 @@ export interface AssistantUsageData {
5266
5395
  * Per-request cost and usage data from the CAPI copilot_usage response field
5267
5396
  */
5268
5397
  export interface AssistantUsageCopilotUsage {
5398
+ /**
5399
+ * Default billing model for token details that do not identify their own model
5400
+ */
5401
+ model?: string;
5269
5402
  /**
5270
5403
  * Total cost in nano-AI units for this request
5271
5404
  */
@@ -5283,6 +5416,10 @@ export interface AssistantUsageCopilotUsageTokenDetail {
5283
5416
  * Cost per batch of tokens
5284
5417
  */
5285
5418
  costPerBatch: number;
5419
+ /**
5420
+ * Model responsible for this billing entry
5421
+ */
5422
+ model?: string;
5286
5423
  /**
5287
5424
  * Total token count for this entry
5288
5425
  */
@@ -5635,6 +5772,7 @@ export interface ToolExecutionStartData {
5635
5772
  * Original tool name on the MCP server, when the tool is an MCP tool
5636
5773
  */
5637
5774
  mcpToolName?: string;
5775
+ mcpTransport?: McpServerTransport;
5638
5776
  /**
5639
5777
  * Model identifier that generated this tool call
5640
5778
  */
@@ -6569,6 +6707,7 @@ export interface SubagentStartedData {
6569
6707
  * Whether this sub-agent can be resumed. Currently always false.
6570
6708
  */
6571
6709
  resumable?: boolean;
6710
+ taskModelSource?: SubagentTaskModelSource;
6572
6711
  /**
6573
6712
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6574
6713
  */
@@ -6703,6 +6842,7 @@ export interface SubagentCompletedData {
6703
6842
  * Why an explicit task-call model did not become the effective model
6704
6843
  */
6705
6844
  modelOverrideReason?: string;
6845
+ modelSelectionSource?: SubagentModelSelectionSource;
6706
6846
  /**
6707
6847
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6708
6848
  */
@@ -6794,6 +6934,7 @@ export interface SubagentFailedData {
6794
6934
  * Why an explicit task-call model did not become the effective model
6795
6935
  */
6796
6936
  modelOverrideReason?: string;
6937
+ modelSelectionSource?: SubagentModelSelectionSource;
6797
6938
  /**
6798
6939
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6799
6940
  */
@@ -7394,6 +7535,7 @@ export interface SystemNotificationFactoryCompleted {
7394
7535
  * Machine-readable terminal failure details, when present.
7395
7536
  */
7396
7537
  failure?: JsonValue;
7538
+ pauseInfo?: SystemNotificationFactoryPauseInfo;
7397
7539
  /**
7398
7540
  * Bounded prompt-safe preview of the completed result.
7399
7541
  */
@@ -7527,6 +7669,24 @@ export interface PermissionRequestShell {
7527
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.
7528
7670
  */
7529
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;
7530
7690
  /**
7531
7691
  * Tool call ID that triggered this permission request
7532
7692
  */
@@ -7611,6 +7771,12 @@ export interface PermissionRequestWrite {
7611
7771
  * Justification for the sandbox-bypass request. Only meaningful when requestSandboxBypass is true.
7612
7772
  */
7613
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;
7614
7780
  /**
7615
7781
  * Tool call ID that triggered this permission request
7616
7782
  */
@@ -7644,6 +7810,12 @@ export interface PermissionRequestRead {
7644
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.
7645
7811
  */
7646
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;
7647
7819
  /**
7648
7820
  * Tool call ID that triggered this permission request
7649
7821
  */
@@ -8015,6 +8187,18 @@ export interface PermissionPromptRequestCommands {
8015
8187
  * Whether managed policy requires a human response and forbids host auto-approval
8016
8188
  */
8017
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;
8018
8202
  /**
8019
8203
  * Tool call ID that triggered this permission request
8020
8204
  */
@@ -8062,6 +8246,12 @@ export interface PermissionPromptRequestWrite {
8062
8246
  * Complete new file contents for newly created files
8063
8247
  */
8064
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;
8065
8255
  /**
8066
8256
  * Tool call ID that triggered this permission request
8067
8257
  */
@@ -8093,6 +8283,12 @@ export interface PermissionPromptRequestRead {
8093
8283
  * Path of the file or directory being read
8094
8284
  */
8095
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;
8096
8292
  /**
8097
8293
  * Tool call ID that triggered this permission request
8098
8294
  */
@@ -8502,6 +8698,12 @@ export interface PermissionCompletedEvent {
8502
8698
  * Permission request completion notification signaling UI dismissal
8503
8699
  */
8504
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;
8505
8707
  /**
8506
8708
  * Request ID of the resolved permission request; clients should dismiss any UI for this request
8507
8709
  */
@@ -8784,6 +8986,244 @@ export interface PermissionDeniedByPermissionRequestHook {
8784
8986
  */
8785
8987
  message?: string;
8786
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
+ }
8787
9227
  /**
8788
9228
  * Session event "user_input.requested". User input request notification with question and optional predefined choices
8789
9229
  */
@@ -10677,6 +11117,10 @@ export interface CustomAgentsUpdatedAgent {
10677
11117
  * Description of what the agent does
10678
11118
  */
10679
11119
  description: string;
11120
+ /**
11121
+ * Whether model-driven invocation is disabled for this agent.
11122
+ */
11123
+ disableModelInvocation?: boolean;
10680
11124
  /**
10681
11125
  * Human-readable display name
10682
11126
  */