@github/copilot-sdk 1.0.15-unstable.35663726336.gcb2a8cc → 1.0.15

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,7 +9,7 @@ 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 | IndexedSearchEvent | 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 | PermissionRecoveryEvent | 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 | PermissionAssentDetectedEvent | PermissionContextualAuthorizationEvent | 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 | IndexedSearchEvent | WarningEvent | ModelChangeEvent | ModelDeselectedEvent | 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 | PermissionRecoveryEvent | 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 | PermissionAssentDetectedEvent | PermissionContextualAuthorizationEvent | 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 | WorkflowRunUpdatedEvent | WorkflowRunStartedEvent | WorkflowRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpServerRemovedEvent | McpServerNeedsReconnectEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
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
  */
@@ -298,7 +298,15 @@ export type ModelChangeSource =
298
298
  /** The user selected the promoted model from the changeboarding card or its keyboard shortcut. */
299
299
  | "changeboarding_shortcut"
300
300
  /** An SDK or RPC caller selected the model. */
301
- | "sdk";
301
+ | "sdk"
302
+ /** The user accepted a CAPI-issued Auto tier recommendation. */
303
+ | "auto_tier_recommendation";
304
+ /**
305
+ * Why the session no longer has an explicitly selected model.
306
+ */
307
+ export type ModelDeselectedReason =
308
+ /** A host-managed provider snapshot no longer publishes the selected model. */
309
+ "provider_withdrawn";
302
310
  /**
303
311
  * Auto preferences that Copilot API can recommend.
304
312
  */
@@ -877,7 +885,7 @@ export type SystemMessageRole =
877
885
  /**
878
886
  * Structured metadata identifying what triggered this notification
879
887
  */
880
- export type SystemNotification = SystemNotificationAgentCompleted | SystemNotificationAgentIdle | SystemNotificationNewInboxMessage | SystemNotificationShellCompleted | SystemNotificationShellDetachedCompleted | SystemNotificationInstructionDiscovered | SystemNotificationFactoryCompleted | SystemNotificationUnclassified;
888
+ export type SystemNotification = SystemNotificationAgentCompleted | SystemNotificationAgentIdle | SystemNotificationNewInboxMessage | SystemNotificationShellCompleted | SystemNotificationShellDetachedCompleted | SystemNotificationInstructionDiscovered | SystemNotificationWorkflowCompleted | SystemNotificationUnclassified;
881
889
  /**
882
890
  * Whether the agent completed successfully or failed
883
891
  */
@@ -887,11 +895,11 @@ export type SystemNotificationAgentCompletedStatus =
887
895
  /** The agent failed. */
888
896
  | "failed";
889
897
  /**
890
- * Durable metadata describing who initiated a factory pause.
898
+ * Durable metadata describing who initiated a workflow pause.
891
899
  */
892
- export type SystemNotificationFactoryPauseInfo = {
900
+ export type SystemNotificationWorkflowPauseInfo = {
893
901
  /**
894
- * Factory pause initiator discriminator.
902
+ * Workflow pause initiator discriminator.
895
903
  */
896
904
  type: "user";
897
905
  } | {
@@ -900,28 +908,28 @@ export type SystemNotificationFactoryPauseInfo = {
900
908
  */
901
909
  key: string;
902
910
  /**
903
- * Factory pause initiator discriminator.
911
+ * Workflow pause initiator discriminator.
904
912
  */
905
913
  type: "checkpoint";
906
914
  };
907
915
  /**
908
- * Terminal status reached by a factory execution attempt.
916
+ * Terminal status reached by a workflow execution attempt.
909
917
  */
910
- export type SystemNotificationFactoryCompletedStatus =
911
- /** The factory completed successfully. */
918
+ export type SystemNotificationWorkflowCompletedStatus =
919
+ /** The workflow completed successfully. */
912
920
  "completed"
913
- /** The factory was halted. */
921
+ /** The workflow was halted. */
914
922
  | "halted"
915
- /** The factory attempt paused intentionally. */
923
+ /** The workflow attempt paused intentionally. */
916
924
  | "paused"
917
- /** The factory was cancelled. */
925
+ /** The workflow was cancelled. */
918
926
  | "cancelled"
919
- /** The factory failed. */
927
+ /** The workflow failed. */
920
928
  | "error";
921
929
  /**
922
930
  * Details of the permission being requested
923
931
  */
924
- export type PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestFactory | PermissionRequestExtensionPermissionAccess | PermissionRequestExtensionEnvAccess;
932
+ export type PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestWorkflow | PermissionRequestExtensionPermissionAccess | PermissionRequestExtensionEnvAccess;
925
933
  /**
926
934
  * Advisory recommendation the runtime attaches to a permission request whose origin it can vouch for by construction. Unlike the auto-approval judge this does not depend on auto mode and does not evaluate what the tool call does; its absence simply means the runtime has no opinion and the request follows the host's normal approval flow.
927
935
  */
@@ -982,17 +990,17 @@ export type PermissionRequestMemoryScope =
982
990
  /** Store the memory for the current user. */
983
991
  | "user";
984
992
  /**
985
- * Operation gated by a factory permission request.
993
+ * Operation gated by a workflow permission request.
986
994
  */
987
- export type FactoryPermissionOperation =
988
- /** Running a registered factory, which spends subagents, active time, and AI credits under the approved limits. */
995
+ export type WorkflowPermissionOperation =
996
+ /** Running a registered workflow, which spends subagents, active time, and AI credits under the approved limits. */
989
997
  "run"
990
- /** Authoring a factory, which writes JavaScript into a session-scoped extension and loads it. */
998
+ /** Authoring a workflow, which writes JavaScript into a session-scoped extension and loads it. */
991
999
  | "author";
992
1000
  /**
993
1001
  * Derived user-facing permission prompt details for UI consumers
994
1002
  */
995
- export type PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestFactory | PermissionPromptRequestExtensionPermissionAccess | PermissionPromptRequestExtensionEnvAccess;
1003
+ export type PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestWorkflow | PermissionPromptRequestExtensionPermissionAccess | PermissionPromptRequestExtensionEnvAccess;
996
1004
  /**
997
1005
  * Underlying permission kind that needs path approval
998
1006
  */
@@ -1015,7 +1023,7 @@ export type PermissionDecisionSource =
1015
1023
  | "host_policy"
1016
1024
  /** The host denied the request because no interactive user response was available. */
1017
1025
  | "unattended_fallback"
1018
- /** 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. */
1026
+ /** Historical compatibility value for sessions created while authorization carry-forward was executable. Current runtimes do not produce this source. */
1019
1027
  | "authorization_carry_forward";
1020
1028
  /**
1021
1029
  * The result of the permission request
@@ -1024,15 +1032,15 @@ export type PermissionResult = PermissionApproved | PermissionApprovedForSession
1024
1032
  /**
1025
1033
  * The approval to add as a session-scoped rule
1026
1034
  */
1027
- export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalFactory | UserToolSessionApprovalExtensionPermissionAccess | UserToolSessionApprovalExtensionEnvAccess;
1035
+ export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalWorkflow | UserToolSessionApprovalExtensionPermissionAccess | UserToolSessionApprovalExtensionEnvAccess;
1028
1036
  /**
1029
- * Which direction a message-backed authorization claim moves authority in.
1037
+ * Direction stored in a historical extractor claim. Current runtimes do not apply it.
1030
1038
  */
1031
1039
  /** @experimental */
1032
1040
  export type PermissionMessageAuthorizationPolarity =
1033
- /** The human's words authorized an effect. */
1041
+ /** Historical claim recorded as a grant. */
1034
1042
  "grant"
1035
- /** The human's words refused an effect. */
1043
+ /** Historical claim recorded as a denial. */
1036
1044
  | "denial";
1037
1045
  /**
1038
1046
  * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent.
@@ -1200,10 +1208,10 @@ export type ExitPlanModeAction =
1200
1208
  /** Exit plan mode and continue with parallel autonomous workers. */
1201
1209
  | "autopilot_fleet";
1202
1210
  /**
1203
- * Terminal status a factory run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
1211
+ * Terminal status a workflow run committed. A settled run is never `pending` or `running`, so those two members of the run-status domain are deliberately absent.
1204
1212
  */
1205
- export type FactoryRunSettledStatus =
1206
- /** The factory body resolved and its result was committed. */
1213
+ export type WorkflowRunSettledStatus =
1214
+ /** The workflow body resolved and its result was committed. */
1207
1215
  "completed"
1208
1216
  /** The run was stopped by a limit, an approval refusal or another policy decision. */
1209
1217
  | "halted"
@@ -2102,6 +2110,46 @@ export interface ModelChangeData {
2102
2110
  source?: ModelChangeSource;
2103
2111
  verbosity?: Verbosity;
2104
2112
  }
2113
+ /**
2114
+ * Session event "session.model_deselected". The model the user had explicitly selected is no longer available, because the host that published it withdrew it, so the session no longer has an explicit selection. The next turn resolves a default as though the user had never chosen a model. Clients should stop presenting the previous model as selected. This event is durable because resume rebuilds the selected model from the event log; without it a resumed session would restore a model its provider no longer serves. Reasoning effort, verbosity, and other session-level preferences are deliberately unchanged, because they belong to the session rather than to the model.
2115
+ */
2116
+ export interface ModelDeselectedEvent {
2117
+ /**
2118
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
2119
+ */
2120
+ agentId?: string;
2121
+ data: ModelDeselectedData;
2122
+ /**
2123
+ * When true, the event is transient and not persisted to the session event log on disk
2124
+ */
2125
+ ephemeral?: boolean;
2126
+ /**
2127
+ * Unique event identifier (UUID v4), generated when the event is emitted
2128
+ */
2129
+ id: string;
2130
+ /**
2131
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
2132
+ */
2133
+ parentId: string | null;
2134
+ /**
2135
+ * ISO 8601 timestamp when the event was created
2136
+ */
2137
+ timestamp: string;
2138
+ /**
2139
+ * Type discriminator. Always "session.model_deselected".
2140
+ */
2141
+ type: "session.model_deselected";
2142
+ }
2143
+ /**
2144
+ * The model the user had explicitly selected is no longer available, because the host that published it withdrew it, so the session no longer has an explicit selection. The next turn resolves a default as though the user had never chosen a model. Clients should stop presenting the previous model as selected. This event is durable because resume rebuilds the selected model from the event log; without it a resumed session would restore a model its provider no longer serves. Reasoning effort, verbosity, and other session-level preferences are deliberately unchanged, because they belong to the session rather than to the model.
2145
+ */
2146
+ export interface ModelDeselectedData {
2147
+ /**
2148
+ * Model that was selected before the host withdrew it.
2149
+ */
2150
+ previousModel: string;
2151
+ reason: ModelDeselectedReason;
2152
+ }
2105
2153
  /**
2106
2154
  * Session event "session.auto_tier_recommendation". Live-only Auto preference recommendation from Copilot API after a successful Auto model call.
2107
2155
  */
@@ -2638,12 +2686,16 @@ export interface SnapshotRewindEvent {
2638
2686
  * Session rewind details including target event and count of removed events
2639
2687
  */
2640
2688
  export interface SnapshotRewindData {
2689
+ /**
2690
+ * The removed events, starting with `upToEventId`. Later events not listed were kept, such as a background agent's events that interleaved with a withdrawn turn
2691
+ */
2692
+ eventIds?: string[];
2641
2693
  /**
2642
2694
  * Number of events that were removed by the rewind
2643
2695
  */
2644
2696
  eventsRemoved: number;
2645
2697
  /**
2646
- * Event ID that was rewound to; this event and all after it were removed
2698
+ * First removed event. Without `eventIds`, it and every event after it were removed
2647
2699
  */
2648
2700
  upToEventId: string;
2649
2701
  }
@@ -3271,7 +3323,7 @@ export interface CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail {
3271
3323
  tokenType: string;
3272
3324
  }
3273
3325
  /**
3274
- * Original request-level and effective conversation reasoning effort for a Responses history boundary
3326
+ * Original request-level and effective conversation reasoning effort for a provider history boundary; the historical type name is retained for compatibility
3275
3327
  */
3276
3328
  export interface ResponsesReasoning {
3277
3329
  /**
@@ -3644,6 +3696,12 @@ export interface FusionResolvedData {
3644
3696
  * Version of the validated HydraFusion event contract.
3645
3697
  */
3646
3698
  contractVersion: number;
3699
+ /**
3700
+ * Planned Critique phase identities, including independent critics with repeated model IDs. May be absent in older events; consumers then use secondaryModel for the legacy critic.
3701
+ *
3702
+ * @experimental
3703
+ */
3704
+ critics?: FusionCritic[];
3647
3705
  /**
3648
3706
  * Concrete model used when the planned primary model cannot execute.
3649
3707
  */
@@ -3657,6 +3715,18 @@ export interface FusionResolvedData {
3657
3715
  * Stable identifier for the resolved HydraFusion turn.
3658
3716
  */
3659
3717
  fusionId: string;
3718
+ /**
3719
+ * Short human-readable summary of the selected workflow, suitable for immediate client display after routing. May be absent in older durable events; omit the explanation or derive one from pattern and phasePlan. Display text, not a stable machine-readable value.
3720
+ *
3721
+ * @experimental
3722
+ */
3723
+ hint?: string;
3724
+ /**
3725
+ * Concrete model selected for Cascade escalation-gate calls, when required.
3726
+ *
3727
+ * @experimental
3728
+ */
3729
+ judgeModel?: string;
3660
3730
  /**
3661
3731
  * Version of the executable model universe used for selection.
3662
3732
  */
@@ -3684,6 +3754,12 @@ export interface FusionResolvedData {
3684
3754
  * Concrete model selected for the primary solver phase.
3685
3755
  */
3686
3756
  primaryModel: string;
3757
+ /**
3758
+ * Concrete model selected for Cascade repair, when required.
3759
+ *
3760
+ * @experimental
3761
+ */
3762
+ repairModel?: string;
3687
3763
  /**
3688
3764
  * Router implementation that supplied the plan.
3689
3765
  */
@@ -3706,7 +3782,7 @@ export interface FusionResolvedData {
3706
3782
  ruleName?: string;
3707
3783
  scores?: FusionScores;
3708
3784
  /**
3709
- * Concrete model selected for the review or judge phase, when required.
3785
+ * Concrete model selected for Critique review, or the legacy Cascade judge/repair model when role-specific fields are absent.
3710
3786
  */
3711
3787
  secondaryModel: string | null;
3712
3788
  /**
@@ -3718,6 +3794,27 @@ export interface FusionResolvedData {
3718
3794
  */
3719
3795
  turnId: string;
3720
3796
  }
3797
+ /** @experimental */
3798
+ export interface FusionCritic {
3799
+ /**
3800
+ * Concrete model selected for this critic.
3801
+ *
3802
+ * @experimental
3803
+ */
3804
+ model: string;
3805
+ /**
3806
+ * Unique execution phase identifier for this critic.
3807
+ *
3808
+ * @experimental
3809
+ */
3810
+ phaseId: string;
3811
+ /**
3812
+ * Explicit reasoning effort selected for this critic, if supplied.
3813
+ *
3814
+ * @experimental
3815
+ */
3816
+ reasoningEffort?: string;
3817
+ }
3721
3818
  /**
3722
3819
  * Durable server recommendation for subsequent HydraFusion turns.
3723
3820
  */
@@ -4497,6 +4594,10 @@ export interface AssistantTurnStartData {
4497
4594
  * Model identifier used for this turn, when known
4498
4595
  */
4499
4596
  model?: string;
4597
+ /**
4598
+ * Parent task tool call ID when this turn belongs to a sub-agent
4599
+ */
4600
+ parentToolCallId?: string;
4500
4601
  /**
4501
4602
  * Identifier for this turn within the agentic loop, typically a stringified turn number
4502
4603
  */
@@ -4592,6 +4693,12 @@ export interface FusionPhaseStartedData {
4592
4693
  */
4593
4694
  phaseId: string;
4594
4695
  phaseKind: FusionPhaseKind;
4696
+ /**
4697
+ * Explicit reasoning effort selected for this phase, if supplied.
4698
+ *
4699
+ * @experimental
4700
+ */
4701
+ reasoningEffort?: string;
4595
4702
  /**
4596
4703
  * Semantic role assigned to the phase.
4597
4704
  */
@@ -4716,6 +4823,12 @@ export interface FusionPhaseCompletedData {
4716
4823
  */
4717
4824
  phaseId: string;
4718
4825
  phaseKind: FusionPhaseKind;
4826
+ /**
4827
+ * Explicit reasoning effort selected for this phase, if supplied.
4828
+ *
4829
+ * @experimental
4830
+ */
4831
+ reasoningEffort?: string;
4719
4832
  /**
4720
4833
  * Semantic role assigned to the completed phase.
4721
4834
  */
@@ -4823,6 +4936,12 @@ export interface FusionPhaseFailedData {
4823
4936
  * Stable machine-readable reason for the phase failure.
4824
4937
  */
4825
4938
  reason: string;
4939
+ /**
4940
+ * Explicit reasoning effort selected for this phase, if supplied.
4941
+ *
4942
+ * @experimental
4943
+ */
4944
+ reasoningEffort?: string;
4826
4945
  /**
4827
4946
  * Semantic role assigned to the failed phase.
4828
4947
  */
@@ -5333,6 +5452,10 @@ export interface FusionAttribution {
5333
5452
  * Stable identifier for the HydraFusion turn that produced the event.
5334
5453
  */
5335
5454
  fusionId: string;
5455
+ /**
5456
+ * Whether this model request consumed a user steering message rather than only internal Fusion work.
5457
+ */
5458
+ hasUserSteering?: boolean;
5336
5459
  /**
5337
5460
  * HydraFusion orchestration pattern selected for the turn.
5338
5461
  */
@@ -5582,6 +5705,10 @@ export interface AssistantTurnEndData {
5582
5705
  * Model identifier used for this turn, when known
5583
5706
  */
5584
5707
  model?: string;
5708
+ /**
5709
+ * Parent task tool call ID when this turn belongs to a sub-agent
5710
+ */
5711
+ parentToolCallId?: string;
5585
5712
  /**
5586
5713
  * Identifier of the turn that has ended, matching the corresponding assistant.turn_start event
5587
5714
  */
@@ -5915,6 +6042,10 @@ export interface ModelCallFailureData {
5915
6042
  * Model identifier used for the failed API call
5916
6043
  */
5917
6044
  model?: string;
6045
+ /**
6046
+ * Parent task tool call ID when this failed model call belongs to a sub-agent
6047
+ */
6048
+ parentToolCallId?: string;
5918
6049
  /**
5919
6050
  * GitHub request tracing ID (x-github-request-id header) for server-side log correlation
5920
6051
  */
@@ -6196,6 +6327,10 @@ export interface ToolExecutionStartData {
6196
6327
  * Name of the tool being executed
6197
6328
  */
6198
6329
  toolName: string;
6330
+ /**
6331
+ * Human-readable display title for the tool, when the selected tool descriptor has a non-empty title.
6332
+ */
6333
+ toolTitle?: string;
6199
6334
  /**
6200
6335
  * Identifier for the agent loop turn this tool was invoked in, matching the corresponding assistant.turn_start event
6201
6336
  */
@@ -7112,7 +7247,7 @@ export interface SubagentStartedData {
7112
7247
  */
7113
7248
  executionMode?: string;
7114
7249
  /**
7115
- * Root id of the factory run that spawned this sub-agent, when it was spawned by one.
7250
+ * Legacy root id of the workflow run that spawned this sub-agent. New consumers should use workflowRunId.
7116
7251
  */
7117
7252
  factoryRunId?: string;
7118
7253
  /**
@@ -7133,6 +7268,10 @@ export interface SubagentStartedData {
7133
7268
  * Tool call ID of the parent tool invocation that spawned this sub-agent
7134
7269
  */
7135
7270
  toolCallId: string;
7271
+ /**
7272
+ * Root id of the workflow run that spawned this sub-agent, when it was spawned by one.
7273
+ */
7274
+ workflowRunId?: string;
7136
7275
  }
7137
7276
  /**
7138
7277
  * Session event "subagent.configured". Resolved runtime configuration for a configured sub-agent
@@ -7719,6 +7858,10 @@ export interface SystemMessageData {
7719
7858
  * The system or developer prompt text sent as model input
7720
7859
  */
7721
7860
  content: string;
7861
+ /**
7862
+ * Optional ordered structured blocks corresponding to content, retained for prompt-cache layout restoration.
7863
+ */
7864
+ contentBlocks?: SystemMessageContentBlock[];
7722
7865
  /**
7723
7866
  * Logical interaction identifier for the model run receiving this prompt
7724
7867
  */
@@ -7730,12 +7873,29 @@ export interface SystemMessageData {
7730
7873
  name?: string;
7731
7874
  role: SystemMessageRole;
7732
7875
  }
7876
+ /**
7877
+ * One persisted structured system-message block and its cache intent
7878
+ */
7879
+ export interface SystemMessageContentBlock {
7880
+ /**
7881
+ * Explicit prompt-cache intent. True places a breakpoint after this block, false suppresses one, and absence preserves the provider's legacy default.
7882
+ */
7883
+ cacheBreakpoint?: boolean;
7884
+ /**
7885
+ * Text content for this system-message block.
7886
+ */
7887
+ content: string;
7888
+ /**
7889
+ * Diagnostic classification indicating whether the block is stable across equivalent sessions.
7890
+ */
7891
+ isStatic?: boolean;
7892
+ }
7733
7893
  /**
7734
7894
  * Metadata about the prompt template and its construction
7735
7895
  */
7736
7896
  export interface SystemMessageMetadata {
7737
7897
  /**
7738
- * Version identifier of the prompt template used
7898
+ * Version identifier of the prompt template or structured prompt layout used
7739
7899
  */
7740
7900
  promptVersion?: string;
7741
7901
  /**
@@ -7930,9 +8090,9 @@ export interface SystemNotificationInstructionDiscovered {
7930
8090
  type: "instruction_discovered";
7931
8091
  }
7932
8092
  /**
7933
- * System notification metadata for a factory execution attempt that reached a terminal state.
8093
+ * System notification metadata for a workflow execution attempt that reached a terminal state.
7934
8094
  */
7935
- export interface SystemNotificationFactoryCompleted {
8095
+ export interface SystemNotificationWorkflowCompleted {
7936
8096
  /**
7937
8097
  * Execution attempt that reached this terminal state.
7938
8098
  */
@@ -7949,32 +8109,32 @@ export interface SystemNotificationFactoryCompleted {
7949
8109
  * Accumulated active execution time in milliseconds.
7950
8110
  */
7951
8111
  elapsedMs: number;
7952
- /**
7953
- * Persisted factory name.
7954
- */
7955
- factoryName: string;
7956
8112
  /**
7957
8113
  * Machine-readable terminal failure details, when present.
7958
8114
  */
7959
8115
  failure?: JsonValue;
7960
- pauseInfo?: SystemNotificationFactoryPauseInfo;
8116
+ pauseInfo?: SystemNotificationWorkflowPauseInfo;
7961
8117
  /**
7962
8118
  * Bounded prompt-safe preview of the completed result.
7963
8119
  */
7964
8120
  resultPreview?: string;
7965
8121
  /**
7966
- * Actionable run_factory resume guidance for a resource-limit failure.
8122
+ * Actionable run_dynamic_workflow resume guidance for a resource-limit failure.
7967
8123
  */
7968
8124
  retryGuidance?: string;
7969
8125
  /**
7970
- * Factory run identifier.
8126
+ * Workflow run identifier.
7971
8127
  */
7972
8128
  runId: string;
7973
- status: SystemNotificationFactoryCompletedStatus;
8129
+ status: SystemNotificationWorkflowCompletedStatus;
8130
+ /**
8131
+ * Type discriminator. Always "workflow_completed".
8132
+ */
8133
+ type: "workflow_completed";
7974
8134
  /**
7975
- * Type discriminator. Always "factory_completed".
8135
+ * Persisted workflow name.
7976
8136
  */
7977
- type: "factory_completed";
8137
+ workflowName: string;
7978
8138
  }
7979
8139
  /**
7980
8140
  * System notification metadata from an external host that does not match a runtime-owned notification kind.
@@ -8548,41 +8708,45 @@ export interface PermissionRequestExtensionManagement {
8548
8708
  toolCallId?: string;
8549
8709
  }
8550
8710
  /**
8551
- * Factory run or authoring permission request
8711
+ * Workflow run or authoring permission request
8552
8712
  */
8553
- export interface PermissionRequestFactory {
8713
+ export interface PermissionRequestWorkflow {
8554
8714
  /**
8555
- * Canonical key used for scoped factory approvals
8715
+ * Canonical key used for scoped workflow approvals
8556
8716
  */
8557
8717
  approvalKey: string;
8558
8718
  /**
8559
- * Whether this factory is eligible for persistent approval
8719
+ * Whether this workflow is eligible for persistent approval
8560
8720
  */
8561
8721
  canPersistApproval: boolean;
8562
8722
  /**
8563
- * Factory-declared AI-credit limit before any run/resume caller override is applied.
8723
+ * Workflow-declared AI-credit limit before any run/resume caller override is applied.
8564
8724
  */
8565
8725
  declaredMaxAiCredits?: number;
8566
8726
  /**
8567
- * Factory-declared concurrent-subagent limit before any run/resume caller override is applied.
8727
+ * Workflow-declared concurrent-subagent limit before any run/resume caller override is applied.
8568
8728
  */
8569
8729
  declaredMaxConcurrentSubagents?: number;
8570
8730
  /**
8571
- * Factory-declared total-subagent limit before any run/resume caller override is applied.
8731
+ * Workflow-declared total-subagent limit before any run/resume caller override is applied.
8572
8732
  */
8573
8733
  declaredMaxTotalSubagents?: number;
8574
8734
  /**
8575
- * Factory-declared active-time limit in seconds before any run/resume caller override is applied.
8735
+ * Workflow-declared active-time limit in seconds before any run/resume caller override is applied.
8576
8736
  */
8577
8737
  declaredTimeoutSeconds?: number;
8578
8738
  /**
8579
- * Factory description
8739
+ * Workflow description
8580
8740
  */
8581
8741
  description: string;
8582
8742
  /**
8583
8743
  * Permission kind discriminator
8584
8744
  */
8585
- kind: "factory";
8745
+ kind: "workflow";
8746
+ /**
8747
+ * Whether managed policy requires a human response and forbids host auto-approval
8748
+ */
8749
+ managedApprovalRequired?: boolean;
8586
8750
  /**
8587
8751
  * Effective AI-credit limit; omitted means unlimited
8588
8752
  */
@@ -8596,14 +8760,14 @@ export interface PermissionRequestFactory {
8596
8760
  */
8597
8761
  maxTotalSubagents?: number;
8598
8762
  /**
8599
- * Factory name
8763
+ * Workflow name
8600
8764
  */
8601
8765
  name: string;
8602
- operation: FactoryPermissionOperation;
8766
+ operation: WorkflowPermissionOperation;
8603
8767
  /**
8604
- * Declared factory phases
8768
+ * Declared workflow phases
8605
8769
  */
8606
- phases: FactoryPermissionPhase[];
8770
+ phases: WorkflowPermissionPhase[];
8607
8771
  /**
8608
8772
  * Effective active-time limit in seconds; omitted means unlimited
8609
8773
  */
@@ -8614,9 +8778,9 @@ export interface PermissionRequestFactory {
8614
8778
  toolCallId?: string;
8615
8779
  }
8616
8780
  /**
8617
- * A declared phase shown in a factory permission prompt.
8781
+ * A declared phase shown in a workflow permission prompt.
8618
8782
  */
8619
- export interface FactoryPermissionPhase {
8783
+ export interface WorkflowPermissionPhase {
8620
8784
  /**
8621
8785
  * Optional phase detail
8622
8786
  */
@@ -9050,11 +9214,11 @@ export interface PermissionPromptRequestExtensionManagement {
9050
9214
  toolCallId?: string;
9051
9215
  }
9052
9216
  /**
9053
- * Factory run or authoring permission prompt
9217
+ * Workflow run or authoring permission prompt
9054
9218
  */
9055
- export interface PermissionPromptRequestFactory {
9219
+ export interface PermissionPromptRequestWorkflow {
9056
9220
  /**
9057
- * Canonical key used for scoped factory approvals
9221
+ * Canonical key used for scoped workflow approvals
9058
9222
  */
9059
9223
  approvalKey: string;
9060
9224
  /**
@@ -9064,33 +9228,33 @@ export interface PermissionPromptRequestFactory {
9064
9228
  */
9065
9229
  assistedApproval?: PermissionAssistedApproval;
9066
9230
  /**
9067
- * Whether this factory is eligible for persistent approval
9231
+ * Whether this workflow is eligible for persistent approval
9068
9232
  */
9069
9233
  canPersistApproval: boolean;
9070
9234
  /**
9071
- * Factory-declared AI-credit limit before any run/resume caller override is applied.
9235
+ * Workflow-declared AI-credit limit before any run/resume caller override is applied.
9072
9236
  */
9073
9237
  declaredMaxAiCredits?: number;
9074
9238
  /**
9075
- * Factory-declared concurrent-subagent limit before any run/resume caller override is applied.
9239
+ * Workflow-declared concurrent-subagent limit before any run/resume caller override is applied.
9076
9240
  */
9077
9241
  declaredMaxConcurrentSubagents?: number;
9078
9242
  /**
9079
- * Factory-declared total-subagent limit before any run/resume caller override is applied.
9243
+ * Workflow-declared total-subagent limit before any run/resume caller override is applied.
9080
9244
  */
9081
9245
  declaredMaxTotalSubagents?: number;
9082
9246
  /**
9083
- * Factory-declared active-time limit in seconds before any run/resume caller override is applied.
9247
+ * Workflow-declared active-time limit in seconds before any run/resume caller override is applied.
9084
9248
  */
9085
9249
  declaredTimeoutSeconds?: number;
9086
9250
  /**
9087
- * Factory description
9251
+ * Workflow description
9088
9252
  */
9089
9253
  description: string;
9090
9254
  /**
9091
9255
  * Prompt kind discriminator
9092
9256
  */
9093
- kind: "factory";
9257
+ kind: "workflow";
9094
9258
  /**
9095
9259
  * Whether managed policy requires a human response and forbids host auto-approval
9096
9260
  */
@@ -9108,14 +9272,14 @@ export interface PermissionPromptRequestFactory {
9108
9272
  */
9109
9273
  maxTotalSubagents?: number;
9110
9274
  /**
9111
- * Factory name
9275
+ * Workflow name
9112
9276
  */
9113
9277
  name: string;
9114
- operation: FactoryPermissionOperation;
9278
+ operation: WorkflowPermissionOperation;
9115
9279
  /**
9116
- * Declared factory phases
9280
+ * Declared workflow phases
9117
9281
  */
9118
- phases: FactoryPermissionPhase[];
9282
+ phases: WorkflowPermissionPhase[];
9119
9283
  /**
9120
9284
  * Effective active-time limit in seconds; omitted means unlimited
9121
9285
  */
@@ -9347,17 +9511,17 @@ export interface UserToolSessionApprovalExtensionManagement {
9347
9511
  operation?: string;
9348
9512
  }
9349
9513
  /**
9350
- * Session-scoped factory approval, optionally narrowed by approval key.
9514
+ * Session-scoped workflow approval, optionally narrowed by approval key.
9351
9515
  */
9352
- export interface UserToolSessionApprovalFactory {
9516
+ export interface UserToolSessionApprovalWorkflow {
9353
9517
  /**
9354
- * Optional factory operation name or canonical approval key
9518
+ * Optional workflow operation name or canonical approval key
9355
9519
  */
9356
9520
  approvalKey?: string;
9357
9521
  /**
9358
- * Factory approval kind
9522
+ * Workflow approval kind
9359
9523
  */
9360
- kind: "factory";
9524
+ kind: "workflow";
9361
9525
  }
9362
9526
  /**
9363
9527
  * Session-scoped tool-approval rule for an extension's permission-gated capability access, keyed by extension name.
@@ -9509,7 +9673,7 @@ export interface PermissionDeniedByPermissionRequestHook {
9509
9673
  message?: string;
9510
9674
  }
9511
9675
  /**
9512
- * 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.
9676
+ * Session event "permission.carriedForward". Historical decode-only receipt from the retired Assisted Permissions authorization extractor. Current runtimes ignore it for permission decisions.
9513
9677
  */
9514
9678
  /** @experimental */
9515
9679
  export interface PermissionCarriedForwardEvent {
@@ -9540,7 +9704,7 @@ export interface PermissionCarriedForwardEvent {
9540
9704
  type: "permission.carriedForward";
9541
9705
  }
9542
9706
  /**
9543
- * 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.
9707
+ * Historical decode-only receipt from the retired Assisted Permissions authorization extractor. Current runtimes ignore it for permission decisions.
9544
9708
  */
9545
9709
  /** @experimental */
9546
9710
  export interface PermissionCarriedForwardData {
@@ -9570,7 +9734,7 @@ export interface PermissionCarriedForwardData {
9570
9734
  toolCallId: string;
9571
9735
  }
9572
9736
  /**
9573
- * 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.
9737
+ * Session event "permission.messageAuthorization". Historical decode-only claim from the retired Assisted Permissions authorization extractor. Current runtimes preserve the payload but do not establish authority from it.
9574
9738
  */
9575
9739
  /** @experimental */
9576
9740
  export interface PermissionMessageAuthorizationEvent {
@@ -9601,7 +9765,7 @@ export interface PermissionMessageAuthorizationEvent {
9601
9765
  type: "permission.messageAuthorization";
9602
9766
  }
9603
9767
  /**
9604
- * 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.
9768
+ * Historical decode-only claim from the retired Assisted Permissions authorization extractor. Current runtimes preserve the payload but do not establish authority from it.
9605
9769
  */
9606
9770
  /** @experimental */
9607
9771
  export interface PermissionMessageAuthorizationData {
@@ -9661,7 +9825,7 @@ export interface PermissionMessageAuthorizationData {
9661
9825
  world?: JsonValue;
9662
9826
  }
9663
9827
  /**
9664
- * 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. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
9828
+ * Session event "permission.messageAuthorizationRead". Historical decode-only extractor progress marker. Current runtimes do not run or resume extraction from it.
9665
9829
  */
9666
9830
  /** @experimental */
9667
9831
  export interface PermissionMessageAuthorizationReadEvent {
@@ -9692,7 +9856,7 @@ export interface PermissionMessageAuthorizationReadEvent {
9692
9856
  type: "permission.messageAuthorizationRead";
9693
9857
  }
9694
9858
  /**
9695
- * 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. Also records whether that pass activates ongoing extraction; contextual-assent-only passes do not, so unrelated future messages remain outside extraction.
9859
+ * Historical decode-only extractor progress marker. Current runtimes do not run or resume extraction from it.
9696
9860
  */
9697
9861
  /** @experimental */
9698
9862
  export interface PermissionMessageAuthorizationReadData {
@@ -9710,7 +9874,7 @@ export interface PermissionMessageAuthorizationReadData {
9710
9874
  turnIndex: number;
9711
9875
  }
9712
9876
  /**
9713
- * 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.
9877
+ * Session event "permission.messageAuthorizationDegraded". Historical decode-only degradation marker from the retired extractor. Current runtimes ignore it for permission decisions.
9714
9878
  */
9715
9879
  /** @experimental */
9716
9880
  export interface PermissionMessageAuthorizationDegradedEvent {
@@ -9741,7 +9905,7 @@ export interface PermissionMessageAuthorizationDegradedEvent {
9741
9905
  type: "permission.messageAuthorizationDegraded";
9742
9906
  }
9743
9907
  /**
9744
- * 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.
9908
+ * Historical decode-only degradation marker from the retired extractor. Current runtimes ignore it for permission decisions.
9745
9909
  */
9746
9910
  /** @experimental */
9747
9911
  export interface PermissionMessageAuthorizationDegradedData {
@@ -9753,7 +9917,7 @@ export interface PermissionMessageAuthorizationDegradedData {
9753
9917
  turnIndex: number;
9754
9918
  }
9755
9919
  /**
9756
- * Session event "permission.assentDetected". Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
9920
+ * Session event "permission.assentDetected". Historical decode-only contextual-assent marker. Current runtimes do not project it into the conversation or permission flow.
9757
9921
  */
9758
9922
  /** @experimental */
9759
9923
  export interface PermissionAssentDetectedEvent {
@@ -9784,7 +9948,7 @@ export interface PermissionAssentDetectedEvent {
9784
9948
  type: "permission.assentDetected";
9785
9949
  }
9786
9950
  /**
9787
- * Records that deterministic text recognition found likely assent in the human turn immediately following a root Autopilot permission request that was blocked because no interactive response was available. This event grants no authority; its model-facing projection only suggests retrying the unchanged operation.
9951
+ * Historical decode-only contextual-assent marker. Current runtimes do not project it into the conversation or permission flow.
9788
9952
  */
9789
9953
  /** @experimental */
9790
9954
  export interface PermissionAssentDetectedData {
@@ -9802,7 +9966,7 @@ export interface PermissionAssentDetectedData {
9802
9966
  turnIndex: number;
9803
9967
  }
9804
9968
  /**
9805
- * Session event "permission.contextualAuthorization". Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
9969
+ * Session event "permission.contextualAuthorization". Historical decode-only contextual authorization claim. Current runtimes preserve the payload but do not establish authority from it.
9806
9970
  */
9807
9971
  /** @experimental */
9808
9972
  export interface PermissionContextualAuthorizationEvent {
@@ -9833,7 +9997,7 @@ export interface PermissionContextualAuthorizationEvent {
9833
9997
  type: "permission.contextualAuthorization";
9834
9998
  }
9835
9999
  /**
9836
- * Freezes a blinded contextual authorization proposal whose verbatim human span was deterministically bound to the immediately preceding blocked permission request. The event carries no action fields; replay re-derives the exact action from the earlier permission request and mints a one-shot message grant only when the binding and span still verify.
10000
+ * Historical decode-only contextual authorization claim. Current runtimes preserve the payload but do not establish authority from it.
9837
10001
  */
9838
10002
  /** @experimental */
9839
10003
  export interface PermissionContextualAuthorizationData {
@@ -10289,6 +10453,10 @@ export interface McpOauthRequiredStaticClientConfig {
10289
10453
  * Whether this is a public OAuth client
10290
10454
  */
10291
10455
  publicClient?: boolean;
10456
+ /**
10457
+ * Configured OAuth scope string used when the server challenge omits scope or provides an empty scope
10458
+ */
10459
+ scope?: string;
10292
10460
  }
10293
10461
  /**
10294
10462
  * OAuth WWW-Authenticate parameters parsed from an MCP auth challenge
@@ -11488,15 +11656,15 @@ export interface BackgroundTasksChangedEvent {
11488
11656
  export interface BackgroundTasksChangedData {
11489
11657
  }
11490
11658
  /**
11491
- * Session event "factory.run_updated". Ephemeral invalidation signal for a changed factory run.
11659
+ * Session event "workflow.run_updated". Ephemeral invalidation signal for a changed workflow run.
11492
11660
  */
11493
11661
  /** @experimental */
11494
- export interface FactoryRunUpdatedEvent {
11662
+ export interface WorkflowRunUpdatedEvent {
11495
11663
  /**
11496
11664
  * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
11497
11665
  */
11498
11666
  agentId?: string;
11499
- data: FactoryRunUpdatedData;
11667
+ data: WorkflowRunUpdatedData;
11500
11668
  /**
11501
11669
  * Always true for events that are transient and not persisted to the session event log on disk.
11502
11670
  */
@@ -11514,34 +11682,34 @@ export interface FactoryRunUpdatedEvent {
11514
11682
  */
11515
11683
  timestamp: string;
11516
11684
  /**
11517
- * Type discriminator. Always "factory.run_updated".
11685
+ * Type discriminator. Always "workflow.run_updated".
11518
11686
  */
11519
- type: "factory.run_updated";
11687
+ type: "workflow.run_updated";
11520
11688
  }
11521
11689
  /**
11522
- * Ephemeral invalidation signal for a changed factory run.
11690
+ * Ephemeral invalidation signal for a changed workflow run.
11523
11691
  */
11524
11692
  /** @experimental */
11525
- export interface FactoryRunUpdatedData {
11693
+ export interface WorkflowRunUpdatedData {
11526
11694
  /**
11527
11695
  * Monotonic revision now available for the run.
11528
11696
  */
11529
11697
  revision: number;
11530
11698
  /**
11531
- * Factory run identifier.
11699
+ * Workflow run identifier.
11532
11700
  */
11533
11701
  runId: string;
11534
11702
  }
11535
11703
  /**
11536
- * Session event "factory.run_started". Ephemeral signal that a factory run attempt began executing.
11704
+ * Session event "workflow.run_started". Ephemeral signal that a workflow run attempt began executing.
11537
11705
  */
11538
11706
  /** @experimental */
11539
- export interface FactoryRunStartedEvent {
11707
+ export interface WorkflowRunStartedEvent {
11540
11708
  /**
11541
11709
  * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
11542
11710
  */
11543
11711
  agentId?: string;
11544
- data: FactoryRunStartedData;
11712
+ data: WorkflowRunStartedData;
11545
11713
  /**
11546
11714
  * Always true for events that are transient and not persisted to the session event log on disk.
11547
11715
  */
@@ -11559,38 +11727,38 @@ export interface FactoryRunStartedEvent {
11559
11727
  */
11560
11728
  timestamp: string;
11561
11729
  /**
11562
- * Type discriminator. Always "factory.run_started".
11730
+ * Type discriminator. Always "workflow.run_started".
11563
11731
  */
11564
- type: "factory.run_started";
11732
+ type: "workflow.run_started";
11565
11733
  }
11566
11734
  /**
11567
- * Ephemeral signal that a factory run attempt began executing.
11735
+ * Ephemeral signal that a workflow run attempt began executing.
11568
11736
  */
11569
11737
  /** @experimental */
11570
- export interface FactoryRunStartedData {
11738
+ export interface WorkflowRunStartedData {
11571
11739
  /**
11572
11740
  * Attempt number this start committed; a resumed run increments it.
11573
11741
  */
11574
11742
  attempt: number;
11575
11743
  /**
11576
- * Name of the factory this run executes. Low cardinality by construction.
11744
+ * Identifier of the workflow run that started.
11577
11745
  */
11578
- factoryName: string;
11746
+ runId: string;
11579
11747
  /**
11580
- * Identifier of the factory run that started.
11748
+ * Name of the workflow this run executes. Low cardinality by construction.
11581
11749
  */
11582
- runId: string;
11750
+ workflowName: string;
11583
11751
  }
11584
11752
  /**
11585
- * Session event "factory.run_settled". Ephemeral signal that a factory run reached a terminal status.
11753
+ * Session event "workflow.run_settled". Ephemeral signal that a workflow run reached a terminal status.
11586
11754
  */
11587
11755
  /** @experimental */
11588
- export interface FactoryRunSettledEvent {
11756
+ export interface WorkflowRunSettledEvent {
11589
11757
  /**
11590
11758
  * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
11591
11759
  */
11592
11760
  agentId?: string;
11593
- data: FactoryRunSettledData;
11761
+ data: WorkflowRunSettledData;
11594
11762
  /**
11595
11763
  * Always true for events that are transient and not persisted to the session event log on disk.
11596
11764
  */
@@ -11608,15 +11776,15 @@ export interface FactoryRunSettledEvent {
11608
11776
  */
11609
11777
  timestamp: string;
11610
11778
  /**
11611
- * Type discriminator. Always "factory.run_settled".
11779
+ * Type discriminator. Always "workflow.run_settled".
11612
11780
  */
11613
- type: "factory.run_settled";
11781
+ type: "workflow.run_settled";
11614
11782
  }
11615
11783
  /**
11616
- * Ephemeral signal that a factory run reached a terminal status.
11784
+ * Ephemeral signal that a workflow run reached a terminal status.
11617
11785
  */
11618
11786
  /** @experimental */
11619
- export interface FactoryRunSettledData {
11787
+ export interface WorkflowRunSettledData {
11620
11788
  /**
11621
11789
  * AI credits this run consumed, in nano-AIU.
11622
11790
  */
@@ -11630,14 +11798,14 @@ export interface FactoryRunSettledData {
11630
11798
  */
11631
11799
  elapsedMs: number;
11632
11800
  /**
11633
- * Typed failure class recorded on the run, when it failed with one (e.g. `factory_limit_reached`).
11801
+ * Typed failure class recorded on the run, when it failed with one (e.g. `workflow_limit_reached`).
11634
11802
  */
11635
11803
  failureType?: string;
11636
11804
  /**
11637
- * Identifier of the factory run that settled.
11805
+ * Identifier of the workflow run that settled.
11638
11806
  */
11639
11807
  runId: string;
11640
- status: FactoryRunSettledStatus;
11808
+ status: WorkflowRunSettledStatus;
11641
11809
  }
11642
11810
  /**
11643
11811
  * Session event "session.skills_loaded". Payload of `session.skills_loaded` listing resolved skill metadata.