@github/copilot-sdk 1.0.0-beta.6 → 1.0.0-beta.8

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.
@@ -54,6 +54,18 @@ export type AuthInfoType =
54
54
  | "token"
55
55
  /** Authentication from a Copilot API token. */
56
56
  | "copilot-api-token";
57
+ /**
58
+ * Runtime-controlled routing state for an open canvas instance.
59
+ *
60
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
61
+ * via the `definition` "CanvasInstanceAvailability".
62
+ */
63
+ /** @experimental */
64
+ export type CanvasInstanceAvailability =
65
+ /** The owning provider is currently connected and routing calls will be dispatched normally. */
66
+ "ready"
67
+ /** The owning provider is not currently connected. Routing calls fail with canvas_provider_unavailable until the agent re-issues open_canvas (which rehydrates via a fresh canvas.open) or the provider reconnects. */
68
+ | "stale";
57
69
  /**
58
70
  * Coarse command category for grouping and behavior: runtime built-in, skill-backed command, or SDK/client-owned command
59
71
  *
@@ -110,7 +122,7 @@ export type ContentFilterMode =
110
122
  /** Remove characters that can hide directives. */
111
123
  | "hidden_characters";
112
124
  /**
113
- * Server transport type: stdio, http, sse, or memory
125
+ * Server transport type: stdio, http, sse (deprecated), or memory
114
126
  *
115
127
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
116
128
  * via the `definition` "DiscoveredMcpServerType".
@@ -120,7 +132,7 @@ export type DiscoveredMcpServerType =
120
132
  "stdio"
121
133
  /** Server communicates over streamable HTTP. */
122
134
  | "http"
123
- /** Server communicates over Server-Sent Events. */
135
+ /** Server communicates over Server-Sent Events (deprecated). */
124
136
  | "sse"
125
137
  /** Server is backed by an in-memory runtime implementation. */
126
138
  | "memory";
@@ -301,6 +313,114 @@ export type SessionLogLevel =
301
313
  | "warning"
302
314
  /** Error message describing a failure. */
303
315
  | "error";
316
+ /**
317
+ * UI theme preference per SEP-1865
318
+ *
319
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
320
+ * via the `definition` "McpAppsHostContextDetailsTheme".
321
+ */
322
+ /** @experimental */
323
+ export type McpAppsHostContextDetailsTheme =
324
+ /** Light UI theme */
325
+ "light"
326
+ /** Dark UI theme */
327
+ | "dark";
328
+ /**
329
+ * Current display mode (SEP-1865)
330
+ *
331
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
332
+ * via the `definition` "McpAppsHostContextDetailsDisplayMode".
333
+ */
334
+ /** @experimental */
335
+ export type McpAppsHostContextDetailsDisplayMode =
336
+ /** Rendered inline within the host conversation surface */
337
+ "inline"
338
+ /** Rendered as a fullscreen overlay */
339
+ | "fullscreen"
340
+ /** Rendered as a picture-in-picture floating panel */
341
+ | "pip";
342
+ /**
343
+ * Allowed values for the `McpAppsHostContextDetailsAvailableDisplayMode` enumeration.
344
+ *
345
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
346
+ * via the `definition` "McpAppsHostContextDetailsAvailableDisplayMode".
347
+ */
348
+ /** @experimental */
349
+ export type McpAppsHostContextDetailsAvailableDisplayMode =
350
+ /** Rendered inline within the host conversation surface */
351
+ "inline"
352
+ /** Rendered as a fullscreen overlay */
353
+ | "fullscreen"
354
+ /** Rendered as a picture-in-picture floating panel */
355
+ | "pip";
356
+ /**
357
+ * Platform type for responsive design
358
+ *
359
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
360
+ * via the `definition` "McpAppsHostContextDetailsPlatform".
361
+ */
362
+ /** @experimental */
363
+ export type McpAppsHostContextDetailsPlatform =
364
+ /** Host runs in a web browser */
365
+ "web"
366
+ /** Host runs as a desktop application */
367
+ | "desktop"
368
+ /** Host runs on a mobile device */
369
+ | "mobile";
370
+ /**
371
+ * UI theme preference per SEP-1865
372
+ *
373
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
374
+ * via the `definition` "McpAppsSetHostContextDetailsTheme".
375
+ */
376
+ /** @experimental */
377
+ export type McpAppsSetHostContextDetailsTheme =
378
+ /** Light UI theme */
379
+ "light"
380
+ /** Dark UI theme */
381
+ | "dark";
382
+ /**
383
+ * Current display mode (SEP-1865)
384
+ *
385
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
386
+ * via the `definition` "McpAppsSetHostContextDetailsDisplayMode".
387
+ */
388
+ /** @experimental */
389
+ export type McpAppsSetHostContextDetailsDisplayMode =
390
+ /** Rendered inline within the host conversation surface */
391
+ "inline"
392
+ /** Rendered as a fullscreen overlay */
393
+ | "fullscreen"
394
+ /** Rendered as a picture-in-picture floating panel */
395
+ | "pip";
396
+ /**
397
+ * Allowed values for the `McpAppsSetHostContextDetailsAvailableDisplayMode` enumeration.
398
+ *
399
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
400
+ * via the `definition` "McpAppsSetHostContextDetailsAvailableDisplayMode".
401
+ */
402
+ /** @experimental */
403
+ export type McpAppsSetHostContextDetailsAvailableDisplayMode =
404
+ /** Rendered inline within the host conversation surface */
405
+ "inline"
406
+ /** Rendered as a fullscreen overlay */
407
+ | "fullscreen"
408
+ /** Rendered as a picture-in-picture floating panel */
409
+ | "pip";
410
+ /**
411
+ * Platform type for responsive design
412
+ *
413
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
414
+ * via the `definition` "McpAppsSetHostContextDetailsPlatform".
415
+ */
416
+ /** @experimental */
417
+ export type McpAppsSetHostContextDetailsPlatform =
418
+ /** Host runs in a web browser */
419
+ "web"
420
+ /** Host runs as a desktop application */
421
+ | "desktop"
422
+ /** Host runs on a mobile device */
423
+ | "mobile";
304
424
  /**
305
425
  * MCP server configuration (stdio process or remote HTTP/SSE)
306
426
  *
@@ -308,6 +428,24 @@ export type SessionLogLevel =
308
428
  * via the `definition` "McpServerConfig".
309
429
  */
310
430
  export type McpServerConfig = McpServerConfigStdio | McpServerConfigHttp;
431
+ /**
432
+ * OIDC token configuration. When truthy, a token is automatically gathered.
433
+ *
434
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
435
+ * via the `definition` "McpServerConfigStdioOidc".
436
+ */
437
+ export type McpServerConfigStdioOidc = boolean | {
438
+ [k: string]: unknown | undefined;
439
+ };
440
+ /**
441
+ * Authentication configuration for this server.
442
+ *
443
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
444
+ * via the `definition` "McpServerConfigStdioAuth".
445
+ */
446
+ export type McpServerConfigStdioAuth = boolean | {
447
+ [k: string]: unknown | undefined;
448
+ };
311
449
  /**
312
450
  * Remote transport type. Defaults to "http" when omitted.
313
451
  *
@@ -319,6 +457,15 @@ export type McpServerConfigHttpType =
319
457
  "http"
320
458
  /** Server-Sent Events transport. */
321
459
  | "sse";
460
+ /**
461
+ * OIDC token configuration. When truthy, a token is automatically gathered.
462
+ *
463
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
464
+ * via the `definition` "McpServerConfigHttpOidc".
465
+ */
466
+ export type McpServerConfigHttpOidc = boolean | {
467
+ [k: string]: unknown | undefined;
468
+ };
322
469
  /**
323
470
  * OAuth grant type to use when authenticating to the remote MCP server.
324
471
  *
@@ -670,6 +817,7 @@ export type SessionContextHostType =
670
817
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
671
818
  * via the `definition` "SessionFsErrorCode".
672
819
  */
820
+ /** @experimental */
673
821
  export type SessionFsErrorCode =
674
822
  /** The requested path does not exist. */
675
823
  "ENOENT"
@@ -681,6 +829,7 @@ export type SessionFsErrorCode =
681
829
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
682
830
  * via the `definition` "SessionFsReaddirWithTypesEntryType".
683
831
  */
832
+ /** @experimental */
684
833
  export type SessionFsReaddirWithTypesEntryType =
685
834
  /** The entry is a file. */
686
835
  "file"
@@ -703,6 +852,7 @@ export type SessionFsSetProviderConventions =
703
852
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
704
853
  * via the `definition` "SessionFsSqliteQueryType".
705
854
  */
855
+ /** @experimental */
706
856
  export type SessionFsSqliteQueryType =
707
857
  /** Execute DDL or multi-statement SQL without returning rows. */
708
858
  "exec"
@@ -940,6 +1090,34 @@ export type UIExitPlanModeAction =
940
1090
  | "autopilot"
941
1091
  /** Exit plan mode and continue in autopilot mode with parallel subagent execution. */
942
1092
  | "autopilot_fleet";
1093
+ /**
1094
+ * Type of change represented by this file diff.
1095
+ *
1096
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1097
+ * via the `definition` "WorkspaceDiffFileChangeType".
1098
+ */
1099
+ /** @experimental */
1100
+ export type WorkspaceDiffFileChangeType =
1101
+ /** The file was added. */
1102
+ "added"
1103
+ /** The file was modified. */
1104
+ | "modified"
1105
+ /** The file was deleted. */
1106
+ | "deleted"
1107
+ /** The file was renamed. */
1108
+ | "renamed";
1109
+ /**
1110
+ * Diff mode requested by the client.
1111
+ *
1112
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1113
+ * via the `definition` "WorkspaceDiffMode".
1114
+ */
1115
+ /** @experimental */
1116
+ export type WorkspaceDiffMode =
1117
+ /** Return staged, unstaged, and untracked working tree changes. */
1118
+ "unstaged"
1119
+ /** Return changes compared with the default branch. */
1120
+ | "branch";
943
1121
  /**
944
1122
  * Allowed values for the `WorkspacesWorkspaceDetailsHostType` enumeration.
945
1123
  *
@@ -1095,11 +1273,11 @@ export interface AgentInfo {
1095
1273
  model?: string;
1096
1274
  /**
1097
1275
  * MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema.
1276
+ *
1277
+ * @experimental
1098
1278
  */
1099
1279
  mcpServers?: {
1100
- [k: string]: {
1101
- [k: string]: unknown | undefined;
1102
- } | undefined;
1280
+ [k: string]: unknown | undefined;
1103
1281
  };
1104
1282
  /**
1105
1283
  * Skill names preloaded into this agent's context. Omitted means none.
@@ -1469,274 +1647,621 @@ export interface GhCliAuthInfo {
1469
1647
  copilotUser?: CopilotUserResponse;
1470
1648
  }
1471
1649
  /**
1472
- * Slash commands available in the session, after applying any include/exclude filters.
1473
- *
1474
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1475
- * via the `definition` "CommandList".
1476
- */
1477
- /** @experimental */
1478
- export interface CommandList {
1479
- /**
1480
- * Commands available in this session
1481
- */
1482
- commands: SlashCommandInfo[];
1483
- }
1484
- /**
1485
- * Schema for the `SlashCommandInfo` type.
1650
+ * Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool.
1486
1651
  *
1487
1652
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1488
- * via the `definition` "SlashCommandInfo".
1653
+ * via the `definition` "CanvasAction".
1489
1654
  */
1490
1655
  /** @experimental */
1491
- export interface SlashCommandInfo {
1656
+ export interface CanvasAction {
1492
1657
  /**
1493
- * Canonical command name without a leading slash
1658
+ * Action name exposed by the canvas provider
1494
1659
  */
1495
1660
  name: string;
1496
1661
  /**
1497
- * Canonical aliases without leading slashes
1498
- */
1499
- aliases?: string[];
1500
- /**
1501
- * Human-readable command description
1502
- */
1503
- description: string;
1504
- kind: SlashCommandKind;
1505
- input?: SlashCommandInput;
1506
- /**
1507
- * Whether the command may run while an agent turn is active
1508
- */
1509
- allowDuringAgentExecution: boolean;
1510
- /**
1511
- * Whether the command is experimental
1662
+ * Description of the action
1512
1663
  */
1513
- experimental?: boolean;
1664
+ description?: string;
1665
+ inputSchema?: CanvasJsonSchema;
1514
1666
  }
1515
1667
  /**
1516
- * Optional unstructured input hint
1668
+ * JSON Schema for canvas open input
1517
1669
  *
1518
1670
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1519
- * via the `definition` "SlashCommandInput".
1671
+ * via the `definition` "CanvasJsonSchema".
1520
1672
  */
1521
1673
  /** @experimental */
1522
- export interface SlashCommandInput {
1523
- /**
1524
- * Hint to display when command input has not been provided
1525
- */
1526
- hint: string;
1527
- /**
1528
- * When true, the command requires non-empty input; clients should render the input hint as required
1529
- */
1530
- required?: boolean;
1531
- completion?: SlashCommandInputCompletion;
1532
- /**
1533
- * When true, clients should pass the full text after the command name as a single argument rather than splitting on whitespace
1534
- */
1535
- preserveMultilineInput?: boolean;
1674
+ export interface CanvasJsonSchema {
1675
+ [k: string]: unknown | undefined;
1536
1676
  }
1537
1677
  /**
1538
- * Pending command request ID and an optional error if the client handler failed.
1678
+ * Canvas close parameters.
1539
1679
  *
1540
1680
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1541
- * via the `definition` "CommandsHandlePendingCommandRequest".
1681
+ * via the `definition` "CanvasCloseRequest".
1542
1682
  */
1543
1683
  /** @experimental */
1544
- export interface CommandsHandlePendingCommandRequest {
1545
- /**
1546
- * Request ID from the command invocation event
1547
- */
1548
- requestId: string;
1684
+ export interface CanvasCloseRequest {
1549
1685
  /**
1550
- * Error message if the command handler failed
1686
+ * Open canvas instance identifier
1551
1687
  */
1552
- error?: string;
1688
+ instanceId: string;
1553
1689
  }
1554
1690
  /**
1555
- * Indicates whether the pending client-handled command was completed successfully.
1691
+ * Host context supplied by the runtime.
1556
1692
  *
1557
1693
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1558
- * via the `definition` "CommandsHandlePendingCommandResult".
1694
+ * via the `definition` "CanvasHostContext".
1559
1695
  */
1560
1696
  /** @experimental */
1561
- export interface CommandsHandlePendingCommandResult {
1562
- /**
1563
- * Whether the command was handled successfully
1564
- */
1565
- success: boolean;
1697
+ export interface CanvasHostContext {
1698
+ capabilities?: CanvasHostContextCapabilities;
1566
1699
  }
1567
1700
  /**
1568
- * Slash command name and optional raw input string to invoke.
1701
+ * Host capabilities
1569
1702
  *
1570
1703
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1571
- * via the `definition` "CommandsInvokeRequest".
1704
+ * via the `definition` "CanvasHostContextCapabilities".
1572
1705
  */
1573
1706
  /** @experimental */
1574
- export interface CommandsInvokeRequest {
1575
- /**
1576
- * Command name. Leading slashes are stripped and the name is matched case-insensitively.
1577
- */
1578
- name: string;
1707
+ export interface CanvasHostContextCapabilities {
1579
1708
  /**
1580
- * Raw input after the command name
1709
+ * Whether canvas rendering is supported
1581
1710
  */
1582
- input?: string;
1711
+ canvases?: boolean;
1583
1712
  }
1584
1713
  /**
1585
- * Optional filters controlling which command sources to include in the listing.
1714
+ * Canvas action invocation parameters.
1586
1715
  *
1587
1716
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1588
- * via the `definition` "CommandsListRequest".
1717
+ * via the `definition` "CanvasInvokeActionRequest".
1589
1718
  */
1590
1719
  /** @experimental */
1591
- export interface CommandsListRequest {
1720
+ export interface CanvasInvokeActionRequest {
1592
1721
  /**
1593
- * Include runtime built-in commands
1722
+ * Open canvas instance identifier
1594
1723
  */
1595
- includeBuiltins?: boolean;
1724
+ instanceId: string;
1596
1725
  /**
1597
- * Include enabled user-invocable skills and commands
1726
+ * Action name to invoke
1598
1727
  */
1599
- includeSkills?: boolean;
1728
+ actionName: string;
1600
1729
  /**
1601
- * Include commands registered by protocol clients, including SDK clients and extensions
1730
+ * Action input
1602
1731
  */
1603
- includeClientCommands?: boolean;
1732
+ input?: {
1733
+ [k: string]: unknown | undefined;
1734
+ };
1604
1735
  }
1605
1736
  /**
1606
- * Queued-command request ID and the result indicating whether the host executed it (and whether to stop processing further queued commands).
1737
+ * Provider-supplied action result.
1607
1738
  *
1608
1739
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1609
- * via the `definition` "CommandsRespondToQueuedCommandRequest".
1740
+ * via the `definition` "CanvasInvokeActionResult".
1610
1741
  */
1611
1742
  /** @experimental */
1612
- export interface CommandsRespondToQueuedCommandRequest {
1613
- /**
1614
- * Request ID from the `command.queued` event the host is responding to.
1615
- */
1616
- requestId: string;
1617
- result: QueuedCommandResult;
1743
+ export interface CanvasInvokeActionResult {
1744
+ [k: string]: unknown | undefined;
1618
1745
  }
1619
1746
  /**
1620
- * Schema for the `QueuedCommandHandled` type.
1747
+ * Declared canvases available in this session.
1621
1748
  *
1622
1749
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1623
- * via the `definition` "QueuedCommandHandled".
1750
+ * via the `definition` "CanvasList".
1624
1751
  */
1625
1752
  /** @experimental */
1626
- export interface QueuedCommandHandled {
1627
- /**
1628
- * The host actually executed the queued command.
1629
- */
1630
- handled: true;
1753
+ export interface CanvasList {
1631
1754
  /**
1632
- * When true, the runtime will not process subsequent queued commands until a new request comes in.
1755
+ * Declared canvases available in this session
1633
1756
  */
1634
- stopProcessingQueue?: boolean;
1757
+ canvases: DiscoveredCanvas[];
1635
1758
  }
1636
1759
  /**
1637
- * Schema for the `QueuedCommandNotHandled` type.
1760
+ * Canvas available in the current session.
1638
1761
  *
1639
1762
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1640
- * via the `definition` "QueuedCommandNotHandled".
1763
+ * via the `definition` "DiscoveredCanvas".
1641
1764
  */
1642
1765
  /** @experimental */
1643
- export interface QueuedCommandNotHandled {
1766
+ export interface DiscoveredCanvas {
1644
1767
  /**
1645
- * The host did not execute the queued command. Unblocks the queue without claiming the command was processed (e.g. when the handler threw before completing).
1768
+ * Human-readable canvas name
1646
1769
  */
1647
- handled: false;
1770
+ displayName: string;
1771
+ /**
1772
+ * Short, single-sentence description shown to the agent in canvas catalogs.
1773
+ */
1774
+ description: string;
1775
+ inputSchema?: CanvasJsonSchema;
1776
+ /**
1777
+ * Actions the agent or host may invoke on an open instance
1778
+ */
1779
+ actions?: CanvasAction[];
1780
+ /**
1781
+ * Owning provider identifier
1782
+ */
1783
+ extensionId: string;
1784
+ /**
1785
+ * Owning extension display name, when available
1786
+ */
1787
+ extensionName?: string;
1788
+ /**
1789
+ * Provider-local canvas identifier
1790
+ */
1791
+ canvasId: string;
1648
1792
  }
1649
1793
  /**
1650
- * Indicates whether the queued-command response was matched to a pending request.
1794
+ * Live open-canvas snapshot.
1651
1795
  *
1652
1796
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1653
- * via the `definition` "CommandsRespondToQueuedCommandResult".
1797
+ * via the `definition` "CanvasListOpenResult".
1654
1798
  */
1655
1799
  /** @experimental */
1656
- export interface CommandsRespondToQueuedCommandResult {
1800
+ export interface CanvasListOpenResult {
1657
1801
  /**
1658
- * Whether a pending queued command with the given request ID was found and resolved. False when the request was already resolved, cancelled, or unknown.
1802
+ * Currently open canvas instances
1659
1803
  */
1660
- success: boolean;
1804
+ openCanvases: OpenCanvasInstance[];
1661
1805
  }
1662
1806
  /**
1663
- * Metadata for a connected remote session.
1807
+ * Open canvas instance snapshot.
1664
1808
  *
1665
1809
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1666
- * via the `definition` "ConnectedRemoteSessionMetadata".
1810
+ * via the `definition` "OpenCanvasInstance".
1667
1811
  */
1668
1812
  /** @experimental */
1669
- export interface ConnectedRemoteSessionMetadata {
1813
+ export interface OpenCanvasInstance {
1670
1814
  /**
1671
- * SDK session ID for the connected remote session.
1815
+ * Stable caller-supplied canvas instance identifier
1672
1816
  */
1673
- sessionId: string;
1817
+ instanceId: string;
1674
1818
  /**
1675
- * Optional friendly session name.
1819
+ * Owning provider identifier
1676
1820
  */
1677
- name?: string;
1821
+ extensionId: string;
1678
1822
  /**
1679
- * Optional session summary.
1823
+ * Owning extension display name, when available
1680
1824
  */
1681
- summary?: string;
1825
+ extensionName?: string;
1682
1826
  /**
1683
- * Session start time as an ISO 8601 string.
1827
+ * Provider-local canvas identifier
1684
1828
  */
1685
- startTime: string;
1829
+ canvasId: string;
1686
1830
  /**
1687
- * Last session update time as an ISO 8601 string.
1831
+ * Rendered title
1688
1832
  */
1689
- modifiedTime: string;
1690
- repository: ConnectedRemoteSessionMetadataRepository;
1833
+ title?: string;
1691
1834
  /**
1692
- * Pull request number associated with the session.
1835
+ * Provider-supplied status text
1693
1836
  */
1694
- pullRequestNumber?: number;
1837
+ status?: string;
1695
1838
  /**
1696
- * Original remote resource identifier.
1839
+ * URL for web-rendered canvases
1697
1840
  */
1698
- resourceId?: string;
1699
- kind: ConnectedRemoteSessionMetadataKind;
1841
+ url?: string;
1700
1842
  /**
1701
- * Remote session staleness deadline as an ISO 8601 string.
1843
+ * Input supplied when the instance was opened
1702
1844
  */
1703
- staleAt?: string;
1845
+ input?: {
1846
+ [k: string]: unknown | undefined;
1847
+ };
1704
1848
  /**
1705
- * Remote session state returned by the backing service.
1849
+ * Whether this snapshot came from an idempotent reopen
1706
1850
  */
1707
- state?: string;
1851
+ reopen: boolean;
1852
+ availability: CanvasInstanceAvailability;
1708
1853
  }
1709
1854
  /**
1710
- * Repository associated with the connected remote session.
1855
+ * Canvas open parameters.
1711
1856
  *
1712
1857
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1713
- * via the `definition` "ConnectedRemoteSessionMetadataRepository".
1858
+ * via the `definition` "CanvasOpenRequest".
1714
1859
  */
1715
1860
  /** @experimental */
1716
- export interface ConnectedRemoteSessionMetadataRepository {
1861
+ export interface CanvasOpenRequest {
1717
1862
  /**
1718
- * Repository owner or organization login.
1863
+ * Owning provider identifier. Optional when the canvasId is unique across providers; required to disambiguate when multiple providers register the same canvasId.
1719
1864
  */
1720
- owner: string;
1865
+ extensionId?: string;
1721
1866
  /**
1722
- * Repository name.
1867
+ * Provider-local canvas identifier
1723
1868
  */
1724
- name: string;
1869
+ canvasId: string;
1725
1870
  /**
1726
- * Branch associated with the remote session.
1871
+ * Caller-supplied stable instance identifier
1727
1872
  */
1728
- branch: string;
1873
+ instanceId: string;
1874
+ /**
1875
+ * Canvas open input
1876
+ */
1877
+ input?: {
1878
+ [k: string]: unknown | undefined;
1879
+ };
1729
1880
  }
1730
1881
  /**
1731
- * Remote session connection parameters.
1882
+ * Canvas close parameters sent to the provider.
1732
1883
  *
1733
1884
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1734
- * via the `definition` "ConnectRemoteSessionParams".
1885
+ * via the `definition` "CanvasProviderCloseRequest".
1735
1886
  */
1736
1887
  /** @experimental */
1737
- export interface ConnectRemoteSessionParams {
1888
+ export interface CanvasProviderCloseRequest {
1738
1889
  /**
1739
- * Session ID to connect to.
1890
+ * Target session identifier
1891
+ */
1892
+ sessionId: string;
1893
+ /**
1894
+ * Owning provider identifier
1895
+ */
1896
+ extensionId: string;
1897
+ /**
1898
+ * Provider-local canvas identifier
1899
+ */
1900
+ canvasId: string;
1901
+ /**
1902
+ * Canvas instance identifier
1903
+ */
1904
+ instanceId: string;
1905
+ host?: CanvasHostContext;
1906
+ }
1907
+ /**
1908
+ * Canvas action invocation parameters sent to the provider.
1909
+ *
1910
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1911
+ * via the `definition` "CanvasProviderInvokeActionRequest".
1912
+ */
1913
+ /** @experimental */
1914
+ export interface CanvasProviderInvokeActionRequest {
1915
+ /**
1916
+ * Target session identifier
1917
+ */
1918
+ sessionId: string;
1919
+ /**
1920
+ * Owning provider identifier
1921
+ */
1922
+ extensionId: string;
1923
+ /**
1924
+ * Provider-local canvas identifier
1925
+ */
1926
+ canvasId: string;
1927
+ /**
1928
+ * Canvas instance identifier
1929
+ */
1930
+ instanceId: string;
1931
+ /**
1932
+ * Action name to invoke
1933
+ */
1934
+ actionName: string;
1935
+ /**
1936
+ * Action input
1937
+ */
1938
+ input?: {
1939
+ [k: string]: unknown | undefined;
1940
+ };
1941
+ host?: CanvasHostContext;
1942
+ }
1943
+ /**
1944
+ * Canvas open parameters sent to the provider.
1945
+ *
1946
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1947
+ * via the `definition` "CanvasProviderOpenRequest".
1948
+ */
1949
+ /** @experimental */
1950
+ export interface CanvasProviderOpenRequest {
1951
+ /**
1952
+ * Target session identifier
1953
+ */
1954
+ sessionId: string;
1955
+ /**
1956
+ * Owning provider identifier
1957
+ */
1958
+ extensionId: string;
1959
+ /**
1960
+ * Provider-local canvas identifier
1961
+ */
1962
+ canvasId: string;
1963
+ /**
1964
+ * Stable caller-supplied canvas instance identifier
1965
+ */
1966
+ instanceId: string;
1967
+ /**
1968
+ * Canvas open input
1969
+ */
1970
+ input?: {
1971
+ [k: string]: unknown | undefined;
1972
+ };
1973
+ host?: CanvasHostContext;
1974
+ }
1975
+ /**
1976
+ * Canvas open result returned by the provider.
1977
+ *
1978
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
1979
+ * via the `definition` "CanvasProviderOpenResult".
1980
+ */
1981
+ /** @experimental */
1982
+ export interface CanvasProviderOpenResult {
1983
+ /**
1984
+ * URL for web-rendered canvases
1985
+ */
1986
+ url?: string;
1987
+ /**
1988
+ * Provider-supplied title
1989
+ */
1990
+ title?: string;
1991
+ /**
1992
+ * Provider-supplied status text
1993
+ */
1994
+ status?: string;
1995
+ }
1996
+ /**
1997
+ * Slash commands available in the session, after applying any include/exclude filters.
1998
+ *
1999
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2000
+ * via the `definition` "CommandList".
2001
+ */
2002
+ /** @experimental */
2003
+ export interface CommandList {
2004
+ /**
2005
+ * Commands available in this session
2006
+ */
2007
+ commands: SlashCommandInfo[];
2008
+ }
2009
+ /**
2010
+ * Schema for the `SlashCommandInfo` type.
2011
+ *
2012
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2013
+ * via the `definition` "SlashCommandInfo".
2014
+ */
2015
+ /** @experimental */
2016
+ export interface SlashCommandInfo {
2017
+ /**
2018
+ * Canonical command name without a leading slash
2019
+ */
2020
+ name: string;
2021
+ /**
2022
+ * Canonical aliases without leading slashes
2023
+ */
2024
+ aliases?: string[];
2025
+ /**
2026
+ * Human-readable command description
2027
+ */
2028
+ description: string;
2029
+ kind: SlashCommandKind;
2030
+ input?: SlashCommandInput;
2031
+ /**
2032
+ * Whether the command may run while an agent turn is active
2033
+ */
2034
+ allowDuringAgentExecution: boolean;
2035
+ /**
2036
+ * Whether the command is experimental
2037
+ */
2038
+ experimental?: boolean;
2039
+ }
2040
+ /**
2041
+ * Optional unstructured input hint
2042
+ *
2043
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2044
+ * via the `definition` "SlashCommandInput".
2045
+ */
2046
+ /** @experimental */
2047
+ export interface SlashCommandInput {
2048
+ /**
2049
+ * Hint to display when command input has not been provided
2050
+ */
2051
+ hint: string;
2052
+ /**
2053
+ * When true, the command requires non-empty input; clients should render the input hint as required
2054
+ */
2055
+ required?: boolean;
2056
+ completion?: SlashCommandInputCompletion;
2057
+ /**
2058
+ * When true, clients should pass the full text after the command name as a single argument rather than splitting on whitespace
2059
+ */
2060
+ preserveMultilineInput?: boolean;
2061
+ }
2062
+ /**
2063
+ * Pending command request ID and an optional error if the client handler failed.
2064
+ *
2065
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2066
+ * via the `definition` "CommandsHandlePendingCommandRequest".
2067
+ */
2068
+ /** @experimental */
2069
+ export interface CommandsHandlePendingCommandRequest {
2070
+ /**
2071
+ * Request ID from the command invocation event
2072
+ */
2073
+ requestId: string;
2074
+ /**
2075
+ * Error message if the command handler failed
2076
+ */
2077
+ error?: string;
2078
+ }
2079
+ /**
2080
+ * Indicates whether the pending client-handled command was completed successfully.
2081
+ *
2082
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2083
+ * via the `definition` "CommandsHandlePendingCommandResult".
2084
+ */
2085
+ /** @experimental */
2086
+ export interface CommandsHandlePendingCommandResult {
2087
+ /**
2088
+ * Whether the command was handled successfully
2089
+ */
2090
+ success: boolean;
2091
+ }
2092
+ /**
2093
+ * Slash command name and optional raw input string to invoke.
2094
+ *
2095
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2096
+ * via the `definition` "CommandsInvokeRequest".
2097
+ */
2098
+ /** @experimental */
2099
+ export interface CommandsInvokeRequest {
2100
+ /**
2101
+ * Command name. Leading slashes are stripped and the name is matched case-insensitively.
2102
+ */
2103
+ name: string;
2104
+ /**
2105
+ * Raw input after the command name
2106
+ */
2107
+ input?: string;
2108
+ }
2109
+ /**
2110
+ * Optional filters controlling which command sources to include in the listing.
2111
+ *
2112
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2113
+ * via the `definition` "CommandsListRequest".
2114
+ */
2115
+ /** @experimental */
2116
+ export interface CommandsListRequest {
2117
+ /**
2118
+ * Include runtime built-in commands
2119
+ */
2120
+ includeBuiltins?: boolean;
2121
+ /**
2122
+ * Include enabled user-invocable skills and commands
2123
+ */
2124
+ includeSkills?: boolean;
2125
+ /**
2126
+ * Include commands registered by protocol clients, including SDK clients and extensions
2127
+ */
2128
+ includeClientCommands?: boolean;
2129
+ }
2130
+ /**
2131
+ * Queued-command request ID and the result indicating whether the host executed it (and whether to stop processing further queued commands).
2132
+ *
2133
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2134
+ * via the `definition` "CommandsRespondToQueuedCommandRequest".
2135
+ */
2136
+ /** @experimental */
2137
+ export interface CommandsRespondToQueuedCommandRequest {
2138
+ /**
2139
+ * Request ID from the `command.queued` event the host is responding to.
2140
+ */
2141
+ requestId: string;
2142
+ result: QueuedCommandResult;
2143
+ }
2144
+ /**
2145
+ * Schema for the `QueuedCommandHandled` type.
2146
+ *
2147
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2148
+ * via the `definition` "QueuedCommandHandled".
2149
+ */
2150
+ /** @experimental */
2151
+ export interface QueuedCommandHandled {
2152
+ /**
2153
+ * The host actually executed the queued command.
2154
+ */
2155
+ handled: true;
2156
+ /**
2157
+ * When true, the runtime will not process subsequent queued commands until a new request comes in.
2158
+ */
2159
+ stopProcessingQueue?: boolean;
2160
+ }
2161
+ /**
2162
+ * Schema for the `QueuedCommandNotHandled` type.
2163
+ *
2164
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2165
+ * via the `definition` "QueuedCommandNotHandled".
2166
+ */
2167
+ /** @experimental */
2168
+ export interface QueuedCommandNotHandled {
2169
+ /**
2170
+ * The host did not execute the queued command. Unblocks the queue without claiming the command was processed (e.g. when the handler threw before completing).
2171
+ */
2172
+ handled: false;
2173
+ }
2174
+ /**
2175
+ * Indicates whether the queued-command response was matched to a pending request.
2176
+ *
2177
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2178
+ * via the `definition` "CommandsRespondToQueuedCommandResult".
2179
+ */
2180
+ /** @experimental */
2181
+ export interface CommandsRespondToQueuedCommandResult {
2182
+ /**
2183
+ * Whether a pending queued command with the given request ID was found and resolved. False when the request was already resolved, cancelled, or unknown.
2184
+ */
2185
+ success: boolean;
2186
+ }
2187
+ /**
2188
+ * Metadata for a connected remote session.
2189
+ *
2190
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2191
+ * via the `definition` "ConnectedRemoteSessionMetadata".
2192
+ */
2193
+ /** @experimental */
2194
+ export interface ConnectedRemoteSessionMetadata {
2195
+ /**
2196
+ * SDK session ID for the connected remote session.
2197
+ */
2198
+ sessionId: string;
2199
+ /**
2200
+ * Optional friendly session name.
2201
+ */
2202
+ name?: string;
2203
+ /**
2204
+ * Optional session summary.
2205
+ */
2206
+ summary?: string;
2207
+ /**
2208
+ * Session start time as an ISO 8601 string.
2209
+ */
2210
+ startTime: string;
2211
+ /**
2212
+ * Last session update time as an ISO 8601 string.
2213
+ */
2214
+ modifiedTime: string;
2215
+ repository: ConnectedRemoteSessionMetadataRepository;
2216
+ /**
2217
+ * Pull request number associated with the session.
2218
+ */
2219
+ pullRequestNumber?: number;
2220
+ /**
2221
+ * Original remote resource identifier.
2222
+ */
2223
+ resourceId?: string;
2224
+ kind: ConnectedRemoteSessionMetadataKind;
2225
+ /**
2226
+ * Remote session staleness deadline as an ISO 8601 string.
2227
+ */
2228
+ staleAt?: string;
2229
+ /**
2230
+ * Remote session state returned by the backing service.
2231
+ */
2232
+ state?: string;
2233
+ }
2234
+ /**
2235
+ * Repository associated with the connected remote session.
2236
+ *
2237
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2238
+ * via the `definition` "ConnectedRemoteSessionMetadataRepository".
2239
+ */
2240
+ /** @experimental */
2241
+ export interface ConnectedRemoteSessionMetadataRepository {
2242
+ /**
2243
+ * Repository owner or organization login.
2244
+ */
2245
+ owner: string;
2246
+ /**
2247
+ * Repository name.
2248
+ */
2249
+ name: string;
2250
+ /**
2251
+ * Branch associated with the remote session.
2252
+ */
2253
+ branch: string;
2254
+ }
2255
+ /**
2256
+ * Remote session connection parameters.
2257
+ *
2258
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2259
+ * via the `definition` "ConnectRemoteSessionParams".
2260
+ */
2261
+ /** @experimental */
2262
+ export interface ConnectRemoteSessionParams {
2263
+ /**
2264
+ * Session ID to connect to.
1740
2265
  */
1741
2266
  sessionId: string;
1742
2267
  }
@@ -1992,9 +2517,7 @@ export interface ExternalToolTextResultForLlm {
1992
2517
  * Optional tool-specific telemetry
1993
2518
  */
1994
2519
  toolTelemetry?: {
1995
- [k: string]: {
1996
- [k: string]: unknown | undefined;
1997
- } | undefined;
2520
+ [k: string]: unknown | undefined;
1998
2521
  };
1999
2522
  /**
2000
2523
  * Base64-encoded binary results returned to the model
@@ -2027,6 +2550,12 @@ export interface ExternalToolTextResultForLlmBinaryResultsForLlm {
2027
2550
  * Human-readable description of the binary data
2028
2551
  */
2029
2552
  description?: string;
2553
+ /**
2554
+ * Optional metadata from the producing tool.
2555
+ */
2556
+ metadata?: {
2557
+ [k: string]: unknown | undefined;
2558
+ };
2030
2559
  }
2031
2560
  /**
2032
2561
  * Plain text content block
@@ -2489,134 +3018,402 @@ export interface InstalledPluginSourceUrl {
2489
3018
  path?: string;
2490
3019
  }
2491
3020
  /**
2492
- * Schema for the `InstalledPluginSourceLocal` type.
3021
+ * Schema for the `InstalledPluginSourceLocal` type.
3022
+ *
3023
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3024
+ * via the `definition` "InstalledPluginSourceLocal".
3025
+ */
3026
+ /** @experimental */
3027
+ export interface InstalledPluginSourceLocal {
3028
+ /**
3029
+ * Constant value. Always "local".
3030
+ */
3031
+ source: "local";
3032
+ path: string;
3033
+ }
3034
+ /**
3035
+ * Instruction sources loaded for the session, in merge order.
3036
+ *
3037
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3038
+ * via the `definition` "InstructionsGetSourcesResult".
3039
+ */
3040
+ /** @experimental */
3041
+ export interface InstructionsGetSourcesResult {
3042
+ /**
3043
+ * Instruction sources for the session
3044
+ */
3045
+ sources: InstructionsSources[];
3046
+ }
3047
+ /**
3048
+ * Schema for the `InstructionsSources` type.
3049
+ *
3050
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3051
+ * via the `definition` "InstructionsSources".
3052
+ */
3053
+ /** @experimental */
3054
+ export interface InstructionsSources {
3055
+ /**
3056
+ * Unique identifier for this source (used for toggling)
3057
+ */
3058
+ id: string;
3059
+ /**
3060
+ * Human-readable label
3061
+ */
3062
+ label: string;
3063
+ /**
3064
+ * File path relative to repo or absolute for home
3065
+ */
3066
+ sourcePath: string;
3067
+ /**
3068
+ * Raw content of the instruction file
3069
+ */
3070
+ content: string;
3071
+ type: InstructionsSourcesType;
3072
+ location: InstructionsSourcesLocation;
3073
+ /**
3074
+ * Glob pattern(s) from frontmatter — when set, this instruction applies only to matching files
3075
+ */
3076
+ applyTo?: string[];
3077
+ /**
3078
+ * Short description (body after frontmatter) for use in instruction tables
3079
+ */
3080
+ description?: string;
3081
+ /**
3082
+ * When true, this source starts disabled and must be toggled on by the user
3083
+ */
3084
+ defaultDisabled?: boolean;
3085
+ }
3086
+ /**
3087
+ * Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip.
3088
+ *
3089
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3090
+ * via the `definition` "LogRequest".
3091
+ */
3092
+ /** @experimental */
3093
+ export interface LogRequest {
3094
+ /**
3095
+ * Human-readable message
3096
+ */
3097
+ message: string;
3098
+ level?: SessionLogLevel;
3099
+ /**
3100
+ * Domain category for this log entry (e.g., "mcp", "subscription", "policy", "model"). Maps to `infoType`/`warningType`/`errorType` on the emitted event. Defaults to "notification".
3101
+ */
3102
+ type?: string;
3103
+ /**
3104
+ * When true, the message is transient and not persisted to the session event log on disk
3105
+ */
3106
+ ephemeral?: boolean;
3107
+ /**
3108
+ * Optional URL the user can open in their browser for more details
3109
+ */
3110
+ url?: string;
3111
+ /**
3112
+ * Optional actionable tip displayed alongside the message. Only honored on `level: "info"`.
3113
+ */
3114
+ tip?: string;
3115
+ }
3116
+ /**
3117
+ * Identifier of the session event that was emitted for the log message.
3118
+ *
3119
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3120
+ * via the `definition` "LogResult".
3121
+ */
3122
+ /** @experimental */
3123
+ export interface LogResult {
3124
+ /**
3125
+ * The unique identifier of the emitted session event
3126
+ */
3127
+ eventId: string;
3128
+ }
3129
+ /**
3130
+ * Parameters for (re)loading the merged LSP configuration set.
3131
+ *
3132
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3133
+ * via the `definition` "LspInitializeRequest".
3134
+ */
3135
+ /** @experimental */
3136
+ export interface LspInitializeRequest {
3137
+ /**
3138
+ * Working directory used to load project-level LSP configs. Defaults to the session working directory when omitted.
3139
+ */
3140
+ workingDirectory?: string;
3141
+ /**
3142
+ * Git root used as the boundary when traversing for project-level LSP configs (supports monorepos).
3143
+ */
3144
+ gitRoot?: string;
3145
+ /**
3146
+ * Force re-initialization even when LSP configs were already loaded for the working directory.
3147
+ */
3148
+ force?: boolean;
3149
+ }
3150
+ /**
3151
+ * MCP server, tool name, and arguments to invoke from an MCP App view.
3152
+ *
3153
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3154
+ * via the `definition` "McpAppsCallToolRequest".
3155
+ */
3156
+ /** @experimental */
3157
+ export interface McpAppsCallToolRequest {
3158
+ /**
3159
+ * MCP server hosting the tool
3160
+ */
3161
+ serverName: string;
3162
+ /**
3163
+ * MCP tool name
3164
+ */
3165
+ toolName: string;
3166
+ /**
3167
+ * Tool arguments
3168
+ */
3169
+ arguments?: {
3170
+ [k: string]: unknown | undefined;
3171
+ };
3172
+ /**
3173
+ * **Required.** Server whose ui:// view issued the request. Per SEP-1865 ('callable by the app from this server only'), the call is rejected when this differs from `serverName`, and rejected outright when missing.
3174
+ */
3175
+ originServerName: string;
3176
+ }
3177
+ /**
3178
+ * Capability negotiation snapshot
3179
+ *
3180
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3181
+ * via the `definition` "McpAppsDiagnoseCapability".
3182
+ */
3183
+ /** @experimental */
3184
+ export interface McpAppsDiagnoseCapability {
3185
+ /**
3186
+ * Whether the session has the `mcp-apps` capability
3187
+ */
3188
+ sessionHasMcpApps: boolean;
3189
+ /**
3190
+ * Whether the MCP_APPS feature flag (or COPILOT_MCP_APPS env override) is on
3191
+ */
3192
+ featureFlagEnabled: boolean;
3193
+ /**
3194
+ * Whether the runtime advertises `extensions.io.modelcontextprotocol/ui` to MCP servers
3195
+ */
3196
+ advertised: boolean;
3197
+ }
3198
+ /**
3199
+ * MCP server to diagnose MCP Apps wiring for.
3200
+ *
3201
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3202
+ * via the `definition` "McpAppsDiagnoseRequest".
3203
+ */
3204
+ /** @experimental */
3205
+ export interface McpAppsDiagnoseRequest {
3206
+ /**
3207
+ * MCP server to probe
3208
+ */
3209
+ serverName: string;
3210
+ }
3211
+ /**
3212
+ * Diagnostic snapshot of MCP Apps wiring for the named server.
3213
+ *
3214
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3215
+ * via the `definition` "McpAppsDiagnoseResult".
3216
+ */
3217
+ /** @experimental */
3218
+ export interface McpAppsDiagnoseResult {
3219
+ capability: McpAppsDiagnoseCapability;
3220
+ server: McpAppsDiagnoseServer;
3221
+ }
3222
+ /**
3223
+ * What the server returned for this session
3224
+ *
3225
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3226
+ * via the `definition` "McpAppsDiagnoseServer".
3227
+ */
3228
+ /** @experimental */
3229
+ export interface McpAppsDiagnoseServer {
3230
+ /**
3231
+ * Whether the named server is currently connected
3232
+ */
3233
+ connected: boolean;
3234
+ /**
3235
+ * Total tools returned by the server's tools/list
3236
+ */
3237
+ toolCount: number;
3238
+ /**
3239
+ * Tools whose `_meta.ui` is populated (resourceUri and/or visibility set)
3240
+ */
3241
+ toolsWithUiMeta: number;
3242
+ /**
3243
+ * Up to 5 tool names with `_meta.ui` for quick inspection
3244
+ */
3245
+ sampleToolNames: string[];
3246
+ }
3247
+ /**
3248
+ * Current host context advertised to MCP App guests.
3249
+ *
3250
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3251
+ * via the `definition` "McpAppsHostContext".
3252
+ */
3253
+ /** @experimental */
3254
+ export interface McpAppsHostContext {
3255
+ context: McpAppsHostContextDetails;
3256
+ }
3257
+ /**
3258
+ * Current host context
3259
+ *
3260
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3261
+ * via the `definition` "McpAppsHostContextDetails".
3262
+ */
3263
+ /** @experimental */
3264
+ export interface McpAppsHostContextDetails {
3265
+ theme?: McpAppsHostContextDetailsTheme;
3266
+ /**
3267
+ * BCP-47 locale, e.g. 'en-US'
3268
+ */
3269
+ locale?: string;
3270
+ /**
3271
+ * IANA timezone, e.g. 'America/New_York'
3272
+ */
3273
+ timeZone?: string;
3274
+ displayMode?: McpAppsHostContextDetailsDisplayMode;
3275
+ /**
3276
+ * Display modes the host supports
3277
+ */
3278
+ availableDisplayModes?: McpAppsHostContextDetailsAvailableDisplayMode[];
3279
+ platform?: McpAppsHostContextDetailsPlatform;
3280
+ /**
3281
+ * Host application identifier
3282
+ */
3283
+ userAgent?: string;
3284
+ [k: string]: unknown | undefined;
3285
+ }
3286
+ /**
3287
+ * MCP server to list app-callable tools for.
2493
3288
  *
2494
3289
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2495
- * via the `definition` "InstalledPluginSourceLocal".
3290
+ * via the `definition` "McpAppsListToolsRequest".
2496
3291
  */
2497
3292
  /** @experimental */
2498
- export interface InstalledPluginSourceLocal {
3293
+ export interface McpAppsListToolsRequest {
2499
3294
  /**
2500
- * Constant value. Always "local".
3295
+ * MCP server hosting the app
2501
3296
  */
2502
- source: "local";
2503
- path: string;
3297
+ serverName: string;
3298
+ /**
3299
+ * **Required.** Server whose ui:// view issued the request. Per SEP-1865 ('callable by the app from this server only'), the call is rejected when this differs from `serverName`, and rejected outright when missing.
3300
+ */
3301
+ originServerName: string;
2504
3302
  }
2505
3303
  /**
2506
- * Instruction sources loaded for the session, in merge order.
3304
+ * App-callable tools from the named MCP server.
2507
3305
  *
2508
3306
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2509
- * via the `definition` "InstructionsGetSourcesResult".
3307
+ * via the `definition` "McpAppsListToolsResult".
2510
3308
  */
2511
3309
  /** @experimental */
2512
- export interface InstructionsGetSourcesResult {
3310
+ export interface McpAppsListToolsResult {
2513
3311
  /**
2514
- * Instruction sources for the session
3312
+ * App-callable tools from the server
2515
3313
  */
2516
- sources: InstructionsSources[];
3314
+ tools: {
3315
+ [k: string]: unknown | undefined;
3316
+ }[];
2517
3317
  }
2518
3318
  /**
2519
- * Schema for the `InstructionsSources` type.
3319
+ * MCP server and resource URI to fetch.
2520
3320
  *
2521
3321
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2522
- * via the `definition` "InstructionsSources".
3322
+ * via the `definition` "McpAppsReadResourceRequest".
2523
3323
  */
2524
3324
  /** @experimental */
2525
- export interface InstructionsSources {
2526
- /**
2527
- * Unique identifier for this source (used for toggling)
2528
- */
2529
- id: string;
2530
- /**
2531
- * Human-readable label
2532
- */
2533
- label: string;
2534
- /**
2535
- * File path relative to repo or absolute for home
2536
- */
2537
- sourcePath: string;
3325
+ export interface McpAppsReadResourceRequest {
2538
3326
  /**
2539
- * Raw content of the instruction file
2540
- */
2541
- content: string;
2542
- type: InstructionsSourcesType;
2543
- location: InstructionsSourcesLocation;
2544
- /**
2545
- * Glob pattern(s) from frontmatter — when set, this instruction applies only to matching files
3327
+ * Name of the MCP server hosting the resource
2546
3328
  */
2547
- applyTo?: string[];
3329
+ serverName: string;
2548
3330
  /**
2549
- * Short description (body after frontmatter) for use in instruction tables
3331
+ * Resource URI (typically ui://...)
2550
3332
  */
2551
- description?: string;
3333
+ uri: string;
3334
+ }
3335
+ /**
3336
+ * Resource contents returned by the MCP server.
3337
+ *
3338
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3339
+ * via the `definition` "McpAppsReadResourceResult".
3340
+ */
3341
+ /** @experimental */
3342
+ export interface McpAppsReadResourceResult {
2552
3343
  /**
2553
- * When true, this source starts disabled and must be toggled on by the user
3344
+ * Resource contents returned by the server
2554
3345
  */
2555
- defaultDisabled?: boolean;
3346
+ contents: McpAppsResourceContent[];
2556
3347
  }
2557
3348
  /**
2558
- * Message text, optional severity level, persistence flag, optional follow-up URL, and optional tip.
3349
+ * Schema for the `McpAppsResourceContent` type.
2559
3350
  *
2560
3351
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2561
- * via the `definition` "LogRequest".
3352
+ * via the `definition` "McpAppsResourceContent".
2562
3353
  */
2563
3354
  /** @experimental */
2564
- export interface LogRequest {
3355
+ export interface McpAppsResourceContent {
2565
3356
  /**
2566
- * Human-readable message
3357
+ * The resource URI (typically ui://...)
2567
3358
  */
2568
- message: string;
2569
- level?: SessionLogLevel;
3359
+ uri: string;
2570
3360
  /**
2571
- * Domain category for this log entry (e.g., "mcp", "subscription", "policy", "model"). Maps to `infoType`/`warningType`/`errorType` on the emitted event. Defaults to "notification".
3361
+ * MIME type of the content
2572
3362
  */
2573
- type?: string;
3363
+ mimeType?: string;
2574
3364
  /**
2575
- * When true, the message is transient and not persisted to the session event log on disk
3365
+ * Text content (e.g. HTML)
2576
3366
  */
2577
- ephemeral?: boolean;
3367
+ text?: string;
2578
3368
  /**
2579
- * Optional URL the user can open in their browser for more details
3369
+ * Base64-encoded binary content
2580
3370
  */
2581
- url?: string;
3371
+ blob?: string;
2582
3372
  /**
2583
- * Optional actionable tip displayed alongside the message. Only honored on `level: "info"`.
3373
+ * Resource-level metadata (CSP, permissions, etc.)
2584
3374
  */
2585
- tip?: string;
3375
+ _meta?: {
3376
+ [k: string]: unknown | undefined;
3377
+ };
2586
3378
  }
2587
3379
  /**
2588
- * Identifier of the session event that was emitted for the log message.
3380
+ * Host context advertised to MCP App guests
2589
3381
  *
2590
3382
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2591
- * via the `definition` "LogResult".
3383
+ * via the `definition` "McpAppsSetHostContextDetails".
2592
3384
  */
2593
3385
  /** @experimental */
2594
- export interface LogResult {
3386
+ export interface McpAppsSetHostContextDetails {
3387
+ theme?: McpAppsSetHostContextDetailsTheme;
2595
3388
  /**
2596
- * The unique identifier of the emitted session event
3389
+ * BCP-47 locale, e.g. 'en-US'
2597
3390
  */
2598
- eventId: string;
2599
- }
2600
- /**
2601
- * Parameters for (re)loading the merged LSP configuration set.
2602
- *
2603
- * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
2604
- * via the `definition` "LspInitializeRequest".
2605
- */
2606
- /** @experimental */
2607
- export interface LspInitializeRequest {
3391
+ locale?: string;
2608
3392
  /**
2609
- * Working directory used to load project-level LSP configs. Defaults to the session working directory when omitted.
3393
+ * IANA timezone, e.g. 'America/New_York'
2610
3394
  */
2611
- workingDirectory?: string;
3395
+ timeZone?: string;
3396
+ displayMode?: McpAppsSetHostContextDetailsDisplayMode;
2612
3397
  /**
2613
- * Git root used as the boundary when traversing for project-level LSP configs (supports monorepos).
3398
+ * Display modes the host supports
2614
3399
  */
2615
- gitRoot?: string;
3400
+ availableDisplayModes?: McpAppsSetHostContextDetailsAvailableDisplayMode[];
3401
+ platform?: McpAppsSetHostContextDetailsPlatform;
2616
3402
  /**
2617
- * Force re-initialization even when LSP configs were already loaded for the working directory.
3403
+ * Host application identifier
2618
3404
  */
2619
- force?: boolean;
3405
+ userAgent?: string;
3406
+ [k: string]: unknown | undefined;
3407
+ }
3408
+ /**
3409
+ * Host context to advertise to MCP App guests.
3410
+ *
3411
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
3412
+ * via the `definition` "McpAppsSetHostContextRequest".
3413
+ */
3414
+ /** @experimental */
3415
+ export interface McpAppsSetHostContextRequest {
3416
+ context: McpAppsSetHostContextDetails;
2620
3417
  }
2621
3418
  /**
2622
3419
  * The requestId previously passed to executeSampling that should be cancelled.
@@ -2677,6 +3474,8 @@ export interface McpServerConfigStdio {
2677
3474
  * Timeout in milliseconds for tool calls to this server.
2678
3475
  */
2679
3476
  timeout?: number;
3477
+ oidc?: McpServerConfigStdioOidc;
3478
+ auth?: McpServerConfigStdioAuth;
2680
3479
  /**
2681
3480
  * Executable command used to start the Stdio MCP server process.
2682
3481
  */
@@ -2717,6 +3516,8 @@ export interface McpServerConfigHttp {
2717
3516
  * Timeout in milliseconds for tool calls to this server.
2718
3517
  */
2719
3518
  timeout?: number;
3519
+ oidc?: McpServerConfigHttpOidc;
3520
+ auth?: McpServerConfigHttpAuth;
2720
3521
  /**
2721
3522
  * URL of the remote MCP server endpoint.
2722
3523
  */
@@ -2736,7 +3537,6 @@ export interface McpServerConfigHttp {
2736
3537
  */
2737
3538
  oauthPublicClient?: boolean;
2738
3539
  oauthGrantType?: McpServerConfigHttpOauthGrantType;
2739
- auth?: McpServerConfigHttpAuth;
2740
3540
  }
2741
3541
  /**
2742
3542
  * Additional authentication configuration for this server.
@@ -2749,6 +3549,7 @@ export interface McpServerConfigHttpAuth {
2749
3549
  * Fixed port for the OAuth redirect callback server.
2750
3550
  */
2751
3551
  redirectPort?: number;
3552
+ [k: string]: unknown | undefined;
2752
3553
  }
2753
3554
  /**
2754
3555
  * MCP server names to disable for new sessions.
@@ -3357,21 +4158,50 @@ export interface ModelBilling {
3357
4158
  */
3358
4159
  export interface ModelBillingTokenPrices {
3359
4160
  /**
3360
- * Price per billing batch of input tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)
4161
+ * AI Credits cost per billing batch of input tokens
3361
4162
  */
3362
4163
  inputPrice?: number;
3363
4164
  /**
3364
- * Price per billing batch of output tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)
4165
+ * AI Credits cost per billing batch of output tokens
3365
4166
  */
3366
4167
  outputPrice?: number;
3367
4168
  /**
3368
- * Price per billing batch of cached tokens in nano-AIUs (1 nano-AIU = 0.000000001 AIU, 1 AIU = $0.01 USD)
4169
+ * AI Credits cost per billing batch of cached tokens
3369
4170
  */
3370
4171
  cachePrice?: number;
3371
4172
  /**
3372
4173
  * Number of tokens per standard billing batch
3373
4174
  */
3374
4175
  batchSize?: number;
4176
+ /**
4177
+ * Maximum context window tokens for the default tier
4178
+ */
4179
+ contextMax?: number;
4180
+ longContext?: ModelBillingTokenPricesLongContext;
4181
+ }
4182
+ /**
4183
+ * Long context tier pricing (available for models with extended context windows)
4184
+ *
4185
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
4186
+ * via the `definition` "ModelBillingTokenPricesLongContext".
4187
+ */
4188
+ export interface ModelBillingTokenPricesLongContext {
4189
+ /**
4190
+ * AI Credits cost per billing batch of input tokens
4191
+ */
4192
+ inputPrice?: number;
4193
+ /**
4194
+ * AI Credits cost per billing batch of output tokens
4195
+ */
4196
+ outputPrice?: number;
4197
+ /**
4198
+ * AI Credits cost per billing batch of cached tokens
4199
+ */
4200
+ cachePrice?: number;
4201
+ /**
4202
+ * Maximum context window tokens for the long context tier
4203
+ */
4204
+ contextMax?: number;
3375
4205
  }
3376
4206
  /**
3377
4207
  * Override individual model capabilities resolved by the runtime
@@ -5426,12 +6256,6 @@ export interface SendRequest {
5426
6256
  * If set, the request will fail if the named tool is not available when this message is among the user messages at the start of the current exchange
5427
6257
  */
5428
6258
  requiredTool?: string;
5429
- /**
5430
- * Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`.
5431
- */
5432
- source?: {
5433
- [k: string]: unknown | undefined;
5434
- };
5435
6259
  agentMode?: SendAgentMode;
5436
6260
  /**
5437
6261
  * Custom HTTP headers to include in outbound model requests for this turn. Merged with session-level provider headers; per-turn headers augment and overwrite session-level headers with the same key.
@@ -5582,7 +6406,7 @@ export interface SessionContext {
5582
6406
  branch?: string;
5583
6407
  }
5584
6408
  /**
5585
- * The same metadata records, with summary and context fields backfilled where available.
6409
+ * The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted.
5586
6410
  *
5587
6411
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5588
6412
  * via the `definition` "SessionEnrichMetadataResult".
@@ -5590,7 +6414,7 @@ export interface SessionContext {
5590
6414
  /** @experimental */
5591
6415
  export interface SessionEnrichMetadataResult {
5592
6416
  /**
5593
- * Same records, with summary and context backfilled
6417
+ * Enriched records, with summary and context backfilled. Sessions confirmed empty and unnamed may be omitted.
5594
6418
  */
5595
6419
  sessions: SessionMetadata[];
5596
6420
  }
@@ -5638,6 +6462,7 @@ export interface SessionMetadata {
5638
6462
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5639
6463
  * via the `definition` "SessionFsAppendFileRequest".
5640
6464
  */
6465
+ /** @experimental */
5641
6466
  export interface SessionFsAppendFileRequest {
5642
6467
  /**
5643
6468
  * Target session identifier
@@ -5662,6 +6487,7 @@ export interface SessionFsAppendFileRequest {
5662
6487
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5663
6488
  * via the `definition` "SessionFsError".
5664
6489
  */
6490
+ /** @experimental */
5665
6491
  export interface SessionFsError {
5666
6492
  code: SessionFsErrorCode;
5667
6493
  /**
@@ -5675,6 +6501,7 @@ export interface SessionFsError {
5675
6501
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5676
6502
  * via the `definition` "SessionFsExistsRequest".
5677
6503
  */
6504
+ /** @experimental */
5678
6505
  export interface SessionFsExistsRequest {
5679
6506
  /**
5680
6507
  * Target session identifier
@@ -5691,6 +6518,7 @@ export interface SessionFsExistsRequest {
5691
6518
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5692
6519
  * via the `definition` "SessionFsExistsResult".
5693
6520
  */
6521
+ /** @experimental */
5694
6522
  export interface SessionFsExistsResult {
5695
6523
  /**
5696
6524
  * Whether the path exists
@@ -5703,6 +6531,7 @@ export interface SessionFsExistsResult {
5703
6531
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5704
6532
  * via the `definition` "SessionFsMkdirRequest".
5705
6533
  */
6534
+ /** @experimental */
5706
6535
  export interface SessionFsMkdirRequest {
5707
6536
  /**
5708
6537
  * Target session identifier
@@ -5727,6 +6556,7 @@ export interface SessionFsMkdirRequest {
5727
6556
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5728
6557
  * via the `definition` "SessionFsReaddirRequest".
5729
6558
  */
6559
+ /** @experimental */
5730
6560
  export interface SessionFsReaddirRequest {
5731
6561
  /**
5732
6562
  * Target session identifier
@@ -5743,6 +6573,7 @@ export interface SessionFsReaddirRequest {
5743
6573
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5744
6574
  * via the `definition` "SessionFsReaddirResult".
5745
6575
  */
6576
+ /** @experimental */
5746
6577
  export interface SessionFsReaddirResult {
5747
6578
  /**
5748
6579
  * Entry names in the directory
@@ -5756,6 +6587,7 @@ export interface SessionFsReaddirResult {
5756
6587
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5757
6588
  * via the `definition` "SessionFsReaddirWithTypesEntry".
5758
6589
  */
6590
+ /** @experimental */
5759
6591
  export interface SessionFsReaddirWithTypesEntry {
5760
6592
  /**
5761
6593
  * Entry name
@@ -5769,6 +6601,7 @@ export interface SessionFsReaddirWithTypesEntry {
5769
6601
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5770
6602
  * via the `definition` "SessionFsReaddirWithTypesRequest".
5771
6603
  */
6604
+ /** @experimental */
5772
6605
  export interface SessionFsReaddirWithTypesRequest {
5773
6606
  /**
5774
6607
  * Target session identifier
@@ -5785,6 +6618,7 @@ export interface SessionFsReaddirWithTypesRequest {
5785
6618
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5786
6619
  * via the `definition` "SessionFsReaddirWithTypesResult".
5787
6620
  */
6621
+ /** @experimental */
5788
6622
  export interface SessionFsReaddirWithTypesResult {
5789
6623
  /**
5790
6624
  * Directory entries with type information
@@ -5798,6 +6632,7 @@ export interface SessionFsReaddirWithTypesResult {
5798
6632
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5799
6633
  * via the `definition` "SessionFsReadFileRequest".
5800
6634
  */
6635
+ /** @experimental */
5801
6636
  export interface SessionFsReadFileRequest {
5802
6637
  /**
5803
6638
  * Target session identifier
@@ -5814,6 +6649,7 @@ export interface SessionFsReadFileRequest {
5814
6649
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5815
6650
  * via the `definition` "SessionFsReadFileResult".
5816
6651
  */
6652
+ /** @experimental */
5817
6653
  export interface SessionFsReadFileResult {
5818
6654
  /**
5819
6655
  * File content as UTF-8 string
@@ -5827,6 +6663,7 @@ export interface SessionFsReadFileResult {
5827
6663
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5828
6664
  * via the `definition` "SessionFsRenameRequest".
5829
6665
  */
6666
+ /** @experimental */
5830
6667
  export interface SessionFsRenameRequest {
5831
6668
  /**
5832
6669
  * Target session identifier
@@ -5847,6 +6684,7 @@ export interface SessionFsRenameRequest {
5847
6684
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5848
6685
  * via the `definition` "SessionFsRmRequest".
5849
6686
  */
6687
+ /** @experimental */
5850
6688
  export interface SessionFsRmRequest {
5851
6689
  /**
5852
6690
  * Target session identifier
@@ -5913,6 +6751,7 @@ export interface SessionFsSetProviderResult {
5913
6751
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5914
6752
  * via the `definition` "SessionFsSqliteExistsResult".
5915
6753
  */
6754
+ /** @experimental */
5916
6755
  export interface SessionFsSqliteExistsResult {
5917
6756
  /**
5918
6757
  * Whether the session database already exists
@@ -5925,6 +6764,7 @@ export interface SessionFsSqliteExistsResult {
5925
6764
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5926
6765
  * via the `definition` "SessionFsSqliteQueryRequest".
5927
6766
  */
6767
+ /** @experimental */
5928
6768
  export interface SessionFsSqliteQueryRequest {
5929
6769
  /**
5930
6770
  * Target session identifier
@@ -5948,14 +6788,13 @@ export interface SessionFsSqliteQueryRequest {
5948
6788
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5949
6789
  * via the `definition` "SessionFsSqliteQueryResult".
5950
6790
  */
6791
+ /** @experimental */
5951
6792
  export interface SessionFsSqliteQueryResult {
5952
6793
  /**
5953
6794
  * For SELECT: array of row objects. For others: empty array.
5954
6795
  */
5955
6796
  rows: {
5956
- [k: string]: {
5957
- [k: string]: unknown | undefined;
5958
- } | undefined;
6797
+ [k: string]: unknown | undefined;
5959
6798
  }[];
5960
6799
  /**
5961
6800
  * Column names from the result set
@@ -5977,6 +6816,7 @@ export interface SessionFsSqliteQueryResult {
5977
6816
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5978
6817
  * via the `definition` "SessionFsStatRequest".
5979
6818
  */
6819
+ /** @experimental */
5980
6820
  export interface SessionFsStatRequest {
5981
6821
  /**
5982
6822
  * Target session identifier
@@ -5993,6 +6833,7 @@ export interface SessionFsStatRequest {
5993
6833
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
5994
6834
  * via the `definition` "SessionFsStatResult".
5995
6835
  */
6836
+ /** @experimental */
5996
6837
  export interface SessionFsStatResult {
5997
6838
  /**
5998
6839
  * Whether the path is a file
@@ -6022,6 +6863,7 @@ export interface SessionFsStatResult {
6022
6863
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
6023
6864
  * via the `definition` "SessionFsWriteFileRequest".
6024
6865
  */
6866
+ /** @experimental */
6025
6867
  export interface SessionFsWriteFileRequest {
6026
6868
  /**
6027
6869
  * Target session identifier
@@ -6720,6 +7562,8 @@ export interface SessionUpdateOptionsParams {
6720
7562
  isExperimentalMode?: boolean;
6721
7563
  /**
6722
7564
  * Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime.
7565
+ *
7566
+ * @experimental
6723
7567
  */
6724
7568
  provider?: {
6725
7569
  [k: string]: unknown | undefined;
@@ -6750,6 +7594,8 @@ export interface SessionUpdateOptionsParams {
6750
7594
  shellProcessFlags?: string[];
6751
7595
  /**
6752
7596
  * Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime.
7597
+ *
7598
+ * @experimental
6753
7599
  */
6754
7600
  sandboxConfig?: {
6755
7601
  [k: string]: unknown | undefined;
@@ -6829,10 +7675,10 @@ export interface SessionUpdateOptionsParams {
6829
7675
  eventsLogDirectory?: string;
6830
7676
  /**
6831
7677
  * Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime.
7678
+ *
7679
+ * @experimental
6832
7680
  */
6833
- additionalContentExclusionPolicies?: {
6834
- [k: string]: unknown | undefined;
6835
- }[];
7681
+ additionalContentExclusionPolicies?: unknown[];
6836
7682
  /**
6837
7683
  * Whether to expose the `manage_schedule` tool to the agent. The runtime always owns the per-session schedule registry; this flag only controls tool exposure (typically gated to staff users).
6838
7684
  */
@@ -7667,9 +8513,7 @@ export interface Tool {
7667
8513
  * JSON Schema for the tool's input parameters
7668
8514
  */
7669
8515
  parameters?: {
7670
- [k: string]: {
7671
- [k: string]: unknown | undefined;
7672
- } | undefined;
8516
+ [k: string]: unknown | undefined;
7673
8517
  };
7674
8518
  /**
7675
8519
  * Optional instructions for how to use this tool effectively
@@ -8406,6 +9250,55 @@ export interface UsageMetricsModelMetricTokenDetail {
8406
9250
  */
8407
9251
  tokenCount: number;
8408
9252
  }
9253
+ /**
9254
+ * A single changed file and its unified diff.
9255
+ *
9256
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9257
+ * via the `definition` "WorkspaceDiffFileChange".
9258
+ */
9259
+ /** @experimental */
9260
+ export interface WorkspaceDiffFileChange {
9261
+ /**
9262
+ * Path to the changed file, relative to the workspace root.
9263
+ */
9264
+ path: string;
9265
+ /**
9266
+ * Unified diff content for the file. Empty when the diff was truncated.
9267
+ */
9268
+ diff: string;
9269
+ changeType: WorkspaceDiffFileChangeType;
9270
+ /**
9271
+ * Original file path for renamed files.
9272
+ */
9273
+ oldPath?: string;
9274
+ /**
9275
+ * Whether the diff content was omitted because it exceeded the per-file size limit.
9276
+ */
9277
+ isTruncated?: boolean;
9278
+ }
9279
+ /**
9280
+ * Workspace diff result for the requested mode.
9281
+ *
9282
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9283
+ * via the `definition` "WorkspaceDiffResult".
9284
+ */
9285
+ /** @experimental */
9286
+ export interface WorkspaceDiffResult {
9287
+ requestedMode: WorkspaceDiffMode;
9288
+ mode: WorkspaceDiffMode;
9289
+ /**
9290
+ * Changed files and their unified diffs.
9291
+ */
9292
+ changes: WorkspaceDiffFileChange[];
9293
+ /**
9294
+ * Default branch used for a branch diff, when branch mode was requested.
9295
+ */
9296
+ baseBranch?: string;
9297
+ /**
9298
+ * Whether a requested branch diff fell back to unstaged changes because branch diff failed.
9299
+ */
9300
+ isFallback: boolean;
9301
+ }
8409
9302
  /**
8410
9303
  * Schema for the `WorkspacesCheckpoints` type.
8411
9304
  *
@@ -8444,6 +9337,16 @@ export interface WorkspacesCreateFileRequest {
8444
9337
  */
8445
9338
  content: string;
8446
9339
  }
9340
+ /**
9341
+ * Parameters for computing a workspace diff.
9342
+ *
9343
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9344
+ * via the `definition` "WorkspacesDiffRequest".
9345
+ */
9346
+ /** @experimental */
9347
+ export interface WorkspacesDiffRequest {
9348
+ mode: WorkspaceDiffMode;
9349
+ }
8447
9350
  /**
8448
9351
  * Current workspace metadata for the session, including its absolute filesystem path when available.
8449
9352
  *
@@ -8595,12 +9498,23 @@ export interface WorkspacesSaveLargePasteResult {
8595
9498
  sizeBytes: number;
8596
9499
  } | null;
8597
9500
  }
9501
+ /**
9502
+ * Standard MCP CallToolResult
9503
+ *
9504
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
9505
+ * via the `definition` "SessionMcpAppsCallToolResult".
9506
+ */
9507
+ /** @experimental */
9508
+ export interface SessionMcpAppsCallToolResult {
9509
+ [k: string]: unknown | undefined;
9510
+ }
8598
9511
  /**
8599
9512
  * Identifies the target session.
8600
9513
  *
8601
9514
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
8602
9515
  * via the `definition` "SessionFsSqliteExistsRequest".
8603
9516
  */
9517
+ /** @experimental */
8604
9518
  export interface SessionFsSqliteExistsRequest {
8605
9519
  /**
8606
9520
  * Target session identifier
@@ -8858,7 +9772,7 @@ export declare function createServerRpc(connection: MessageConnection): {
8858
9772
  *
8859
9773
  * @param params Session metadata records to enrich with summary and context information.
8860
9774
  *
8861
- * @returns The same metadata records, with summary and context fields backfilled where available.
9775
+ * @returns The enriched metadata records, with summary and context fields backfilled where available. Sessions confirmed empty and unnamed are omitted.
8862
9776
  */
8863
9777
  enrichMetadata: (params: SessionsEnrichMetadataRequest) => Promise<SessionEnrichMetadataResult>;
8864
9778
  /**
@@ -8941,6 +9855,43 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
8941
9855
  setCredentials: (params: SessionSetCredentialsParams) => Promise<SessionSetCredentialsResult>;
8942
9856
  };
8943
9857
  /** @experimental */
9858
+ canvas: {
9859
+ /**
9860
+ * Lists canvases declared for the session.
9861
+ *
9862
+ * @returns Declared canvases available in this session.
9863
+ */
9864
+ list: () => Promise<CanvasList>;
9865
+ /**
9866
+ * Lists currently open canvas instances for the live session.
9867
+ *
9868
+ * @returns Live open-canvas snapshot.
9869
+ */
9870
+ listOpen: () => Promise<CanvasListOpenResult>;
9871
+ /**
9872
+ * Opens or focuses a canvas instance.
9873
+ *
9874
+ * @param params Canvas open parameters.
9875
+ *
9876
+ * @returns Open canvas instance snapshot.
9877
+ */
9878
+ open: (params: CanvasOpenRequest) => Promise<OpenCanvasInstance>;
9879
+ /**
9880
+ * Closes an open canvas instance.
9881
+ *
9882
+ * @param params Canvas close parameters.
9883
+ */
9884
+ close: (params: CanvasCloseRequest) => Promise<void>;
9885
+ /**
9886
+ * Invokes an action on an open canvas instance.
9887
+ *
9888
+ * @param params Canvas action invocation parameters.
9889
+ *
9890
+ * @returns Canvas action invocation result.
9891
+ */
9892
+ invokeAction: (params: CanvasInvokeActionRequest) => Promise<CanvasInvokeActionResult>;
9893
+ };
9894
+ /** @experimental */
8944
9895
  model: {
8945
9896
  /**
8946
9897
  * Gets the currently selected model for the session.
@@ -9072,6 +10023,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
9072
10023
  * @returns Descriptor for the saved paste file, or null when the workspace is unavailable.
9073
10024
  */
9074
10025
  saveLargePaste: (params: WorkspacesSaveLargePasteRequest) => Promise<WorkspacesSaveLargePasteResult>;
10026
+ /**
10027
+ * Computes a diff for the session workspace.
10028
+ *
10029
+ * @param params Parameters for computing a workspace diff.
10030
+ *
10031
+ * @returns Workspace diff result for the requested mode.
10032
+ */
10033
+ diff: (params: WorkspacesDiffRequest) => Promise<WorkspaceDiffResult>;
9075
10034
  };
9076
10035
  /** @experimental */
9077
10036
  instructions: {
@@ -9309,6 +10268,53 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
9309
10268
  */
9310
10269
  login: (params: McpOauthLoginRequest) => Promise<McpOauthLoginResult>;
9311
10270
  };
10271
+ /** @experimental */
10272
+ apps: {
10273
+ /**
10274
+ * Fetch an MCP resource (typically a `ui://` MCP App bundle, per SEP-1865) from a connected server. Requires the `mcp-apps` session capability.
10275
+ *
10276
+ * @param params MCP server and resource URI to fetch.
10277
+ *
10278
+ * @returns Resource contents returned by the MCP server.
10279
+ */
10280
+ readResource: (params: McpAppsReadResourceRequest) => Promise<McpAppsReadResourceResult>;
10281
+ /**
10282
+ * List tools that an MCP App view is allowed to call (SEP-1865 visibility filter). Returns tools whose `_meta.ui.visibility` is unset (default `["model","app"]`) or includes `"app"`.
10283
+ *
10284
+ * @param params MCP server to list app-callable tools for.
10285
+ *
10286
+ * @returns App-callable tools from the named MCP server.
10287
+ */
10288
+ listTools: (params: McpAppsListToolsRequest) => Promise<McpAppsListToolsResult>;
10289
+ /**
10290
+ * Call an MCP tool from an MCP App view (SEP-1865). Enforces the visibility check that prevents an app iframe from invoking model-only tools. Returns the standard MCP `CallToolResult`.
10291
+ *
10292
+ * @param params MCP server, tool name, and arguments to invoke from an MCP App view.
10293
+ *
10294
+ * @returns Standard MCP CallToolResult
10295
+ */
10296
+ callTool: (params: McpAppsCallToolRequest) => Promise<SessionMcpAppsCallToolResult>;
10297
+ /**
10298
+ * Replace the host context returned to MCP App guests on `ui/initialize`. Hosts use this to advertise theme, locale, or other metadata to the guest UI.
10299
+ *
10300
+ * @param params Host context to advertise to MCP App guests.
10301
+ */
10302
+ setHostContext: (params: McpAppsSetHostContextRequest) => Promise<void>;
10303
+ /**
10304
+ * Read the current host context advertised to MCP App guests.
10305
+ *
10306
+ * @returns Current host context advertised to MCP App guests.
10307
+ */
10308
+ getHostContext: () => Promise<McpAppsHostContext>;
10309
+ /**
10310
+ * Diagnose MCP Apps wiring for a specific MCP server. Reports the session capability, feature-flag state, advertised extension, and how many tools have `_meta.ui` populated.
10311
+ *
10312
+ * @param params MCP server to diagnose MCP Apps wiring for.
10313
+ *
10314
+ * @returns Diagnostic snapshot of MCP Apps wiring for the named server.
10315
+ */
10316
+ diagnose: (params: McpAppsDiagnoseRequest) => Promise<McpAppsDiagnoseResult>;
10317
+ };
9312
10318
  };
9313
10319
  /** @experimental */
9314
10320
  plugins: {
@@ -9883,6 +10889,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
9883
10889
  };
9884
10890
  };
9885
10891
  /** Handler for `sessionFs` client session API methods. */
10892
+ /** @experimental */
9886
10893
  export interface SessionFsHandler {
9887
10894
  /**
9888
10895
  * Reads a file from the client-provided session filesystem.
@@ -9981,9 +10988,36 @@ export interface SessionFsHandler {
9981
10988
  */
9982
10989
  sqliteExists(params: SessionFsSqliteExistsRequest): Promise<SessionFsSqliteExistsResult>;
9983
10990
  }
10991
+ /** Handler for `canvas` client session API methods. */
10992
+ /** @experimental */
10993
+ export interface CanvasHandler {
10994
+ /**
10995
+ * Opens a canvas instance on the provider.
10996
+ *
10997
+ * @param params Canvas open parameters sent to the provider.
10998
+ *
10999
+ * @returns Canvas open result returned by the provider.
11000
+ */
11001
+ open(params: CanvasProviderOpenRequest): Promise<CanvasProviderOpenResult>;
11002
+ /**
11003
+ * Closes a canvas instance on the provider.
11004
+ *
11005
+ * @param params Canvas close parameters sent to the provider.
11006
+ */
11007
+ close(params: CanvasProviderCloseRequest): Promise<void>;
11008
+ /**
11009
+ * Invokes an action on an open canvas instance via the provider.
11010
+ *
11011
+ * @param params Canvas action invocation parameters sent to the provider.
11012
+ *
11013
+ * @returns Provider-supplied action result.
11014
+ */
11015
+ invokeAction(params: CanvasProviderInvokeActionRequest): Promise<CanvasInvokeActionResult>;
11016
+ }
9984
11017
  /** All client session API handler groups. */
9985
11018
  export interface ClientSessionApiHandlers {
9986
11019
  sessionFs?: SessionFsHandler;
11020
+ canvas?: CanvasHandler;
9987
11021
  }
9988
11022
  /**
9989
11023
  * Register client session API handlers on a JSON-RPC connection.