@github/copilot-sdk 1.0.0-beta.5 → 1.0.0-beta.7

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.
@@ -5,7 +5,7 @@
5
5
  /**
6
6
  * Union of all session event variants emitted by the Copilot CLI runtime.
7
7
  */
8
- export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | PlanChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | ContextChangedEvent | UsageInfoEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | CustomNotificationEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | ExtensionsLoadedEvent;
8
+ export type SessionEvent = StartEvent | ResumeEvent | RemoteSteerableChangedEvent | ErrorEvent | IdleEvent | TitleChangedEvent | ScheduleCreatedEvent | ScheduleCancelledEvent | InfoEvent | WarningEvent | ModelChangeEvent | ModeChangedEvent | PlanChangedEvent | WorkspaceFileChangedEvent | HandoffEvent | TruncationEvent | SnapshotRewindEvent | ShutdownEvent | ContextChangedEvent | UsageInfoEvent | CompactionStartEvent | CompactionCompleteEvent | TaskCompleteEvent | UserMessageEvent | PendingMessagesModifiedEvent | AssistantTurnStartEvent | AssistantIntentEvent | AssistantReasoningEvent | AssistantReasoningDeltaEvent | AssistantStreamingDeltaEvent | AssistantMessageEvent | AssistantMessageStartEvent | AssistantMessageDeltaEvent | AssistantTurnEndEvent | AssistantUsageEvent | ModelCallFailureEvent | AbortEvent | ToolUserRequestedEvent | ToolExecutionStartEvent | ToolExecutionPartialResultEvent | ToolExecutionProgressEvent | ToolExecutionCompleteEvent | SkillInvokedEvent | SubagentStartedEvent | SubagentCompletedEvent | SubagentFailedEvent | SubagentSelectedEvent | SubagentDeselectedEvent | HookStartEvent | HookEndEvent | SystemMessageEvent | SystemNotificationEvent | PermissionRequestedEvent | PermissionCompletedEvent | UserInputRequestedEvent | UserInputCompletedEvent | ElicitationRequestedEvent | ElicitationCompletedEvent | SamplingRequestedEvent | SamplingCompletedEvent | McpOauthRequiredEvent | McpOauthCompletedEvent | CustomNotificationEvent | ExternalToolRequestedEvent | ExternalToolCompletedEvent | CommandQueuedEvent | CommandExecuteEvent | CommandCompletedEvent | AutoModeSwitchRequestedEvent | AutoModeSwitchCompletedEvent | CommandsChangedEvent | CapabilitiesChangedEvent | ExitPlanModeRequestedEvent | ExitPlanModeCompletedEvent | ToolsUpdatedEvent | BackgroundTasksChangedEvent | SkillsLoadedEvent | CustomAgentsUpdatedEvent | McpServersLoadedEvent | McpServerStatusChangedEvent | ExtensionsLoadedEvent | CanvasOpenedEvent | CanvasRegistryChangedEvent | McpAppToolCallCompleteEvent;
9
9
  /**
10
10
  * Hosting platform type of the repository (github or ado)
11
11
  */
@@ -150,6 +150,24 @@ export type ToolExecutionCompleteContentResourceLinkIconTheme =
150
150
  * The embedded resource contents, either text or base64-encoded binary
151
151
  */
152
152
  export type ToolExecutionCompleteContentResourceDetails = EmbeddedTextResourceContents | EmbeddedBlobResourceContents;
153
+ /**
154
+ * Allowed values for the `ToolExecutionCompleteToolDescriptionMetaUIVisibility` enumeration.
155
+ */
156
+ export type ToolExecutionCompleteToolDescriptionMetaUIVisibility =
157
+ /** Tool is callable by the model (LLM tool surface) */
158
+ "model"
159
+ /** Tool is callable by the MCP App view (iframe) via session.mcp.apps.callTool */
160
+ | "app";
161
+ /**
162
+ * What triggered the skill invocation: `user-invoked` (explicit user action, such as via a slash command or UI affordance), `agent-invoked` (agent requested the skill), or `context-load` (loaded as part of another context, such as preloading skills configured on a custom agent or subagent)
163
+ */
164
+ export type SkillInvokedTrigger =
165
+ /** Skill invocation requested explicitly by the user, such as via a slash command or UI affordance. */
166
+ "user-invoked"
167
+ /** Skill invocation requested by the agent. */
168
+ | "agent-invoked"
169
+ /** Skill content loaded as part of another context, such as a configured custom agent or subagent. */
170
+ | "context-load";
153
171
  /**
154
172
  * Message role: "system" for system prompts, "developer" for developer-injected instructions
155
173
  */
@@ -308,6 +326,18 @@ export type McpServerStatus =
308
326
  | "disabled"
309
327
  /** The server is not configured for this session. */
310
328
  | "not_configured";
329
+ /**
330
+ * Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
331
+ */
332
+ export type McpServerTransport =
333
+ /** Server communicates over stdio with a local child process. */
334
+ "stdio"
335
+ /** Server communicates over streamable HTTP. */
336
+ | "http"
337
+ /** Server communicates over Server-Sent Events (deprecated). */
338
+ | "sse"
339
+ /** Server is backed by an in-memory runtime implementation. */
340
+ | "memory";
311
341
  /**
312
342
  * Discovery source
313
343
  */
@@ -328,6 +358,14 @@ export type ExtensionsLoadedExtensionStatus =
328
358
  | "failed"
329
359
  /** The extension process is starting. */
330
360
  | "starting";
361
+ /**
362
+ * Runtime-controlled routing state for the instance. "ready" when the provider connection is live; "stale" when the provider has gone away and the instance is awaiting rebinding.
363
+ */
364
+ export type CanvasOpenedAvailability =
365
+ /** Provider connection is live; actions can be invoked. */
366
+ "ready"
367
+ /** Provider has gone away; the instance is awaiting rebinding. */
368
+ | "stale";
331
369
  /**
332
370
  * Session event "session.start". Session initialization metadata including context and configuration
333
371
  */
@@ -601,6 +639,10 @@ export interface ErrorData {
601
639
  * GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
602
640
  */
603
641
  providerCallId?: string;
642
+ /**
643
+ * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
644
+ */
645
+ serviceRequestId?: string;
604
646
  /**
605
647
  * Error stack trace, when available
606
648
  */
@@ -922,6 +964,12 @@ export interface ModelChangeData {
922
964
  * Reason the change happened, when not user-initiated. Currently `"rate_limit_auto_switch"` for changes triggered by the auto-mode-switch rate-limit recovery path. UI clients can use this to render contextual copy.
923
965
  */
924
966
  cause?: string;
967
+ /**
968
+ * Context tier after the model change; null explicitly clears a previously selected tier
969
+ */
970
+ contextTier?: "default"
971
+ /** Extended context tier with a larger context window. */
972
+ | "long_context" | null;
925
973
  /**
926
974
  * Newly selected model identifier
927
975
  */
@@ -1320,12 +1368,10 @@ export interface ShutdownData {
1320
1368
  totalApiDurationMs: number;
1321
1369
  /**
1322
1370
  * Session-wide accumulated nano-AI units cost
1371
+ *
1372
+ * @experimental
1323
1373
  */
1324
1374
  totalNanoAiu?: number;
1325
- /**
1326
- * Total number of premium API requests used during the session
1327
- */
1328
- totalPremiumRequests: number;
1329
1375
  }
1330
1376
  /**
1331
1377
  * Aggregate code change metrics for the session
@@ -1357,6 +1403,8 @@ export interface ShutdownModelMetric {
1357
1403
  };
1358
1404
  /**
1359
1405
  * Accumulated nano-AI units cost for this model
1406
+ *
1407
+ * @experimental
1360
1408
  */
1361
1409
  totalNanoAiu?: number;
1362
1410
  usage: ShutdownModelMetricUsage;
@@ -1367,12 +1415,16 @@ export interface ShutdownModelMetric {
1367
1415
  export interface ShutdownModelMetricRequests {
1368
1416
  /**
1369
1417
  * Cumulative cost multiplier for requests to this model
1418
+ *
1419
+ * @experimental
1370
1420
  */
1371
- cost: number;
1421
+ cost?: number;
1372
1422
  /**
1373
1423
  * Total number of API requests made to this model
1424
+ *
1425
+ * @experimental
1374
1426
  */
1375
- count: number;
1427
+ count?: number;
1376
1428
  }
1377
1429
  /**
1378
1430
  * Schema for the `ShutdownModelMetricTokenDetail` type.
@@ -1604,6 +1656,10 @@ export interface CompactionCompleteData {
1604
1656
  * Token count from non-system messages (user, assistant, tool) after compaction
1605
1657
  */
1606
1658
  conversationTokens?: number;
1659
+ /**
1660
+ * User-supplied focus instructions provided to a manual `/compact` invocation. Omitted for automatic compaction and for manual compaction with no focus text.
1661
+ */
1662
+ customInstructions?: string;
1607
1663
  /**
1608
1664
  * Error message if compaction failed
1609
1665
  */
@@ -1628,6 +1684,10 @@ export interface CompactionCompleteData {
1628
1684
  * GitHub request tracing ID (x-github-request-id header) for the compaction LLM call
1629
1685
  */
1630
1686
  requestId?: string;
1687
+ /**
1688
+ * Copilot service request ID (x-copilot-service-request-id header) for the compaction LLM call
1689
+ */
1690
+ serviceRequestId?: string;
1631
1691
  /**
1632
1692
  * Whether compaction completed successfully
1633
1693
  */
@@ -1661,7 +1721,6 @@ export interface CompactionCompleteCompactionTokensUsed {
1661
1721
  * Tokens written to prompt cache in the compaction LLM call
1662
1722
  */
1663
1723
  cacheWriteTokens?: number;
1664
- copilotUsage?: CompactionCompleteCompactionTokensUsedCopilotUsage;
1665
1724
  /**
1666
1725
  * Duration of the compaction LLM call in milliseconds
1667
1726
  */
@@ -1679,19 +1738,6 @@ export interface CompactionCompleteCompactionTokensUsed {
1679
1738
  */
1680
1739
  outputTokens?: number;
1681
1740
  }
1682
- /**
1683
- * Per-request cost and usage data from the CAPI copilot_usage response field
1684
- */
1685
- export interface CompactionCompleteCompactionTokensUsedCopilotUsage {
1686
- /**
1687
- * Itemized token usage breakdown
1688
- */
1689
- tokenDetails: CompactionCompleteCompactionTokensUsedCopilotUsageTokenDetail[];
1690
- /**
1691
- * Total cost in nano-AI units for this request
1692
- */
1693
- totalNanoAiu: number;
1694
- }
1695
1741
  /**
1696
1742
  * Token usage detail for a single billing category
1697
1743
  */
@@ -2256,10 +2302,14 @@ export interface AssistantMessageEvent {
2256
2302
  export interface AssistantMessageData {
2257
2303
  /**
2258
2304
  * Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping
2305
+ *
2306
+ * @experimental
2259
2307
  */
2260
2308
  anthropicAdvisorBlocks?: unknown[];
2261
2309
  /**
2262
2310
  * Anthropic advisor model ID used for this response, for timeline display on replay
2311
+ *
2312
+ * @experimental
2263
2313
  */
2264
2314
  anthropicAdvisorModel?: string;
2265
2315
  /**
@@ -2307,6 +2357,10 @@ export interface AssistantMessageData {
2307
2357
  * GitHub request tracing ID (x-github-request-id header) for correlating with server-side logs
2308
2358
  */
2309
2359
  requestId?: string;
2360
+ /**
2361
+ * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
2362
+ */
2363
+ serviceRequestId?: string;
2310
2364
  /**
2311
2365
  * Tool invocations requested by the assistant in this message
2312
2366
  */
@@ -2529,9 +2583,10 @@ export interface AssistantUsageData {
2529
2583
  * Number of tokens written to prompt cache
2530
2584
  */
2531
2585
  cacheWriteTokens?: number;
2532
- copilotUsage?: AssistantUsageCopilotUsage;
2533
2586
  /**
2534
2587
  * Model multiplier cost for billing purposes
2588
+ *
2589
+ * @experimental
2535
2590
  */
2536
2591
  cost?: number;
2537
2592
  /**
@@ -2567,12 +2622,6 @@ export interface AssistantUsageData {
2567
2622
  * GitHub request tracing ID (x-github-request-id header) for server-side log correlation
2568
2623
  */
2569
2624
  providerCallId?: string;
2570
- /**
2571
- * Per-quota resource usage snapshots, keyed by quota identifier
2572
- */
2573
- quotaSnapshots?: {
2574
- [k: string]: AssistantUsageQuotaSnapshot | undefined;
2575
- };
2576
2625
  /**
2577
2626
  * Reasoning effort level used for model calls, if applicable (e.g. "none", "low", "medium", "high", "xhigh", "max")
2578
2627
  */
@@ -2582,22 +2631,13 @@ export interface AssistantUsageData {
2582
2631
  */
2583
2632
  reasoningTokens?: number;
2584
2633
  /**
2585
- * Time to first token in milliseconds. Only available for streaming requests
2586
- */
2587
- timeToFirstTokenMs?: number;
2588
- }
2589
- /**
2590
- * Per-request cost and usage data from the CAPI copilot_usage response field
2591
- */
2592
- export interface AssistantUsageCopilotUsage {
2593
- /**
2594
- * Itemized token usage breakdown
2634
+ * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
2595
2635
  */
2596
- tokenDetails: AssistantUsageCopilotUsageTokenDetail[];
2636
+ serviceRequestId?: string;
2597
2637
  /**
2598
- * Total cost in nano-AI units for this request
2638
+ * Time to first token in milliseconds. Only available for streaming requests
2599
2639
  */
2600
- totalNanoAiu: number;
2640
+ timeToFirstTokenMs?: number;
2601
2641
  }
2602
2642
  /**
2603
2643
  * Token usage detail for a single billing category
@@ -2620,43 +2660,6 @@ export interface AssistantUsageCopilotUsageTokenDetail {
2620
2660
  */
2621
2661
  tokenType: string;
2622
2662
  }
2623
- /**
2624
- * Schema for the `AssistantUsageQuotaSnapshot` type.
2625
- */
2626
- export interface AssistantUsageQuotaSnapshot {
2627
- /**
2628
- * Total requests allowed by the entitlement
2629
- */
2630
- entitlementRequests: number;
2631
- /**
2632
- * Whether the user has an unlimited usage entitlement
2633
- */
2634
- isUnlimitedEntitlement: boolean;
2635
- /**
2636
- * Number of requests over the entitlement limit
2637
- */
2638
- overage: number;
2639
- /**
2640
- * Whether overage is allowed when quota is exhausted
2641
- */
2642
- overageAllowedWithExhaustedQuota: boolean;
2643
- /**
2644
- * Percentage of quota remaining (0 to 100)
2645
- */
2646
- remainingPercentage: number;
2647
- /**
2648
- * Date when the quota resets
2649
- */
2650
- resetDate?: string;
2651
- /**
2652
- * Whether usage is still permitted after quota exhaustion
2653
- */
2654
- usageAllowedWithExhaustedQuota: boolean;
2655
- /**
2656
- * Number of requests already consumed
2657
- */
2658
- usedRequests: number;
2659
- }
2660
2663
  /**
2661
2664
  * Session event "model.call_failure". Failed LLM API call metadata for telemetry
2662
2665
  */
@@ -2715,6 +2718,10 @@ export interface ModelCallFailureData {
2715
2718
  * GitHub request tracing ID (x-github-request-id header) for server-side log correlation
2716
2719
  */
2717
2720
  providerCallId?: string;
2721
+ /**
2722
+ * Copilot service request ID (x-copilot-service-request-id header) for CAPI log correlation
2723
+ */
2724
+ serviceRequestId?: string;
2718
2725
  source: ModelCallFailureSource;
2719
2726
  /**
2720
2727
  * HTTP status code from the failed request
@@ -3011,6 +3018,10 @@ export interface ToolExecutionCompleteData {
3011
3018
  */
3012
3019
  parentToolCallId?: string;
3013
3020
  result?: ToolExecutionCompleteResult;
3021
+ /**
3022
+ * Whether this tool execution ran inside a sandbox container
3023
+ */
3024
+ sandboxed?: boolean;
3014
3025
  /**
3015
3026
  * Whether the tool execution completed successfully
3016
3027
  */
@@ -3019,6 +3030,7 @@ export interface ToolExecutionCompleteData {
3019
3030
  * Unique identifier for the completed tool call
3020
3031
  */
3021
3032
  toolCallId: string;
3033
+ toolDescription?: ToolExecutionCompleteToolDescription;
3022
3034
  /**
3023
3035
  * Tool-specific telemetry data (e.g., CodeQL check counts, grep match counts)
3024
3036
  */
@@ -3059,6 +3071,7 @@ export interface ToolExecutionCompleteResult {
3059
3071
  * Full detailed tool result for UI/timeline display, preserving complete content such as diffs. Falls back to content when absent.
3060
3072
  */
3061
3073
  detailedContent?: string;
3074
+ uiResource?: ToolExecutionCompleteUIResource;
3062
3075
  }
3063
3076
  /**
3064
3077
  * Plain text content block
@@ -3227,6 +3240,118 @@ export interface EmbeddedBlobResourceContents {
3227
3240
  */
3228
3241
  uri: string;
3229
3242
  }
3243
+ /**
3244
+ * MCP Apps UI resource content for rendering in a sandboxed iframe
3245
+ */
3246
+ export interface ToolExecutionCompleteUIResource {
3247
+ _meta?: ToolExecutionCompleteUIResourceMeta;
3248
+ /**
3249
+ * Base64-encoded HTML content
3250
+ */
3251
+ blob?: string;
3252
+ /**
3253
+ * MIME type of the content
3254
+ */
3255
+ mimeType: string;
3256
+ /**
3257
+ * HTML content as a string
3258
+ */
3259
+ text?: string;
3260
+ /**
3261
+ * The ui:// URI of the resource
3262
+ */
3263
+ uri: string;
3264
+ }
3265
+ /**
3266
+ * Resource-level UI metadata (CSP, permissions, visual preferences)
3267
+ */
3268
+ export interface ToolExecutionCompleteUIResourceMeta {
3269
+ ui?: ToolExecutionCompleteUIResourceMetaUI;
3270
+ }
3271
+ /**
3272
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUI` type.
3273
+ */
3274
+ export interface ToolExecutionCompleteUIResourceMetaUI {
3275
+ csp?: ToolExecutionCompleteUIResourceMetaUICsp;
3276
+ domain?: string;
3277
+ permissions?: ToolExecutionCompleteUIResourceMetaUIPermissions;
3278
+ prefersBorder?: boolean;
3279
+ }
3280
+ /**
3281
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUICsp` type.
3282
+ */
3283
+ export interface ToolExecutionCompleteUIResourceMetaUICsp {
3284
+ baseUriDomains?: string[];
3285
+ connectDomains?: string[];
3286
+ frameDomains?: string[];
3287
+ resourceDomains?: string[];
3288
+ }
3289
+ /**
3290
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissions` type.
3291
+ */
3292
+ export interface ToolExecutionCompleteUIResourceMetaUIPermissions {
3293
+ camera?: ToolExecutionCompleteUIResourceMetaUIPermissionsCamera;
3294
+ clipboardWrite?: ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite;
3295
+ geolocation?: ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation;
3296
+ microphone?: ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone;
3297
+ }
3298
+ /**
3299
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsCamera` type.
3300
+ */
3301
+ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsCamera {
3302
+ [k: string]: unknown | undefined;
3303
+ }
3304
+ /**
3305
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite` type.
3306
+ */
3307
+ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsClipboardWrite {
3308
+ [k: string]: unknown | undefined;
3309
+ }
3310
+ /**
3311
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation` type.
3312
+ */
3313
+ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsGeolocation {
3314
+ [k: string]: unknown | undefined;
3315
+ }
3316
+ /**
3317
+ * Schema for the `ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone` type.
3318
+ */
3319
+ export interface ToolExecutionCompleteUIResourceMetaUIPermissionsMicrophone {
3320
+ [k: string]: unknown | undefined;
3321
+ }
3322
+ /**
3323
+ * Tool definition metadata, present for MCP tools with MCP Apps support
3324
+ */
3325
+ export interface ToolExecutionCompleteToolDescription {
3326
+ _meta?: ToolExecutionCompleteToolDescriptionMeta;
3327
+ /**
3328
+ * Tool description
3329
+ */
3330
+ description?: string;
3331
+ /**
3332
+ * Tool name
3333
+ */
3334
+ name: string;
3335
+ }
3336
+ /**
3337
+ * MCP Apps metadata for UI resource association
3338
+ */
3339
+ export interface ToolExecutionCompleteToolDescriptionMeta {
3340
+ ui?: ToolExecutionCompleteToolDescriptionMetaUI;
3341
+ }
3342
+ /**
3343
+ * Schema for the `ToolExecutionCompleteToolDescriptionMetaUI` type.
3344
+ */
3345
+ export interface ToolExecutionCompleteToolDescriptionMetaUI {
3346
+ /**
3347
+ * URI of the UI resource
3348
+ */
3349
+ resourceUri?: string;
3350
+ /**
3351
+ * Who can access this tool
3352
+ */
3353
+ visibility?: ToolExecutionCompleteToolDescriptionMetaUIVisibility[];
3354
+ }
3230
3355
  /**
3231
3356
  * Session event "skill.invoked". Skill invocation details including content, allowed tools, and plugin metadata
3232
3357
  */
@@ -3289,6 +3414,11 @@ export interface SkillInvokedData {
3289
3414
  * Version of the plugin this skill originated from, when applicable
3290
3415
  */
3291
3416
  pluginVersion?: string;
3417
+ /**
3418
+ * 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), personal-claude (~/.claude/skills), custom (configured directory), plugin (installed plugin), builtin (bundled runtime skill), and remote (org/enterprise skill)
3419
+ */
3420
+ source?: string;
3421
+ trigger?: SkillInvokedTrigger;
3292
3422
  }
3293
3423
  /**
3294
3424
  * Session event "subagent.started". Sub-agent startup details including parent tool call and agent information
@@ -5695,10 +5825,18 @@ export interface CapabilitiesChangedData {
5695
5825
  * UI capability changes
5696
5826
  */
5697
5827
  export interface CapabilitiesChangedUI {
5828
+ /**
5829
+ * Whether canvas rendering is now supported
5830
+ */
5831
+ canvases?: boolean;
5698
5832
  /**
5699
5833
  * Whether elicitation is now supported
5700
5834
  */
5701
5835
  elicitation?: boolean;
5836
+ /**
5837
+ * Whether MCP Apps (SEP-1865) UI passthrough is now supported
5838
+ */
5839
+ mcpApps?: boolean;
5702
5840
  }
5703
5841
  /**
5704
5842
  * Session event "exit_plan_mode.requested". Plan approval request with plan content and available user actions
@@ -6078,8 +6216,17 @@ export interface McpServersLoadedServer {
6078
6216
  * Server name (config key)
6079
6217
  */
6080
6218
  name: string;
6219
+ /**
6220
+ * Name of the plugin that supplied the effective MCP server config, only when source is plugin
6221
+ */
6222
+ pluginName?: string;
6223
+ /**
6224
+ * Version of the plugin that supplied the effective MCP server config, only when source is plugin
6225
+ */
6226
+ pluginVersion?: string;
6081
6227
  source?: McpServerSource;
6082
6228
  status: McpServerStatus;
6229
+ transport?: McpServerTransport;
6083
6230
  }
6084
6231
  /**
6085
6232
  * Session event "session.mcp_server_status_changed".
@@ -6115,6 +6262,10 @@ export interface McpServerStatusChangedEvent {
6115
6262
  * Schema for the `McpServerStatusChangedData` type.
6116
6263
  */
6117
6264
  export interface McpServerStatusChangedData {
6265
+ /**
6266
+ * Error message if the server entered a failed state
6267
+ */
6268
+ error?: string;
6118
6269
  /**
6119
6270
  * Name of the MCP server whose status changed
6120
6271
  */
@@ -6175,3 +6326,265 @@ export interface ExtensionsLoadedExtension {
6175
6326
  source: ExtensionsLoadedExtensionSource;
6176
6327
  status: ExtensionsLoadedExtensionStatus;
6177
6328
  }
6329
+ /**
6330
+ * Session event "session.canvas.opened".
6331
+ */
6332
+ export interface CanvasOpenedEvent {
6333
+ /**
6334
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
6335
+ */
6336
+ agentId?: string;
6337
+ data: CanvasOpenedData;
6338
+ /**
6339
+ * Always true for events that are transient and not persisted to the session event log on disk.
6340
+ */
6341
+ ephemeral: true;
6342
+ /**
6343
+ * Unique event identifier (UUID v4), generated when the event is emitted
6344
+ */
6345
+ id: string;
6346
+ /**
6347
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
6348
+ */
6349
+ parentId: string | null;
6350
+ /**
6351
+ * ISO 8601 timestamp when the event was created
6352
+ */
6353
+ timestamp: string;
6354
+ /**
6355
+ * Type discriminator. Always "session.canvas.opened".
6356
+ */
6357
+ type: "session.canvas.opened";
6358
+ }
6359
+ /**
6360
+ * Schema for the `CanvasOpenedData` type.
6361
+ */
6362
+ export interface CanvasOpenedData {
6363
+ availability: CanvasOpenedAvailability;
6364
+ /**
6365
+ * Provider-local canvas identifier
6366
+ */
6367
+ canvasId: string;
6368
+ /**
6369
+ * Owning provider identifier
6370
+ */
6371
+ extensionId: string;
6372
+ /**
6373
+ * Owning extension display name, when available
6374
+ */
6375
+ extensionName?: string;
6376
+ /**
6377
+ * Input supplied when the instance was opened
6378
+ */
6379
+ input?: {
6380
+ [k: string]: unknown | undefined;
6381
+ };
6382
+ /**
6383
+ * Stable caller-supplied canvas instance identifier
6384
+ */
6385
+ instanceId: string;
6386
+ /**
6387
+ * Whether this notification represents an idempotent reopen
6388
+ */
6389
+ reopen: boolean;
6390
+ /**
6391
+ * Provider-supplied status text
6392
+ */
6393
+ status?: string;
6394
+ /**
6395
+ * Rendered title
6396
+ */
6397
+ title?: string;
6398
+ /**
6399
+ * URL for web-rendered canvases
6400
+ */
6401
+ url?: string;
6402
+ }
6403
+ /**
6404
+ * Session event "session.canvas.registry_changed".
6405
+ */
6406
+ export interface CanvasRegistryChangedEvent {
6407
+ /**
6408
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
6409
+ */
6410
+ agentId?: string;
6411
+ data: CanvasRegistryChangedData;
6412
+ /**
6413
+ * Always true for events that are transient and not persisted to the session event log on disk.
6414
+ */
6415
+ ephemeral: true;
6416
+ /**
6417
+ * Unique event identifier (UUID v4), generated when the event is emitted
6418
+ */
6419
+ id: string;
6420
+ /**
6421
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
6422
+ */
6423
+ parentId: string | null;
6424
+ /**
6425
+ * ISO 8601 timestamp when the event was created
6426
+ */
6427
+ timestamp: string;
6428
+ /**
6429
+ * Type discriminator. Always "session.canvas.registry_changed".
6430
+ */
6431
+ type: "session.canvas.registry_changed";
6432
+ }
6433
+ /**
6434
+ * Schema for the `CanvasRegistryChangedData` type.
6435
+ */
6436
+ export interface CanvasRegistryChangedData {
6437
+ /**
6438
+ * Canvas declarations currently available
6439
+ */
6440
+ canvases: CanvasRegistryChangedCanvas[];
6441
+ }
6442
+ /**
6443
+ * Schema for the `CanvasRegistryChangedCanvas` type.
6444
+ */
6445
+ export interface CanvasRegistryChangedCanvas {
6446
+ /**
6447
+ * Actions the agent or host may invoke
6448
+ */
6449
+ actions?: CanvasRegistryChangedCanvasAction[];
6450
+ /**
6451
+ * Provider-local canvas identifier
6452
+ */
6453
+ canvasId: string;
6454
+ /**
6455
+ * Short, single-sentence description shown to the agent in canvas catalogs.
6456
+ */
6457
+ description: string;
6458
+ /**
6459
+ * Human-readable canvas name
6460
+ */
6461
+ displayName: string;
6462
+ /**
6463
+ * Owning provider identifier
6464
+ */
6465
+ extensionId: string;
6466
+ /**
6467
+ * Owning extension display name, when available
6468
+ */
6469
+ extensionName?: string;
6470
+ /**
6471
+ * JSON Schema for canvas open input
6472
+ */
6473
+ inputSchema?: {
6474
+ [k: string]: unknown | undefined;
6475
+ };
6476
+ }
6477
+ /**
6478
+ * Schema for the `CanvasRegistryChangedCanvasAction` type.
6479
+ */
6480
+ export interface CanvasRegistryChangedCanvasAction {
6481
+ /**
6482
+ * Action description
6483
+ */
6484
+ description?: string;
6485
+ /**
6486
+ * JSON Schema for action input
6487
+ */
6488
+ inputSchema?: {
6489
+ [k: string]: unknown | undefined;
6490
+ };
6491
+ /**
6492
+ * Action name
6493
+ */
6494
+ name: string;
6495
+ }
6496
+ /**
6497
+ * Session event "mcp_app.tool_call_complete". MCP App view called a tool on a connected MCP server (SEP-1865)
6498
+ */
6499
+ export interface McpAppToolCallCompleteEvent {
6500
+ /**
6501
+ * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
6502
+ */
6503
+ agentId?: string;
6504
+ data: McpAppToolCallCompleteData;
6505
+ /**
6506
+ * Always true for events that are transient and not persisted to the session event log on disk.
6507
+ */
6508
+ ephemeral: true;
6509
+ /**
6510
+ * Unique event identifier (UUID v4), generated when the event is emitted
6511
+ */
6512
+ id: string;
6513
+ /**
6514
+ * ID of the chronologically preceding event in the session, forming a linked chain. Null for the first event.
6515
+ */
6516
+ parentId: string | null;
6517
+ /**
6518
+ * ISO 8601 timestamp when the event was created
6519
+ */
6520
+ timestamp: string;
6521
+ /**
6522
+ * Type discriminator. Always "mcp_app.tool_call_complete".
6523
+ */
6524
+ type: "mcp_app.tool_call_complete";
6525
+ }
6526
+ /**
6527
+ * MCP App view called a tool on a connected MCP server (SEP-1865)
6528
+ */
6529
+ export interface McpAppToolCallCompleteData {
6530
+ /**
6531
+ * Arguments passed to the tool by the app view, if any
6532
+ */
6533
+ arguments?: {
6534
+ [k: string]: unknown | undefined;
6535
+ };
6536
+ /**
6537
+ * Wall-clock duration of the underlying tools/call in milliseconds
6538
+ */
6539
+ durationMs: number;
6540
+ error?: McpAppToolCallCompleteError;
6541
+ /**
6542
+ * Standard MCP CallToolResult returned by the server. Present whether or not the call set isError.
6543
+ */
6544
+ result?: {
6545
+ [k: string]: unknown | undefined;
6546
+ };
6547
+ /**
6548
+ * Name of the MCP server hosting the tool
6549
+ */
6550
+ serverName: string;
6551
+ /**
6552
+ * True when the call completed without throwing AND the MCP CallToolResult did not set isError
6553
+ */
6554
+ success: boolean;
6555
+ toolMeta?: McpAppToolCallCompleteToolMeta;
6556
+ /**
6557
+ * MCP tool name that was invoked
6558
+ */
6559
+ toolName: string;
6560
+ }
6561
+ /**
6562
+ * Set when the underlying tools/call threw an error before returning a CallToolResult
6563
+ */
6564
+ export interface McpAppToolCallCompleteError {
6565
+ /**
6566
+ * Human-readable error message
6567
+ */
6568
+ message: string;
6569
+ }
6570
+ /**
6571
+ * The tool's `_meta.ui` block at the time of the call, so consumers can decide whether to forward the result to the model without re-listing tools.
6572
+ */
6573
+ export interface McpAppToolCallCompleteToolMeta {
6574
+ ui?: McpAppToolCallCompleteToolMetaUI;
6575
+ [k: string]: unknown | undefined;
6576
+ }
6577
+ /**
6578
+ * Schema for the `McpAppToolCallCompleteToolMetaUI` type.
6579
+ */
6580
+ export interface McpAppToolCallCompleteToolMetaUI {
6581
+ /**
6582
+ * `ui://` URI declared by the tool's `_meta.ui.resourceUri`
6583
+ */
6584
+ resourceUri?: string;
6585
+ /**
6586
+ * Tool visibility per SEP-1865 (typically a subset of `["model","app"]`)
6587
+ */
6588
+ visibility?: string[];
6589
+ [k: string]: unknown | undefined;
6590
+ }