@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.
- package/README.md +25 -30
- package/dist/canvas.d.ts +163 -0
- package/dist/canvas.js +92 -0
- package/dist/cjs/canvas.js +119 -0
- package/dist/cjs/client.js +243 -251
- package/dist/cjs/extension.js +9 -2
- package/dist/cjs/generated/rpc.js +97 -1
- package/dist/cjs/index.js +17 -7
- package/dist/cjs/session.js +64 -90
- package/dist/cjs/types.js +36 -3
- package/dist/client.d.ts +46 -49
- package/dist/client.js +246 -252
- package/dist/extension.d.ts +3 -1
- package/dist/extension.js +10 -2
- package/dist/generated/rpc.d.ts +796 -63
- package/dist/generated/rpc.js +97 -1
- package/dist/generated/session-events.d.ts +491 -78
- package/dist/index.d.ts +4 -2
- package/dist/index.js +12 -2
- package/dist/session.d.ts +13 -210
- package/dist/session.js +63 -88
- package/dist/types.d.ts +291 -121
- package/dist/types.js +34 -2
- package/package.json +2 -2
package/dist/generated/rpc.d.ts
CHANGED
|
@@ -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
|
*
|
|
@@ -1027,11 +1147,11 @@ export interface AccountQuotaSnapshot {
|
|
|
1027
1147
|
*/
|
|
1028
1148
|
remainingPercentage: number;
|
|
1029
1149
|
/**
|
|
1030
|
-
* Number of
|
|
1150
|
+
* Number of additional usage requests made this period
|
|
1031
1151
|
*/
|
|
1032
1152
|
overage: number;
|
|
1033
1153
|
/**
|
|
1034
|
-
* Whether
|
|
1154
|
+
* Whether additional usage is allowed when quota is exhausted
|
|
1035
1155
|
*/
|
|
1036
1156
|
overageAllowedWithExhaustedQuota: boolean;
|
|
1037
1157
|
/**
|
|
@@ -1095,6 +1215,8 @@ export interface AgentInfo {
|
|
|
1095
1215
|
model?: string;
|
|
1096
1216
|
/**
|
|
1097
1217
|
* MCP server configurations attached to this agent, keyed by server name. Server config shape mirrors the MCP `mcpServers` schema.
|
|
1218
|
+
*
|
|
1219
|
+
* @experimental
|
|
1098
1220
|
*/
|
|
1099
1221
|
mcpServers?: {
|
|
1100
1222
|
[k: string]: unknown | undefined;
|
|
@@ -1466,6 +1588,220 @@ export interface GhCliAuthInfo {
|
|
|
1466
1588
|
token: string;
|
|
1467
1589
|
copilotUser?: CopilotUserResponse;
|
|
1468
1590
|
}
|
|
1591
|
+
/**
|
|
1592
|
+
* Canvas action that the agent or host can invoke. To discover the input schema for a particular action, call the list_canvas_capabilities tool.
|
|
1593
|
+
*
|
|
1594
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1595
|
+
* via the `definition` "CanvasAction".
|
|
1596
|
+
*/
|
|
1597
|
+
/** @experimental */
|
|
1598
|
+
export interface CanvasAction {
|
|
1599
|
+
/**
|
|
1600
|
+
* Action name exposed by the canvas provider
|
|
1601
|
+
*/
|
|
1602
|
+
name: string;
|
|
1603
|
+
/**
|
|
1604
|
+
* Description of the action
|
|
1605
|
+
*/
|
|
1606
|
+
description?: string;
|
|
1607
|
+
inputSchema?: CanvasJsonSchema;
|
|
1608
|
+
}
|
|
1609
|
+
/**
|
|
1610
|
+
* JSON Schema for canvas open input
|
|
1611
|
+
*
|
|
1612
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1613
|
+
* via the `definition` "CanvasJsonSchema".
|
|
1614
|
+
*/
|
|
1615
|
+
/** @experimental */
|
|
1616
|
+
export interface CanvasJsonSchema {
|
|
1617
|
+
[k: string]: unknown | undefined;
|
|
1618
|
+
}
|
|
1619
|
+
/**
|
|
1620
|
+
* Canvas close parameters.
|
|
1621
|
+
*
|
|
1622
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1623
|
+
* via the `definition` "CanvasCloseRequest".
|
|
1624
|
+
*/
|
|
1625
|
+
/** @experimental */
|
|
1626
|
+
export interface CanvasCloseRequest {
|
|
1627
|
+
/**
|
|
1628
|
+
* Open canvas instance identifier
|
|
1629
|
+
*/
|
|
1630
|
+
instanceId: string;
|
|
1631
|
+
}
|
|
1632
|
+
/**
|
|
1633
|
+
* Canvas action invocation parameters.
|
|
1634
|
+
*
|
|
1635
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1636
|
+
* via the `definition` "CanvasInvokeActionRequest".
|
|
1637
|
+
*/
|
|
1638
|
+
/** @experimental */
|
|
1639
|
+
export interface CanvasInvokeActionRequest {
|
|
1640
|
+
/**
|
|
1641
|
+
* Open canvas instance identifier
|
|
1642
|
+
*/
|
|
1643
|
+
instanceId: string;
|
|
1644
|
+
/**
|
|
1645
|
+
* Action name to invoke
|
|
1646
|
+
*/
|
|
1647
|
+
actionName: string;
|
|
1648
|
+
/**
|
|
1649
|
+
* Action input
|
|
1650
|
+
*/
|
|
1651
|
+
input?: {
|
|
1652
|
+
[k: string]: unknown | undefined;
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
/**
|
|
1656
|
+
* Canvas action invocation result.
|
|
1657
|
+
*
|
|
1658
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1659
|
+
* via the `definition` "CanvasInvokeActionResult".
|
|
1660
|
+
*/
|
|
1661
|
+
/** @experimental */
|
|
1662
|
+
export interface CanvasInvokeActionResult {
|
|
1663
|
+
/**
|
|
1664
|
+
* Provider-supplied action result
|
|
1665
|
+
*/
|
|
1666
|
+
result?: {
|
|
1667
|
+
[k: string]: unknown | undefined;
|
|
1668
|
+
};
|
|
1669
|
+
}
|
|
1670
|
+
/**
|
|
1671
|
+
* Declared canvases available in this session.
|
|
1672
|
+
*
|
|
1673
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1674
|
+
* via the `definition` "CanvasList".
|
|
1675
|
+
*/
|
|
1676
|
+
/** @experimental */
|
|
1677
|
+
export interface CanvasList {
|
|
1678
|
+
/**
|
|
1679
|
+
* Declared canvases available in this session
|
|
1680
|
+
*/
|
|
1681
|
+
canvases: DiscoveredCanvas[];
|
|
1682
|
+
}
|
|
1683
|
+
/**
|
|
1684
|
+
* Canvas available in the current session.
|
|
1685
|
+
*
|
|
1686
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1687
|
+
* via the `definition` "DiscoveredCanvas".
|
|
1688
|
+
*/
|
|
1689
|
+
/** @experimental */
|
|
1690
|
+
export interface DiscoveredCanvas {
|
|
1691
|
+
/**
|
|
1692
|
+
* Human-readable canvas name
|
|
1693
|
+
*/
|
|
1694
|
+
displayName: string;
|
|
1695
|
+
/**
|
|
1696
|
+
* Short, single-sentence description shown to the agent in canvas catalogs.
|
|
1697
|
+
*/
|
|
1698
|
+
description: string;
|
|
1699
|
+
inputSchema?: CanvasJsonSchema;
|
|
1700
|
+
/**
|
|
1701
|
+
* Actions the agent or host may invoke on an open instance
|
|
1702
|
+
*/
|
|
1703
|
+
actions?: CanvasAction[];
|
|
1704
|
+
/**
|
|
1705
|
+
* Owning provider identifier
|
|
1706
|
+
*/
|
|
1707
|
+
extensionId: string;
|
|
1708
|
+
/**
|
|
1709
|
+
* Owning extension display name, when available
|
|
1710
|
+
*/
|
|
1711
|
+
extensionName?: string;
|
|
1712
|
+
/**
|
|
1713
|
+
* Provider-local canvas identifier
|
|
1714
|
+
*/
|
|
1715
|
+
canvasId: string;
|
|
1716
|
+
}
|
|
1717
|
+
/**
|
|
1718
|
+
* Live open-canvas snapshot.
|
|
1719
|
+
*
|
|
1720
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1721
|
+
* via the `definition` "CanvasListOpenResult".
|
|
1722
|
+
*/
|
|
1723
|
+
/** @experimental */
|
|
1724
|
+
export interface CanvasListOpenResult {
|
|
1725
|
+
/**
|
|
1726
|
+
* Currently open canvas instances
|
|
1727
|
+
*/
|
|
1728
|
+
openCanvases: OpenCanvasInstance[];
|
|
1729
|
+
}
|
|
1730
|
+
/**
|
|
1731
|
+
* Open canvas instance snapshot.
|
|
1732
|
+
*
|
|
1733
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1734
|
+
* via the `definition` "OpenCanvasInstance".
|
|
1735
|
+
*/
|
|
1736
|
+
/** @experimental */
|
|
1737
|
+
export interface OpenCanvasInstance {
|
|
1738
|
+
/**
|
|
1739
|
+
* Stable caller-supplied canvas instance identifier
|
|
1740
|
+
*/
|
|
1741
|
+
instanceId: string;
|
|
1742
|
+
/**
|
|
1743
|
+
* Owning provider identifier
|
|
1744
|
+
*/
|
|
1745
|
+
extensionId: string;
|
|
1746
|
+
/**
|
|
1747
|
+
* Owning extension display name, when available
|
|
1748
|
+
*/
|
|
1749
|
+
extensionName?: string;
|
|
1750
|
+
/**
|
|
1751
|
+
* Provider-local canvas identifier
|
|
1752
|
+
*/
|
|
1753
|
+
canvasId: string;
|
|
1754
|
+
/**
|
|
1755
|
+
* Rendered title
|
|
1756
|
+
*/
|
|
1757
|
+
title?: string;
|
|
1758
|
+
/**
|
|
1759
|
+
* Provider-supplied status text
|
|
1760
|
+
*/
|
|
1761
|
+
status?: string;
|
|
1762
|
+
/**
|
|
1763
|
+
* URL for web-rendered canvases
|
|
1764
|
+
*/
|
|
1765
|
+
url?: string;
|
|
1766
|
+
/**
|
|
1767
|
+
* Input supplied when the instance was opened
|
|
1768
|
+
*/
|
|
1769
|
+
input?: {
|
|
1770
|
+
[k: string]: unknown | undefined;
|
|
1771
|
+
};
|
|
1772
|
+
/**
|
|
1773
|
+
* Whether this snapshot came from an idempotent reopen
|
|
1774
|
+
*/
|
|
1775
|
+
reopen: boolean;
|
|
1776
|
+
availability: CanvasInstanceAvailability;
|
|
1777
|
+
}
|
|
1778
|
+
/**
|
|
1779
|
+
* Canvas open parameters.
|
|
1780
|
+
*
|
|
1781
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1782
|
+
* via the `definition` "CanvasOpenRequest".
|
|
1783
|
+
*/
|
|
1784
|
+
/** @experimental */
|
|
1785
|
+
export interface CanvasOpenRequest {
|
|
1786
|
+
/**
|
|
1787
|
+
* Owning provider identifier. Optional when the canvasId is unique across providers; required to disambiguate when multiple providers register the same canvasId.
|
|
1788
|
+
*/
|
|
1789
|
+
extensionId?: string;
|
|
1790
|
+
/**
|
|
1791
|
+
* Provider-local canvas identifier
|
|
1792
|
+
*/
|
|
1793
|
+
canvasId: string;
|
|
1794
|
+
/**
|
|
1795
|
+
* Caller-supplied stable instance identifier
|
|
1796
|
+
*/
|
|
1797
|
+
instanceId: string;
|
|
1798
|
+
/**
|
|
1799
|
+
* Canvas open input
|
|
1800
|
+
*/
|
|
1801
|
+
input?: {
|
|
1802
|
+
[k: string]: unknown | undefined;
|
|
1803
|
+
};
|
|
1804
|
+
}
|
|
1469
1805
|
/**
|
|
1470
1806
|
* Slash commands available in the session, after applying any include/exclude filters.
|
|
1471
1807
|
*
|
|
@@ -1738,40 +2074,6 @@ export interface ConnectRemoteSessionParams {
|
|
|
1738
2074
|
*/
|
|
1739
2075
|
sessionId: string;
|
|
1740
2076
|
}
|
|
1741
|
-
/**
|
|
1742
|
-
* Optional connection token presented by the SDK client during the handshake.
|
|
1743
|
-
*
|
|
1744
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1745
|
-
* via the `definition` "ConnectRequest".
|
|
1746
|
-
*/
|
|
1747
|
-
/** @internal */
|
|
1748
|
-
export interface ConnectRequest {
|
|
1749
|
-
/**
|
|
1750
|
-
* Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN
|
|
1751
|
-
*/
|
|
1752
|
-
token?: string;
|
|
1753
|
-
}
|
|
1754
|
-
/**
|
|
1755
|
-
* Handshake result reporting the server's protocol version and package version on success.
|
|
1756
|
-
*
|
|
1757
|
-
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
1758
|
-
* via the `definition` "ConnectResult".
|
|
1759
|
-
*/
|
|
1760
|
-
/** @internal */
|
|
1761
|
-
export interface ConnectResult {
|
|
1762
|
-
/**
|
|
1763
|
-
* Always true on success
|
|
1764
|
-
*/
|
|
1765
|
-
ok: true;
|
|
1766
|
-
/**
|
|
1767
|
-
* Server protocol version number
|
|
1768
|
-
*/
|
|
1769
|
-
protocolVersion: number;
|
|
1770
|
-
/**
|
|
1771
|
-
* Server package version
|
|
1772
|
-
*/
|
|
1773
|
-
version: string;
|
|
1774
|
-
}
|
|
1775
2077
|
/**
|
|
1776
2078
|
* The currently selected model and reasoning effort for the session.
|
|
1777
2079
|
*
|
|
@@ -2057,6 +2359,12 @@ export interface ExternalToolTextResultForLlmBinaryResultsForLlm {
|
|
|
2057
2359
|
* Human-readable description of the binary data
|
|
2058
2360
|
*/
|
|
2059
2361
|
description?: string;
|
|
2362
|
+
/**
|
|
2363
|
+
* Optional metadata from the producing tool.
|
|
2364
|
+
*/
|
|
2365
|
+
metadata?: {
|
|
2366
|
+
[k: string]: unknown | undefined;
|
|
2367
|
+
};
|
|
2060
2368
|
}
|
|
2061
2369
|
/**
|
|
2062
2370
|
* Plain text content block
|
|
@@ -2374,6 +2682,19 @@ export interface HistoryCompactContextWindow {
|
|
|
2374
2682
|
*/
|
|
2375
2683
|
toolDefinitionsTokens?: number;
|
|
2376
2684
|
}
|
|
2685
|
+
/**
|
|
2686
|
+
* Optional compaction parameters.
|
|
2687
|
+
*
|
|
2688
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2689
|
+
* via the `definition` "HistoryCompactRequest".
|
|
2690
|
+
*/
|
|
2691
|
+
/** @experimental */
|
|
2692
|
+
export interface HistoryCompactRequest {
|
|
2693
|
+
/**
|
|
2694
|
+
* Optional user-provided instructions to focus the compaction summary
|
|
2695
|
+
*/
|
|
2696
|
+
customInstructions?: string;
|
|
2697
|
+
}
|
|
2377
2698
|
/**
|
|
2378
2699
|
* Compaction outcome with the number of tokens and messages removed, summary text, and the resulting context window breakdown.
|
|
2379
2700
|
*
|
|
@@ -2635,6 +2956,274 @@ export interface LspInitializeRequest {
|
|
|
2635
2956
|
*/
|
|
2636
2957
|
force?: boolean;
|
|
2637
2958
|
}
|
|
2959
|
+
/**
|
|
2960
|
+
* MCP server, tool name, and arguments to invoke from an MCP App view.
|
|
2961
|
+
*
|
|
2962
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2963
|
+
* via the `definition` "McpAppsCallToolRequest".
|
|
2964
|
+
*/
|
|
2965
|
+
/** @experimental */
|
|
2966
|
+
export interface McpAppsCallToolRequest {
|
|
2967
|
+
/**
|
|
2968
|
+
* MCP server hosting the tool
|
|
2969
|
+
*/
|
|
2970
|
+
serverName: string;
|
|
2971
|
+
/**
|
|
2972
|
+
* MCP tool name
|
|
2973
|
+
*/
|
|
2974
|
+
toolName: string;
|
|
2975
|
+
/**
|
|
2976
|
+
* Tool arguments
|
|
2977
|
+
*/
|
|
2978
|
+
arguments?: {
|
|
2979
|
+
[k: string]: unknown | undefined;
|
|
2980
|
+
};
|
|
2981
|
+
/**
|
|
2982
|
+
* **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.
|
|
2983
|
+
*/
|
|
2984
|
+
originServerName: string;
|
|
2985
|
+
}
|
|
2986
|
+
/**
|
|
2987
|
+
* Capability negotiation snapshot
|
|
2988
|
+
*
|
|
2989
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
2990
|
+
* via the `definition` "McpAppsDiagnoseCapability".
|
|
2991
|
+
*/
|
|
2992
|
+
/** @experimental */
|
|
2993
|
+
export interface McpAppsDiagnoseCapability {
|
|
2994
|
+
/**
|
|
2995
|
+
* Whether the session has the `mcp-apps` capability
|
|
2996
|
+
*/
|
|
2997
|
+
sessionHasMcpApps: boolean;
|
|
2998
|
+
/**
|
|
2999
|
+
* Whether the MCP_APPS feature flag (or COPILOT_MCP_APPS env override) is on
|
|
3000
|
+
*/
|
|
3001
|
+
featureFlagEnabled: boolean;
|
|
3002
|
+
/**
|
|
3003
|
+
* Whether the runtime advertises `extensions.io.modelcontextprotocol/ui` to MCP servers
|
|
3004
|
+
*/
|
|
3005
|
+
advertised: boolean;
|
|
3006
|
+
}
|
|
3007
|
+
/**
|
|
3008
|
+
* MCP server to diagnose MCP Apps wiring for.
|
|
3009
|
+
*
|
|
3010
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3011
|
+
* via the `definition` "McpAppsDiagnoseRequest".
|
|
3012
|
+
*/
|
|
3013
|
+
/** @experimental */
|
|
3014
|
+
export interface McpAppsDiagnoseRequest {
|
|
3015
|
+
/**
|
|
3016
|
+
* MCP server to probe
|
|
3017
|
+
*/
|
|
3018
|
+
serverName: string;
|
|
3019
|
+
}
|
|
3020
|
+
/**
|
|
3021
|
+
* Diagnostic snapshot of MCP Apps wiring for the named server.
|
|
3022
|
+
*
|
|
3023
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3024
|
+
* via the `definition` "McpAppsDiagnoseResult".
|
|
3025
|
+
*/
|
|
3026
|
+
/** @experimental */
|
|
3027
|
+
export interface McpAppsDiagnoseResult {
|
|
3028
|
+
capability: McpAppsDiagnoseCapability;
|
|
3029
|
+
server: McpAppsDiagnoseServer;
|
|
3030
|
+
}
|
|
3031
|
+
/**
|
|
3032
|
+
* What the server returned for this session
|
|
3033
|
+
*
|
|
3034
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3035
|
+
* via the `definition` "McpAppsDiagnoseServer".
|
|
3036
|
+
*/
|
|
3037
|
+
/** @experimental */
|
|
3038
|
+
export interface McpAppsDiagnoseServer {
|
|
3039
|
+
/**
|
|
3040
|
+
* Whether the named server is currently connected
|
|
3041
|
+
*/
|
|
3042
|
+
connected: boolean;
|
|
3043
|
+
/**
|
|
3044
|
+
* Total tools returned by the server's tools/list
|
|
3045
|
+
*/
|
|
3046
|
+
toolCount: number;
|
|
3047
|
+
/**
|
|
3048
|
+
* Tools whose `_meta.ui` is populated (resourceUri and/or visibility set)
|
|
3049
|
+
*/
|
|
3050
|
+
toolsWithUiMeta: number;
|
|
3051
|
+
/**
|
|
3052
|
+
* Up to 5 tool names with `_meta.ui` for quick inspection
|
|
3053
|
+
*/
|
|
3054
|
+
sampleToolNames: string[];
|
|
3055
|
+
}
|
|
3056
|
+
/**
|
|
3057
|
+
* Current host context advertised to MCP App guests.
|
|
3058
|
+
*
|
|
3059
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3060
|
+
* via the `definition` "McpAppsHostContext".
|
|
3061
|
+
*/
|
|
3062
|
+
/** @experimental */
|
|
3063
|
+
export interface McpAppsHostContext {
|
|
3064
|
+
context: McpAppsHostContextDetails;
|
|
3065
|
+
}
|
|
3066
|
+
/**
|
|
3067
|
+
* Current host context
|
|
3068
|
+
*
|
|
3069
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3070
|
+
* via the `definition` "McpAppsHostContextDetails".
|
|
3071
|
+
*/
|
|
3072
|
+
/** @experimental */
|
|
3073
|
+
export interface McpAppsHostContextDetails {
|
|
3074
|
+
theme?: McpAppsHostContextDetailsTheme;
|
|
3075
|
+
/**
|
|
3076
|
+
* BCP-47 locale, e.g. 'en-US'
|
|
3077
|
+
*/
|
|
3078
|
+
locale?: string;
|
|
3079
|
+
/**
|
|
3080
|
+
* IANA timezone, e.g. 'America/New_York'
|
|
3081
|
+
*/
|
|
3082
|
+
timeZone?: string;
|
|
3083
|
+
displayMode?: McpAppsHostContextDetailsDisplayMode;
|
|
3084
|
+
/**
|
|
3085
|
+
* Display modes the host supports
|
|
3086
|
+
*/
|
|
3087
|
+
availableDisplayModes?: McpAppsHostContextDetailsAvailableDisplayMode[];
|
|
3088
|
+
platform?: McpAppsHostContextDetailsPlatform;
|
|
3089
|
+
/**
|
|
3090
|
+
* Host application identifier
|
|
3091
|
+
*/
|
|
3092
|
+
userAgent?: string;
|
|
3093
|
+
[k: string]: unknown | undefined;
|
|
3094
|
+
}
|
|
3095
|
+
/**
|
|
3096
|
+
* MCP server to list app-callable tools for.
|
|
3097
|
+
*
|
|
3098
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3099
|
+
* via the `definition` "McpAppsListToolsRequest".
|
|
3100
|
+
*/
|
|
3101
|
+
/** @experimental */
|
|
3102
|
+
export interface McpAppsListToolsRequest {
|
|
3103
|
+
/**
|
|
3104
|
+
* MCP server hosting the app
|
|
3105
|
+
*/
|
|
3106
|
+
serverName: string;
|
|
3107
|
+
/**
|
|
3108
|
+
* **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.
|
|
3109
|
+
*/
|
|
3110
|
+
originServerName: string;
|
|
3111
|
+
}
|
|
3112
|
+
/**
|
|
3113
|
+
* App-callable tools from the named MCP server.
|
|
3114
|
+
*
|
|
3115
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3116
|
+
* via the `definition` "McpAppsListToolsResult".
|
|
3117
|
+
*/
|
|
3118
|
+
/** @experimental */
|
|
3119
|
+
export interface McpAppsListToolsResult {
|
|
3120
|
+
/**
|
|
3121
|
+
* App-callable tools from the server
|
|
3122
|
+
*/
|
|
3123
|
+
tools: {
|
|
3124
|
+
[k: string]: unknown | undefined;
|
|
3125
|
+
}[];
|
|
3126
|
+
}
|
|
3127
|
+
/**
|
|
3128
|
+
* MCP server and resource URI to fetch.
|
|
3129
|
+
*
|
|
3130
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3131
|
+
* via the `definition` "McpAppsReadResourceRequest".
|
|
3132
|
+
*/
|
|
3133
|
+
/** @experimental */
|
|
3134
|
+
export interface McpAppsReadResourceRequest {
|
|
3135
|
+
/**
|
|
3136
|
+
* Name of the MCP server hosting the resource
|
|
3137
|
+
*/
|
|
3138
|
+
serverName: string;
|
|
3139
|
+
/**
|
|
3140
|
+
* Resource URI (typically ui://...)
|
|
3141
|
+
*/
|
|
3142
|
+
uri: string;
|
|
3143
|
+
}
|
|
3144
|
+
/**
|
|
3145
|
+
* Resource contents returned by the MCP server.
|
|
3146
|
+
*
|
|
3147
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3148
|
+
* via the `definition` "McpAppsReadResourceResult".
|
|
3149
|
+
*/
|
|
3150
|
+
/** @experimental */
|
|
3151
|
+
export interface McpAppsReadResourceResult {
|
|
3152
|
+
/**
|
|
3153
|
+
* Resource contents returned by the server
|
|
3154
|
+
*/
|
|
3155
|
+
contents: McpAppsResourceContent[];
|
|
3156
|
+
}
|
|
3157
|
+
/**
|
|
3158
|
+
* Schema for the `McpAppsResourceContent` type.
|
|
3159
|
+
*
|
|
3160
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3161
|
+
* via the `definition` "McpAppsResourceContent".
|
|
3162
|
+
*/
|
|
3163
|
+
/** @experimental */
|
|
3164
|
+
export interface McpAppsResourceContent {
|
|
3165
|
+
/**
|
|
3166
|
+
* The resource URI (typically ui://...)
|
|
3167
|
+
*/
|
|
3168
|
+
uri: string;
|
|
3169
|
+
/**
|
|
3170
|
+
* MIME type of the content
|
|
3171
|
+
*/
|
|
3172
|
+
mimeType?: string;
|
|
3173
|
+
/**
|
|
3174
|
+
* Text content (e.g. HTML)
|
|
3175
|
+
*/
|
|
3176
|
+
text?: string;
|
|
3177
|
+
/**
|
|
3178
|
+
* Base64-encoded binary content
|
|
3179
|
+
*/
|
|
3180
|
+
blob?: string;
|
|
3181
|
+
/**
|
|
3182
|
+
* Resource-level metadata (CSP, permissions, etc.)
|
|
3183
|
+
*/
|
|
3184
|
+
_meta?: {
|
|
3185
|
+
[k: string]: unknown | undefined;
|
|
3186
|
+
};
|
|
3187
|
+
}
|
|
3188
|
+
/**
|
|
3189
|
+
* Host context advertised to MCP App guests
|
|
3190
|
+
*
|
|
3191
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3192
|
+
* via the `definition` "McpAppsSetHostContextDetails".
|
|
3193
|
+
*/
|
|
3194
|
+
/** @experimental */
|
|
3195
|
+
export interface McpAppsSetHostContextDetails {
|
|
3196
|
+
theme?: McpAppsSetHostContextDetailsTheme;
|
|
3197
|
+
/**
|
|
3198
|
+
* BCP-47 locale, e.g. 'en-US'
|
|
3199
|
+
*/
|
|
3200
|
+
locale?: string;
|
|
3201
|
+
/**
|
|
3202
|
+
* IANA timezone, e.g. 'America/New_York'
|
|
3203
|
+
*/
|
|
3204
|
+
timeZone?: string;
|
|
3205
|
+
displayMode?: McpAppsSetHostContextDetailsDisplayMode;
|
|
3206
|
+
/**
|
|
3207
|
+
* Display modes the host supports
|
|
3208
|
+
*/
|
|
3209
|
+
availableDisplayModes?: McpAppsSetHostContextDetailsAvailableDisplayMode[];
|
|
3210
|
+
platform?: McpAppsSetHostContextDetailsPlatform;
|
|
3211
|
+
/**
|
|
3212
|
+
* Host application identifier
|
|
3213
|
+
*/
|
|
3214
|
+
userAgent?: string;
|
|
3215
|
+
[k: string]: unknown | undefined;
|
|
3216
|
+
}
|
|
3217
|
+
/**
|
|
3218
|
+
* Host context to advertise to MCP App guests.
|
|
3219
|
+
*
|
|
3220
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3221
|
+
* via the `definition` "McpAppsSetHostContextRequest".
|
|
3222
|
+
*/
|
|
3223
|
+
/** @experimental */
|
|
3224
|
+
export interface McpAppsSetHostContextRequest {
|
|
3225
|
+
context: McpAppsSetHostContextDetails;
|
|
3226
|
+
}
|
|
2638
3227
|
/**
|
|
2639
3228
|
* The requestId previously passed to executeSampling that should be cancelled.
|
|
2640
3229
|
*
|
|
@@ -3374,21 +3963,50 @@ export interface ModelBilling {
|
|
|
3374
3963
|
*/
|
|
3375
3964
|
export interface ModelBillingTokenPrices {
|
|
3376
3965
|
/**
|
|
3377
|
-
*
|
|
3966
|
+
* AI Credits cost per billing batch of input tokens
|
|
3378
3967
|
*/
|
|
3379
3968
|
inputPrice?: number;
|
|
3380
3969
|
/**
|
|
3381
|
-
*
|
|
3970
|
+
* AI Credits cost per billing batch of output tokens
|
|
3382
3971
|
*/
|
|
3383
3972
|
outputPrice?: number;
|
|
3384
3973
|
/**
|
|
3385
|
-
*
|
|
3974
|
+
* AI Credits cost per billing batch of cached tokens
|
|
3386
3975
|
*/
|
|
3387
3976
|
cachePrice?: number;
|
|
3388
3977
|
/**
|
|
3389
3978
|
* Number of tokens per standard billing batch
|
|
3390
3979
|
*/
|
|
3391
3980
|
batchSize?: number;
|
|
3981
|
+
/**
|
|
3982
|
+
* Maximum context window tokens for the default tier
|
|
3983
|
+
*/
|
|
3984
|
+
contextMax?: number;
|
|
3985
|
+
longContext?: ModelBillingTokenPricesLongContext;
|
|
3986
|
+
}
|
|
3987
|
+
/**
|
|
3988
|
+
* Long context tier pricing (available for models with extended context windows)
|
|
3989
|
+
*
|
|
3990
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
3991
|
+
* via the `definition` "ModelBillingTokenPricesLongContext".
|
|
3992
|
+
*/
|
|
3993
|
+
export interface ModelBillingTokenPricesLongContext {
|
|
3994
|
+
/**
|
|
3995
|
+
* AI Credits cost per billing batch of input tokens
|
|
3996
|
+
*/
|
|
3997
|
+
inputPrice?: number;
|
|
3998
|
+
/**
|
|
3999
|
+
* AI Credits cost per billing batch of output tokens
|
|
4000
|
+
*/
|
|
4001
|
+
outputPrice?: number;
|
|
4002
|
+
/**
|
|
4003
|
+
* AI Credits cost per billing batch of cached tokens
|
|
4004
|
+
*/
|
|
4005
|
+
cachePrice?: number;
|
|
4006
|
+
/**
|
|
4007
|
+
* Maximum context window tokens for the long context tier
|
|
4008
|
+
*/
|
|
4009
|
+
contextMax?: number;
|
|
3392
4010
|
}
|
|
3393
4011
|
/**
|
|
3394
4012
|
* Override individual model capabilities resolved by the runtime
|
|
@@ -5200,6 +5818,30 @@ export interface ScheduleStopRequest {
|
|
|
5200
5818
|
export interface ScheduleStopResult {
|
|
5201
5819
|
entry?: ScheduleEntry;
|
|
5202
5820
|
}
|
|
5821
|
+
/**
|
|
5822
|
+
* Secret values to add to the redaction filter.
|
|
5823
|
+
*
|
|
5824
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
5825
|
+
* via the `definition` "SecretsAddFilterValuesRequest".
|
|
5826
|
+
*/
|
|
5827
|
+
export interface SecretsAddFilterValuesRequest {
|
|
5828
|
+
/**
|
|
5829
|
+
* Raw secret values to register for redaction
|
|
5830
|
+
*/
|
|
5831
|
+
values: string[];
|
|
5832
|
+
}
|
|
5833
|
+
/**
|
|
5834
|
+
* Confirmation that the secret values were registered.
|
|
5835
|
+
*
|
|
5836
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
5837
|
+
* via the `definition` "SecretsAddFilterValuesResult".
|
|
5838
|
+
*/
|
|
5839
|
+
export interface SecretsAddFilterValuesResult {
|
|
5840
|
+
/**
|
|
5841
|
+
* Whether the values were successfully registered
|
|
5842
|
+
*/
|
|
5843
|
+
ok: true;
|
|
5844
|
+
}
|
|
5203
5845
|
/**
|
|
5204
5846
|
* File attachment
|
|
5205
5847
|
*
|
|
@@ -5419,12 +6061,6 @@ export interface SendRequest {
|
|
|
5419
6061
|
* 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
|
|
5420
6062
|
*/
|
|
5421
6063
|
requiredTool?: string;
|
|
5422
|
-
/**
|
|
5423
|
-
* Optional provenance tag copied to the resulting user.message event. Supported values are `system`, `command-*`, and `schedule-*`.
|
|
5424
|
-
*/
|
|
5425
|
-
source?: {
|
|
5426
|
-
[k: string]: unknown | undefined;
|
|
5427
|
-
};
|
|
5428
6064
|
agentMode?: SendAgentMode;
|
|
5429
6065
|
/**
|
|
5430
6066
|
* 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.
|
|
@@ -6711,6 +7347,8 @@ export interface SessionUpdateOptionsParams {
|
|
|
6711
7347
|
isExperimentalMode?: boolean;
|
|
6712
7348
|
/**
|
|
6713
7349
|
* Custom model-provider configuration (BYOK). Opaque shape; see `ProviderConfig` in the runtime.
|
|
7350
|
+
*
|
|
7351
|
+
* @experimental
|
|
6714
7352
|
*/
|
|
6715
7353
|
provider?: {
|
|
6716
7354
|
[k: string]: unknown | undefined;
|
|
@@ -6741,6 +7379,8 @@ export interface SessionUpdateOptionsParams {
|
|
|
6741
7379
|
shellProcessFlags?: string[];
|
|
6742
7380
|
/**
|
|
6743
7381
|
* Sandbox configuration shape; opaque to SDK consumers. See `SandboxConfig` in the runtime.
|
|
7382
|
+
*
|
|
7383
|
+
* @experimental
|
|
6744
7384
|
*/
|
|
6745
7385
|
sandboxConfig?: {
|
|
6746
7386
|
[k: string]: unknown | undefined;
|
|
@@ -6820,6 +7460,8 @@ export interface SessionUpdateOptionsParams {
|
|
|
6820
7460
|
eventsLogDirectory?: string;
|
|
6821
7461
|
/**
|
|
6822
7462
|
* Additional content-exclusion policies to merge into the session's policy set. Opaque shape; see `ContentExclusionApiResponse` in the runtime.
|
|
7463
|
+
*
|
|
7464
|
+
* @experimental
|
|
6823
7465
|
*/
|
|
6824
7466
|
additionalContentExclusionPolicies?: unknown[];
|
|
6825
7467
|
/**
|
|
@@ -8582,6 +9224,16 @@ export interface WorkspacesSaveLargePasteResult {
|
|
|
8582
9224
|
sizeBytes: number;
|
|
8583
9225
|
} | null;
|
|
8584
9226
|
}
|
|
9227
|
+
/**
|
|
9228
|
+
* Standard MCP CallToolResult
|
|
9229
|
+
*
|
|
9230
|
+
* This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
|
|
9231
|
+
* via the `definition` "SessionMcpAppsCallToolResult".
|
|
9232
|
+
*/
|
|
9233
|
+
/** @experimental */
|
|
9234
|
+
export interface SessionMcpAppsCallToolResult {
|
|
9235
|
+
[k: string]: unknown | undefined;
|
|
9236
|
+
}
|
|
8585
9237
|
/**
|
|
8586
9238
|
* Identifies the target session.
|
|
8587
9239
|
*
|
|
@@ -8634,6 +9286,16 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
8634
9286
|
*/
|
|
8635
9287
|
getQuota: (params: AccountGetQuotaRequest) => Promise<AccountGetQuotaResult>;
|
|
8636
9288
|
};
|
|
9289
|
+
secrets: {
|
|
9290
|
+
/**
|
|
9291
|
+
* Registers secret values for redaction in session logs and exports. The SDK calls this to inject dynamically generated secret values (e.g., OIDC tokens).
|
|
9292
|
+
*
|
|
9293
|
+
* @param params Secret values to add to the redaction filter.
|
|
9294
|
+
*
|
|
9295
|
+
* @returns Confirmation that the secret values were registered.
|
|
9296
|
+
*/
|
|
9297
|
+
addFilterValues: (params: SecretsAddFilterValuesRequest) => Promise<SecretsAddFilterValuesResult>;
|
|
9298
|
+
};
|
|
8637
9299
|
mcp: {
|
|
8638
9300
|
config: {
|
|
8639
9301
|
/**
|
|
@@ -8864,21 +9526,6 @@ export declare function createServerRpc(connection: MessageConnection): {
|
|
|
8864
9526
|
setAdditionalPlugins: (params: SessionsSetAdditionalPluginsRequest) => Promise<SessionsSetAdditionalPluginsResult>;
|
|
8865
9527
|
};
|
|
8866
9528
|
};
|
|
8867
|
-
/**
|
|
8868
|
-
* Create typed server-scoped RPC methods that are part of the SDK's internal
|
|
8869
|
-
* surface (e.g. handshake helpers). Not exported on the public client API.
|
|
8870
|
-
* @internal
|
|
8871
|
-
*/
|
|
8872
|
-
export declare function createInternalServerRpc(connection: MessageConnection): {
|
|
8873
|
-
/**
|
|
8874
|
-
* Performs the SDK server connection handshake and validates the optional connection token.
|
|
8875
|
-
*
|
|
8876
|
-
* @param params Optional connection token presented by the SDK client during the handshake.
|
|
8877
|
-
*
|
|
8878
|
-
* @returns Handshake result reporting the server's protocol version and package version on success.
|
|
8879
|
-
*/
|
|
8880
|
-
connect: (params: ConnectRequest) => Promise<ConnectResult>;
|
|
8881
|
-
};
|
|
8882
9529
|
/** Create typed session-scoped RPC methods. */
|
|
8883
9530
|
export declare function createSessionRpc(connection: MessageConnection, sessionId: string): {
|
|
8884
9531
|
/**
|
|
@@ -8933,6 +9580,43 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
8933
9580
|
setCredentials: (params: SessionSetCredentialsParams) => Promise<SessionSetCredentialsResult>;
|
|
8934
9581
|
};
|
|
8935
9582
|
/** @experimental */
|
|
9583
|
+
canvas: {
|
|
9584
|
+
/**
|
|
9585
|
+
* Lists canvases declared for the session.
|
|
9586
|
+
*
|
|
9587
|
+
* @returns Declared canvases available in this session.
|
|
9588
|
+
*/
|
|
9589
|
+
list: () => Promise<CanvasList>;
|
|
9590
|
+
/**
|
|
9591
|
+
* Lists currently open canvas instances for the live session.
|
|
9592
|
+
*
|
|
9593
|
+
* @returns Live open-canvas snapshot.
|
|
9594
|
+
*/
|
|
9595
|
+
listOpen: () => Promise<CanvasListOpenResult>;
|
|
9596
|
+
/**
|
|
9597
|
+
* Opens or focuses a canvas instance.
|
|
9598
|
+
*
|
|
9599
|
+
* @param params Canvas open parameters.
|
|
9600
|
+
*
|
|
9601
|
+
* @returns Open canvas instance snapshot.
|
|
9602
|
+
*/
|
|
9603
|
+
open: (params: CanvasOpenRequest) => Promise<OpenCanvasInstance>;
|
|
9604
|
+
/**
|
|
9605
|
+
* Closes an open canvas instance.
|
|
9606
|
+
*
|
|
9607
|
+
* @param params Canvas close parameters.
|
|
9608
|
+
*/
|
|
9609
|
+
close: (params: CanvasCloseRequest) => Promise<void>;
|
|
9610
|
+
/**
|
|
9611
|
+
* Invokes an action on an open canvas instance.
|
|
9612
|
+
*
|
|
9613
|
+
* @param params Canvas action invocation parameters.
|
|
9614
|
+
*
|
|
9615
|
+
* @returns Canvas action invocation result.
|
|
9616
|
+
*/
|
|
9617
|
+
invokeAction: (params: CanvasInvokeActionRequest) => Promise<CanvasInvokeActionResult>;
|
|
9618
|
+
};
|
|
9619
|
+
/** @experimental */
|
|
8936
9620
|
model: {
|
|
8937
9621
|
/**
|
|
8938
9622
|
* Gets the currently selected model for the session.
|
|
@@ -9301,6 +9985,53 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
9301
9985
|
*/
|
|
9302
9986
|
login: (params: McpOauthLoginRequest) => Promise<McpOauthLoginResult>;
|
|
9303
9987
|
};
|
|
9988
|
+
/** @experimental */
|
|
9989
|
+
apps: {
|
|
9990
|
+
/**
|
|
9991
|
+
* Fetch an MCP resource (typically a `ui://` MCP App bundle, per SEP-1865) from a connected server. Requires the `mcp-apps` session capability.
|
|
9992
|
+
*
|
|
9993
|
+
* @param params MCP server and resource URI to fetch.
|
|
9994
|
+
*
|
|
9995
|
+
* @returns Resource contents returned by the MCP server.
|
|
9996
|
+
*/
|
|
9997
|
+
readResource: (params: McpAppsReadResourceRequest) => Promise<McpAppsReadResourceResult>;
|
|
9998
|
+
/**
|
|
9999
|
+
* 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"`.
|
|
10000
|
+
*
|
|
10001
|
+
* @param params MCP server to list app-callable tools for.
|
|
10002
|
+
*
|
|
10003
|
+
* @returns App-callable tools from the named MCP server.
|
|
10004
|
+
*/
|
|
10005
|
+
listTools: (params: McpAppsListToolsRequest) => Promise<McpAppsListToolsResult>;
|
|
10006
|
+
/**
|
|
10007
|
+
* 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`.
|
|
10008
|
+
*
|
|
10009
|
+
* @param params MCP server, tool name, and arguments to invoke from an MCP App view.
|
|
10010
|
+
*
|
|
10011
|
+
* @returns Standard MCP CallToolResult
|
|
10012
|
+
*/
|
|
10013
|
+
callTool: (params: McpAppsCallToolRequest) => Promise<SessionMcpAppsCallToolResult>;
|
|
10014
|
+
/**
|
|
10015
|
+
* 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.
|
|
10016
|
+
*
|
|
10017
|
+
* @param params Host context to advertise to MCP App guests.
|
|
10018
|
+
*/
|
|
10019
|
+
setHostContext: (params: McpAppsSetHostContextRequest) => Promise<void>;
|
|
10020
|
+
/**
|
|
10021
|
+
* Read the current host context advertised to MCP App guests.
|
|
10022
|
+
*
|
|
10023
|
+
* @returns Current host context advertised to MCP App guests.
|
|
10024
|
+
*/
|
|
10025
|
+
getHostContext: () => Promise<McpAppsHostContext>;
|
|
10026
|
+
/**
|
|
10027
|
+
* 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.
|
|
10028
|
+
*
|
|
10029
|
+
* @param params MCP server to diagnose MCP Apps wiring for.
|
|
10030
|
+
*
|
|
10031
|
+
* @returns Diagnostic snapshot of MCP Apps wiring for the named server.
|
|
10032
|
+
*/
|
|
10033
|
+
diagnose: (params: McpAppsDiagnoseRequest) => Promise<McpAppsDiagnoseResult>;
|
|
10034
|
+
};
|
|
9304
10035
|
};
|
|
9305
10036
|
/** @experimental */
|
|
9306
10037
|
plugins: {
|
|
@@ -9740,9 +10471,11 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
|
|
|
9740
10471
|
/**
|
|
9741
10472
|
* Compacts the session history to reduce context usage.
|
|
9742
10473
|
*
|
|
10474
|
+
* @param params Optional compaction parameters.
|
|
10475
|
+
*
|
|
9743
10476
|
* @returns Compaction outcome with the number of tokens and messages removed, summary text, and the resulting context window breakdown.
|
|
9744
10477
|
*/
|
|
9745
|
-
compact: () => Promise<HistoryCompactResult>;
|
|
10478
|
+
compact: (params?: HistoryCompactRequest) => Promise<HistoryCompactResult>;
|
|
9746
10479
|
/**
|
|
9747
10480
|
* Truncates persisted session history to a specific event.
|
|
9748
10481
|
*
|