@github/copilot-sdk 1.0.13-preview.3 → 1.0.13-preview.6

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 | WarningEvent | ModelChangeEvent | ModeChangedEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
12
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | ScheduleRearmedEvent | AutopilotObjectiveChangedEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | ModeNoticeDeliveredEvent | SessionLimitsChangedEvent | PermissionsChangedEvent | PlanChangedEvent | TodosChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | UsageCheckpointEvent | ContextChangedEvent | UsageInfoEvent | ContextClearedEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | CompletionReceiptEvent | FusionRouteStartedEvent | FusionRouteFailedEvent | FusionResolvedEvent | FusionCompletedEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantFusionPhaseStartedEvent | AssistantFusionPhaseActivityEvent | AssistantFusionPhaseCompletedEvent | AssistantFusionPhaseFailedEvent | AssistantServerToolProgressEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantToolCallDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantIdleEvent | AssistantUsageEvent | ModelCallFailureEvent | ModelCallFinishedEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | ToolSearchActivatedEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentConfiguredEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | HookProgressEvent | BinaryAssetEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | McpHeadersRefreshRequiredEvent | McpHeadersRefreshCompletedEvent | CustomNotificationEvent | UIEphemeralQueryEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | SessionLimitsExhaustedRequestedEvent | SessionLimitsExhaustedCompletedEvent | AutoModeResolvedEvent | ManagedSettingsResolvedEvent | ManagedSettingsEnforcedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | FactoryRunUpdatedEvent | FactoryRunStartedEvent | FactoryRunSettledEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | McpToolsListChangedEvent | McpResourcesListChangedEvent | McpPromptsListChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | CanvasClosedEvent | CanvasUnavailableEvent | CanvasRecordedEvent | CanvasRemovedEvent | ExtensionsAttachmentsPushedEvent | McpAppToolCallCompleteEvent;
13
13
  /**
14
14
  * Routing preference used when the session model is `auto`.
15
15
  */
@@ -191,6 +191,30 @@ export type TaskCompletionOutcome =
191
191
  | "continue"
192
192
  /** Completion cannot proceed without intervention; the active objective is paused when one is identified. */
193
193
  | "blocked";
194
+ /**
195
+ * Structured terminal status from a tool completion event.
196
+ */
197
+ export type CompletionReceiptToolStatus =
198
+ /** The tool completed successfully. */
199
+ "success"
200
+ /** The tool failed without a more specific structured status. */
201
+ | "failure"
202
+ /** The tool exceeded its time budget. */
203
+ | "timeout"
204
+ /** The user rejected the tool call. */
205
+ | "rejected"
206
+ /** The permissions service denied the tool call. */
207
+ | "denied";
208
+ /**
209
+ * Runtime reason the completion decision was accepted.
210
+ */
211
+ export type CompletionReceiptStopReason =
212
+ /** The model reached a natural terminal response. */
213
+ "natural"
214
+ /** A terminal tool ended the interaction. */
215
+ | "terminal_tool"
216
+ /** The configured agentStop continuation limit was reached. */
217
+ | "agent_stop_block_limit";
194
218
  /**
195
219
  * Kind of turn for which HydraFusion routing is running.
196
220
  */
@@ -220,6 +244,34 @@ export type FusionPattern =
220
244
  | "cascade"
221
245
  /** Run a primary draft, a read-only critique, and a revision. */
222
246
  | "critique";
247
+ /**
248
+ * HydraFusion phase kind.
249
+ */
250
+ /** @experimental */
251
+ export type FusionPhaseKind =
252
+ /** Primary solver phase. */
253
+ "primary"
254
+ /** Read-only cascade judge phase. */
255
+ | "judge"
256
+ /** Cascade repair phase. */
257
+ | "repair"
258
+ /** Initial critique-pattern draft phase. */
259
+ | "draft"
260
+ /** Read-only critique phase. */
261
+ | "critic"
262
+ /** Critique-pattern revision phase. */
263
+ | "revision"
264
+ /** Follow-up phase continuing from the resolved model. */
265
+ | "follow_up";
266
+ /**
267
+ * Conversation scope in which a HydraFusion phase executes.
268
+ */
269
+ /** @experimental */
270
+ export type FusionConversationScope =
271
+ /** Canonical root conversation history. */
272
+ "root"
273
+ /** Isolated read-only review history that does not enter the root conversation. */
274
+ | "review";
223
275
  /**
224
276
  * The agent mode that was active when this message was sent
225
277
  */
@@ -265,33 +317,16 @@ export type UserMessageDelivery =
265
317
  /** Enqueued while the agent was busy; processed as its own run afterward. */
266
318
  | "queued";
267
319
  /**
268
- * Conversation scope in which a HydraFusion phase executes.
269
- */
270
- /** @experimental */
271
- export type FusionConversationScope =
272
- /** Canonical root conversation history. */
273
- "root"
274
- /** Isolated read-only review history that does not enter the root conversation. */
275
- | "review";
276
- /**
277
- * HydraFusion phase kind.
320
+ * Content-safe activity observed while a HydraFusion phase is running.
278
321
  */
279
322
  /** @experimental */
280
- export type FusionPhaseKind =
281
- /** Primary solver phase. */
282
- "primary"
283
- /** Read-only cascade judge phase. */
284
- | "judge"
285
- /** Cascade repair phase. */
286
- | "repair"
287
- /** Initial critique-pattern draft phase. */
288
- | "draft"
289
- /** Read-only critique phase. */
290
- | "critic"
291
- /** Critique-pattern revision phase. */
292
- | "revision"
293
- /** Follow-up phase continuing from the resolved model. */
294
- | "follow_up";
323
+ export type FusionPhaseActivityKind =
324
+ /** The provider produced additional private output bytes. */
325
+ "model_output"
326
+ /** A tool began executing inside the phase. */
327
+ | "tool_started"
328
+ /** A tool finished executing inside the phase. */
329
+ | "tool_completed";
295
330
  /**
296
331
  * Durable outcome status of a HydraFusion phase.
297
332
  */
@@ -736,7 +771,9 @@ export type ManagedSettingsResolvedSource =
736
771
  | "device"
737
772
  /** Only session-local SDK-host injection contributed. */
738
773
  | "client"
739
- /** More than one channel contributed. Ordinary keys resolve device over server per key, while permissions compose restrictively across all present layers. */
774
+ /** A policy helper registered by device or server policy contributed. Device registration takes priority when present. */
775
+ | "policyHelper"
776
+ /** More than one channel contributed. Ordinary keys resolve device over server over policy helper per key, while permissions compose restrictively across all present layers. */
740
777
  | "mixed"
741
778
  /** No managed policy is in force (no channel contributed). */
742
779
  | "none";
@@ -787,7 +824,7 @@ export type FactoryRunSettledStatus =
787
824
  /** The run failed, with `failureType` carrying the class when it has one. */
788
825
  | "error";
789
826
  /**
790
- * Source location type (e.g., project, personal-copilot, plugin, builtin)
827
+ * Source location type (e.g., project, personal-copilot, plugin, builtin, sdk)
791
828
  */
792
829
  export type SkillSource =
793
830
  /** Skill defined in the current project's skill directories. */
@@ -803,7 +840,17 @@ export type SkillSource =
803
840
  /** Skill loaded from a configured custom skill directory. */
804
841
  | "custom"
805
842
  /** Skill bundled with the runtime. */
806
- | "builtin";
843
+ | "builtin"
844
+ /** Pathless skill supplied lazily by an SDK skill provider. */
845
+ | "sdk";
846
+ /**
847
+ * Whether configured models are advisory preferences or required constraints
848
+ */
849
+ export type AgentModelPolicy =
850
+ /** Treat the authored models as advisory preferences that callers may override. */
851
+ "preferred"
852
+ /** Require subagent execution to use one of the authored models. */
853
+ | "required";
807
854
  /**
808
855
  * Configuration source: user, workspace, plugin, or builtin
809
856
  */
@@ -1689,6 +1736,46 @@ export interface ModeChangedData {
1689
1736
  newMode: SessionMode;
1690
1737
  previousMode: SessionMode;
1691
1738
  }
1739
+ /**
1740
+ * Session event "session.mode_notice_delivered". Records that a mode transition notice reached the model so cache-stable mode tools can remain offered across resume.
1741
+ */
1742
+ export interface ModeNoticeDeliveredEvent {
1743
+ /**
1744
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
1745
+ */
1746
+ agentId?: string;
1747
+ data: ModeNoticeDeliveredData;
1748
+ /**
1749
+ * When true, the event is transient and not persisted to the session event log on disk
1750
+ */
1751
+ ephemeral?: boolean;
1752
+ /**
1753
+ * Unique event identifier (UUID v4), generated when the event is emitted
1754
+ */
1755
+ id: string;
1756
+ /**
1757
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
1758
+ */
1759
+ parentId: string | null;
1760
+ /**
1761
+ * ISO 8601 timestamp when the event was created
1762
+ */
1763
+ timestamp: string;
1764
+ /**
1765
+ * Type discriminator. Always "session.mode_notice_delivered".
1766
+ */
1767
+ type: "session.mode_notice_delivered";
1768
+ }
1769
+ /**
1770
+ * Records that a mode transition notice reached the model so cache-stable mode tools can remain offered across resume.
1771
+ */
1772
+ export interface ModeNoticeDeliveredData {
1773
+ /**
1774
+ * Model-visible transition notice persisted for a mid-turn delivery
1775
+ */
1776
+ content?: string;
1777
+ mode: SessionMode;
1778
+ }
1692
1779
  /**
1693
1780
  * Session event "session.session_limits_changed". Session limits update details. Null clears the limits.
1694
1781
  */
@@ -2748,6 +2835,97 @@ export interface TaskCompleteData {
2748
2835
  */
2749
2836
  summary?: string;
2750
2837
  }
2838
+ /**
2839
+ * Session event "session.completion_receipt". Behavior-neutral record of structured runtime facts present when an agent completion decision is accepted.
2840
+ */
2841
+ /** @experimental */
2842
+ export interface CompletionReceiptEvent {
2843
+ /**
2844
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
2845
+ */
2846
+ agentId?: string;
2847
+ data: CompletionReceiptData;
2848
+ /**
2849
+ * When true, the event is transient and not persisted to the session event log on disk
2850
+ */
2851
+ ephemeral?: boolean;
2852
+ /**
2853
+ * Unique event identifier (UUID v4), generated when the event is emitted
2854
+ */
2855
+ id: string;
2856
+ /**
2857
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
2858
+ */
2859
+ parentId: string | null;
2860
+ /**
2861
+ * ISO 8601 timestamp when the event was created
2862
+ */
2863
+ timestamp: string;
2864
+ /**
2865
+ * Type discriminator. Always "session.completion_receipt".
2866
+ */
2867
+ type: "session.completion_receipt";
2868
+ }
2869
+ /**
2870
+ * Behavior-neutral record of structured runtime facts present when an agent completion decision is accepted.
2871
+ */
2872
+ /** @experimental */
2873
+ export interface CompletionReceiptData {
2874
+ /**
2875
+ * One-based accepted completion receipt ordinal in the durable session history.
2876
+ */
2877
+ attempt: number;
2878
+ eventRange: CompletionReceiptEventRange;
2879
+ /**
2880
+ * Number of failed structured tool completions in the covered range.
2881
+ */
2882
+ failedToolCount: number;
2883
+ finalTool?: CompletionReceiptFinalTool;
2884
+ /**
2885
+ * Version of the completion receipt payload.
2886
+ */
2887
+ schemaVersion: number;
2888
+ /**
2889
+ * Identifier of the assistant turn-end event that supplied the accepted completion boundary. This is the receipt's idempotency key, and always equals eventRange.endEventId.
2890
+ */
2891
+ sourceEventId: string;
2892
+ stopReason: CompletionReceiptStopReason;
2893
+ /**
2894
+ * Number of successful structured tool completions in the covered range.
2895
+ */
2896
+ successfulToolCount: number;
2897
+ }
2898
+ /**
2899
+ * Inclusive durable event range summarized by a completion receipt.
2900
+ */
2901
+ export interface CompletionReceiptEventRange {
2902
+ /**
2903
+ * Identifier of the assistant turn-end event that ends the covered exchange. Always equals the receipt's sourceEventId, so either field is a valid join key.
2904
+ */
2905
+ endEventId: string;
2906
+ /**
2907
+ * Identifier of the user message that starts the covered exchange.
2908
+ */
2909
+ startEventId: string;
2910
+ }
2911
+ /**
2912
+ * Final structured tool completion in the covered event range.
2913
+ */
2914
+ export interface CompletionReceiptFinalTool {
2915
+ /**
2916
+ * Process exit code from a structured shell result, when available.
2917
+ */
2918
+ exitCode?: number;
2919
+ status: CompletionReceiptToolStatus;
2920
+ /**
2921
+ * Unique identifier of the completed tool call.
2922
+ */
2923
+ toolCallId: string;
2924
+ /**
2925
+ * Tool name from the matching tool execution start event, when available.
2926
+ */
2927
+ toolName?: string;
2928
+ }
2751
2929
  /**
2752
2930
  * Session event "session.fusion_route_started". Experimental transient signal that HydraFusion routing has started for an eligible turn.
2753
2931
  */
@@ -2921,6 +3099,12 @@ export interface FusionResolvedData {
2921
3099
  */
2922
3100
  modelUniverseVersion?: string;
2923
3101
  pattern: FusionPattern;
3102
+ /**
3103
+ * Presentation-neutral phase plan for clients that render workflow progress.
3104
+ *
3105
+ * @experimental
3106
+ */
3107
+ phasePlan?: FusionPhasePlanStep[];
2924
3108
  /**
2925
3109
  * Version of the validated execution-plan format.
2926
3110
  */
@@ -2979,6 +3163,22 @@ export interface FusionFollowUpRecommendation {
2979
3163
  compactionTurn: FusionFollowUpAction;
2980
3164
  userTurn: FusionFollowUpAction;
2981
3165
  }
3166
+ /**
3167
+ * Presentation-neutral phase planned for a HydraFusion turn.
3168
+ */
3169
+ /** @experimental */
3170
+ export interface FusionPhasePlanStep {
3171
+ /**
3172
+ * Whether the phase executes only when an earlier phase requests it.
3173
+ */
3174
+ conditional: boolean;
3175
+ kind: FusionPhaseKind;
3176
+ /**
3177
+ * Semantic role assigned to the phase.
3178
+ */
3179
+ role: string;
3180
+ scope: FusionConversationScope;
3181
+ }
2982
3182
  /**
2983
3183
  * Validated HydraFusion routing capability scores.
2984
3184
  */
@@ -3159,6 +3359,10 @@ export interface UserMessageData {
3159
3359
  * True when this user message was auto-injected by autopilot's continuation loop rather than typed by the user; used to distinguish autopilot-driven turns in telemetry.
3160
3360
  */
3161
3361
  isAutopilotContinuation?: boolean;
3362
+ /**
3363
+ * Stable identity of the logical user message, matching the ID returned by send and retained by pending queue snapshots
3364
+ */
3365
+ messageId?: string;
3162
3366
  /**
3163
3367
  * Path-backed native document attachments that stayed on the tagged_files path flow because native upload could not read them or would exceed the request size limit
3164
3368
  */
@@ -3799,6 +4003,67 @@ export interface FusionPhaseStartedData {
3799
4003
  */
3800
4004
  role: string;
3801
4005
  }
4006
+ /**
4007
+ * Session event "assistant.fusion_phase_activity". Experimental content-safe activity signal for a running HydraFusion phase.
4008
+ */
4009
+ /** @experimental */
4010
+ export interface AssistantFusionPhaseActivityEvent {
4011
+ /**
4012
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
4013
+ */
4014
+ agentId?: string;
4015
+ data: FusionPhaseActivityData;
4016
+ /**
4017
+ * Always true for events that are transient and not persisted to the session event log on disk.
4018
+ */
4019
+ ephemeral: true;
4020
+ /**
4021
+ * Unique event identifier (UUID v4), generated when the event is emitted
4022
+ */
4023
+ id: string;
4024
+ /**
4025
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
4026
+ */
4027
+ parentId: string | null;
4028
+ /**
4029
+ * ISO 8601 timestamp when the event was created
4030
+ */
4031
+ timestamp: string;
4032
+ /**
4033
+ * Type discriminator. Always "assistant.fusion_phase_activity".
4034
+ */
4035
+ type: "assistant.fusion_phase_activity";
4036
+ }
4037
+ /**
4038
+ * Experimental content-safe activity signal for a running HydraFusion phase.
4039
+ */
4040
+ /** @experimental */
4041
+ export interface FusionPhaseActivityData {
4042
+ activity: FusionPhaseActivityKind;
4043
+ conversationScope: FusionConversationScope;
4044
+ /**
4045
+ * Identifier of the HydraFusion turn containing the phase.
4046
+ */
4047
+ fusionId: string;
4048
+ pattern: FusionPattern;
4049
+ /**
4050
+ * Stable identifier for the concrete phase.
4051
+ */
4052
+ phaseId: string;
4053
+ phaseKind: FusionPhaseKind;
4054
+ /**
4055
+ * Semantic role assigned to the phase.
4056
+ */
4057
+ role: string;
4058
+ /**
4059
+ * Opaque hashed correlation token for matching tool-started and tool-completed activity within this Fusion activity stream. It is not the tool call identifier exposed by tool lifecycle events.
4060
+ */
4061
+ toolCallId?: string;
4062
+ /**
4063
+ * Cumulative private response bytes observed for this model call. The event never includes response text.
4064
+ */
4065
+ totalResponseSizeBytes?: number;
4066
+ }
3802
4067
  /**
3803
4068
  * Session event "assistant.fusion_phase_completed". Experimental durable HydraFusion phase output and lossless replay checkpoint.
3804
4069
  */
@@ -4509,7 +4774,7 @@ export interface FusionAttribution {
4509
4774
  /** @experimental */
4510
4775
  export interface AssistantMessageReasoningBlocks {
4511
4776
  /**
4512
- * Provider-native reasoning content blocks (e.g. Anthropic `thinking` / `redacted_thinking`) preserved verbatim, in order. A single response can carry several, each signed over the content preceding it, so dropping or reordering any of them invalidates the rest.
4777
+ * Provider-native reasoning items or content blocks preserved verbatim, in order. A single response can carry several, and provider signatures or identifiers may depend on their exact content and ordering.
4513
4778
  */
4514
4779
  blocks?: JsonValue[];
4515
4780
  /**
@@ -6129,6 +6394,10 @@ export interface SkillInvokedData {
6129
6394
  * Description of the skill from its SKILL.md frontmatter
6130
6395
  */
6131
6396
  description?: string;
6397
+ /**
6398
+ * Whether model invocation is disabled for this skill
6399
+ */
6400
+ disableModelInvocation?: boolean;
6132
6401
  /**
6133
6402
  * Model identifier active when the skill was invoked, when known
6134
6403
  */
@@ -6138,7 +6407,7 @@ export interface SkillInvokedData {
6138
6407
  */
6139
6408
  name: string;
6140
6409
  /**
6141
- * File path to the SKILL.md definition
6410
+ * File path to the SKILL.md definition, or an empty string for an SDK-provided skill without a filesystem identity
6142
6411
  */
6143
6412
  path: string;
6144
6413
  /**
@@ -6150,7 +6419,7 @@ export interface SkillInvokedData {
6150
6419
  */
6151
6420
  pluginVersion?: string;
6152
6421
  /**
6153
- * Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill)
6422
+ * Source identifier for where the skill was discovered. Known values include: project (workspace skill), inherited (parent-directory skill), personal-copilot (~/.copilot/skills), personal-agents (~/.agents/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), remote (org/enterprise skill), and sdk (SDK-provided skill)
6154
6423
  */
6155
6424
  source?: string;
6156
6425
  trigger?: SkillInvokedTrigger;
@@ -6355,6 +6624,10 @@ export interface SubagentCompletedData {
6355
6624
  * Model used by the sub-agent
6356
6625
  */
6357
6626
  model?: string;
6627
+ /**
6628
+ * Why an explicit task-call model did not become the effective model
6629
+ */
6630
+ modelOverrideReason?: string;
6358
6631
  /**
6359
6632
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6360
6633
  */
@@ -6442,6 +6715,10 @@ export interface SubagentFailedData {
6442
6715
  * Model selected for the sub-agent, when known
6443
6716
  */
6444
6717
  model?: string;
6718
+ /**
6719
+ * Why an explicit task-call model did not become the effective model
6720
+ */
6721
+ modelOverrideReason?: string;
6445
6722
  /**
6446
6723
  * Tool call ID of the parent tool invocation that spawned this sub-agent
6447
6724
  */
@@ -7107,6 +7384,7 @@ export interface PermissionRequestedEvent {
7107
7384
  * Permission request notification requiring client approval with request details
7108
7385
  */
7109
7386
  export interface PermissionRequestedData {
7387
+ agentMode?: SessionMode;
7110
7388
  permissionRequest: PermissionRequest;
7111
7389
  promptRequest?: PermissionPromptRequest;
7112
7390
  /**
@@ -9629,7 +9907,7 @@ export interface AutoModeResolvedData {
9629
9907
  stickyOverride?: boolean;
9630
9908
  }
9631
9909
  /**
9632
- * Session event "session.managed_settings_resolved". Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values per ordinary key, while permissions compose restrictively across device, server, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
9910
+ * Session event "session.managed_settings_resolved". Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values, then the policy helper, per ordinary key, while permissions compose restrictively across device, server, policy-helper, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
9633
9911
  */
9634
9912
  /** @experimental */
9635
9913
  export interface ManagedSettingsResolvedEvent {
@@ -9660,7 +9938,7 @@ export interface ManagedSettingsResolvedEvent {
9660
9938
  type: "session.managed_settings_resolved";
9661
9939
  }
9662
9940
  /**
9663
- * Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values per ordinary key, while permissions compose restrictively across device, server, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
9941
+ * Enterprise managed-settings resolution: the effective managed settings the session applied and which channels contributed, so SDK clients can show users what is enterprise-managed. Fires whenever managed policy is (re)applied — at session start, on resume, and on account switch. This is an ephemeral live snapshot (delivered to subscribers but not persisted to the session event log), because at session start it resolves before `session.start` is emitted. Device values take precedence over server values, then the policy helper, per ordinary key, while permissions compose restrictively across device, server, policy-helper, and SDK-client layers. The account-scoped `getManagedSettings()` API does not include session-local client injection. Marked experimental while the managed-settings surface stabilizes.
9664
9942
  */
9665
9943
  /** @experimental */
9666
9944
  export interface ManagedSettingsResolvedData {
@@ -9688,6 +9966,10 @@ export interface ManagedSettingsResolvedData {
9688
9966
  * Whether at least two managed sources supplied permission allowlists, so enforcement intersects them and the flattened settings payload omits `permissions.allow`.
9689
9967
  */
9690
9968
  permissionsAllowIntersected?: boolean;
9969
+ /**
9970
+ * Whether the policy-helper managed-settings layer was present. The policy helper is the weakest channel: it fills keys no enterprise source set and can never replace one.
9971
+ */
9972
+ policyHelperManaged?: boolean;
9691
9973
  /**
9692
9974
  * Whether the effective sandbox policy forces the sandbox on *only* because managed policy could not be determined, rather than because the policy requires it. Lets clients tell a user whose `--no-sandbox` was overridden that the sandbox stayed on as a fail-closed fallback, instead of attributing it to an administrator who set no such policy.
9693
9975
  */
@@ -10313,7 +10595,7 @@ export interface CustomAgentsUpdatedData {
10313
10595
  warnings: string[];
10314
10596
  }
10315
10597
  /**
10316
- * A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and model override.
10598
+ * A single loaded custom agent in `session.custom_agents_updated`, with identity, source, tools, invocability, and authored model configuration.
10317
10599
  */
10318
10600
  export interface CustomAgentsUpdatedAgent {
10319
10601
  /**
@@ -10332,6 +10614,11 @@ export interface CustomAgentsUpdatedAgent {
10332
10614
  * Model override for this agent, if set
10333
10615
  */
10334
10616
  model?: string;
10617
+ modelPolicy?: AgentModelPolicy;
10618
+ /**
10619
+ * Authored model ids in priority order, if configured
10620
+ */
10621
+ models?: string[];
10335
10622
  /**
10336
10623
  * Internal name of the agent
10337
10624
  */
package/dist/index.d.ts CHANGED
@@ -11,5 +11,5 @@ export { defineFactory, FactoryResumeError, isFactoryRunTerminal } from "./facto
11
11
  export { Canvas, CanvasError, createCanvas, type CanvasAction, type CanvasDeclaration, type CanvasHostContext, type CanvasHostContextCapabilities, type CanvasJsonSchema, type CanvasOptions, } from "./canvas.js";
12
12
  export { defineTool, approveAll, createAttributedPermissionResult, convertMcpCallToolResult, createSessionFsAdapter, CopilotRequestHandler, CopilotWebSocketHandler, CopilotWebSocketCloseStatus, CopilotWebSocketForwarder, SessionFsSqliteTransactionFailure, SYSTEM_MESSAGE_SECTIONS, } from "./types.js";
13
13
  export type * from "./generated/session-events.js";
14
- export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientMode, CopilotClientOptions, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, FactoryLimits, FactoryMeta, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, MessageOptions, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, CapiSessionOptions, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, ResumeSessionConfig, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionConfigBase, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventMetadata, SessionLifecycleEventType, SessionLifecycleHandler, SessionHooks, SessionCreatedEvent, SessionDeletedEvent, SessionUpdatedEvent, SessionForegroundEvent, SessionBackgroundEvent, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SessionFsSqliteStatement, SessionFsSqliteTransactionErrorClass, CopilotRequestContext, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemMessageSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, CurrentToolMetadata, ToolTelemetry, ToolResultObject, ToolSearchConfig, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
14
+ export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, FactoryLimits, FactoryMeta, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, MessageOptions, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, AutoTier, CapiSessionOptions, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, ResumeSessionConfig, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionConfigBase, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventMetadata, SessionLifecycleEventType, SessionLifecycleHandler, SessionHooks, SessionCreatedEvent, SessionDeletedEvent, SessionUpdatedEvent, SessionForegroundEvent, SessionBackgroundEvent, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SessionFsSqliteStatement, SessionFsSqliteTransactionErrorClass, CopilotRequestContext, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemMessageSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, CurrentToolMetadata, ToolTelemetry, ToolResultObject, ToolSearchConfig, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
15
15
  export type { RunOptions, ResumeOptions, FactoryResumeErrorCode, SessionFactoryApi, FactoryAgentOptions, FactoryContext, FactoryDefinition, FactoryHandle, FactoryJsonSchema, JsonValue, FactoryPipelineStage, FactoryStepOptions, FactoryRunResult, FactoryRunStatus, FactoryRunSummary, FactoryListRunsOptions, FactoryRunsPage, FactoryRunDetail, FactoryProgressPage, FactoryProgressLine, FactoryPhaseObservation, FactoryPhaseStatus, FactoryAgentSummary, } from "./factory.js";
@@ -0,0 +1,18 @@
1
+ export interface RuntimeArtifactSources {
2
+ packageRoot: string;
3
+ platform: string;
4
+ }
5
+ export interface EnsureRuntimeBundleOptions {
6
+ cacheRoot?: string;
7
+ packageSearchPaths?: string[];
8
+ platform?: string;
9
+ }
10
+ export declare const RUNTIME_PLATFORMS: readonly ["darwin-arm64", "darwin-x64", "linux-arm64", "linux-x64", "linuxmusl-arm64", "linuxmusl-x64", "win32-arm64", "win32-x64"];
11
+ export declare function validateFile(path: string, label: string): void;
12
+ export declare function defaultRuntimeCacheRoot(platform?: NodeJS.Platform, home?: string, environment?: NodeJS.ProcessEnv): string;
13
+ export declare function materializeRuntimeBundle(sources: RuntimeArtifactSources, cacheRoot?: string, cacheKey?: string): string;
14
+ export declare function getRuntimePlatform(platform?: NodeJS.Platform, arch?: NodeJS.Architecture, musl?: boolean): string;
15
+ export declare function getRuntimeReleaseAssetName(version: string, platform: string): string;
16
+ export declare function getRuntimePackageName(platform: string): string;
17
+ export declare function resolvePackageRoot(packageName: string, searchPaths?: string[]): string | undefined;
18
+ export declare function ensureRuntimeBundle(version: string, options?: EnsureRuntimeBundleOptions): Promise<string>;