@github/copilot-sdk 0.3.0 → 1.0.0-beta.2

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.
@@ -38,6 +38,34 @@ export type ExtensionSource = "project" | "user";
38
38
  * via the `definition` "ExtensionStatus".
39
39
  */
40
40
  export type ExtensionStatus = "running" | "disabled" | "failed" | "starting";
41
+ /**
42
+ * Tool call result (string or expanded result object)
43
+ *
44
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
45
+ * via the `definition` "ExternalToolResult".
46
+ */
47
+ export type ExternalToolResult = string | ExternalToolTextResultForLlm;
48
+ /**
49
+ * A content block within a tool result, which may be text, terminal output, image, audio, or a resource
50
+ *
51
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
52
+ * via the `definition` "ExternalToolTextResultForLlmContent".
53
+ */
54
+ export type ExternalToolTextResultForLlmContent = ExternalToolTextResultForLlmContentText | ExternalToolTextResultForLlmContentTerminal | ExternalToolTextResultForLlmContentImage | ExternalToolTextResultForLlmContentAudio | ExternalToolTextResultForLlmContentResourceLink | ExternalToolTextResultForLlmContentResource;
55
+ /**
56
+ * Theme variant this icon is intended for
57
+ *
58
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
59
+ * via the `definition` "ExternalToolTextResultForLlmContentResourceLinkIconTheme".
60
+ */
61
+ export type ExternalToolTextResultForLlmContentResourceLinkIconTheme = "light" | "dark";
62
+ /**
63
+ * The embedded resource contents, either text or base64-encoded binary
64
+ *
65
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
66
+ * via the `definition` "ExternalToolTextResultForLlmContentResourceDetails".
67
+ */
68
+ export type ExternalToolTextResultForLlmContentResourceDetails = EmbeddedTextResourceContents | EmbeddedBlobResourceContents;
41
69
  export type FilterMapping = {
42
70
  [k: string]: FilterMappingValue;
43
71
  } | FilterMappingString;
@@ -79,6 +107,7 @@ export type McpServerConfigLocalType = "local" | "stdio";
79
107
  * via the `definition` "McpServerConfigHttpType".
80
108
  */
81
109
  export type McpServerConfigHttpType = "http" | "sse";
110
+ export type McpServerConfigHttpOauthGrantType = "authorization_code" | "client_credentials";
82
111
  /**
83
112
  * Connection status: connected, failed, needs-auth, pending, disabled, or not_configured
84
113
  *
@@ -100,7 +129,7 @@ export type McpServerSource = "user" | "workspace" | "plugin" | "builtin";
100
129
  * via the `definition` "SessionMode".
101
130
  */
102
131
  export type SessionMode = "interactive" | "plan" | "autopilot";
103
- export type PermissionDecision = PermissionDecisionApproveOnce | PermissionDecisionApproveForSession | PermissionDecisionApproveForLocation | PermissionDecisionReject | PermissionDecisionUserNotAvailable;
132
+ export type PermissionDecision = PermissionDecisionApproveOnce | PermissionDecisionApproveForSession | PermissionDecisionApproveForLocation | PermissionDecisionApprovePermanently | PermissionDecisionReject | PermissionDecisionUserNotAvailable;
104
133
  /**
105
134
  * The approval to add as a session-scoped rule
106
135
  *
@@ -144,12 +173,41 @@ export type SessionFsSetProviderConventions = "windows" | "posix";
144
173
  */
145
174
  export type ShellKillSignal = "SIGTERM" | "SIGKILL" | "SIGINT";
146
175
  /**
147
- * Tool call result (string or expanded result object)
176
+ * Current lifecycle status of the task
148
177
  *
149
178
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
150
- * via the `definition` "ToolsHandlePendingToolCall".
179
+ * via the `definition` "TaskAgentInfoStatus".
151
180
  */
152
- export type ToolsHandlePendingToolCall = string | ToolCallResult;
181
+ export type TaskAgentInfoStatus = "running" | "idle" | "completed" | "failed" | "cancelled";
182
+ /**
183
+ * How the agent is currently being managed by the runtime
184
+ *
185
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
186
+ * via the `definition` "TaskAgentInfoExecutionMode".
187
+ */
188
+ export type TaskAgentInfoExecutionMode = "sync" | "background";
189
+ export type TaskInfo = TaskAgentInfo | TaskShellInfo;
190
+ /**
191
+ * Current lifecycle status of the task
192
+ *
193
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
194
+ * via the `definition` "TaskShellInfoStatus".
195
+ */
196
+ export type TaskShellInfoStatus = "running" | "idle" | "completed" | "failed" | "cancelled";
197
+ /**
198
+ * Whether the shell runs inside a managed PTY session or as an independent background process
199
+ *
200
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
201
+ * via the `definition` "TaskShellInfoAttachmentMode".
202
+ */
203
+ export type TaskShellInfoAttachmentMode = "attached" | "detached";
204
+ /**
205
+ * Whether the shell command is currently sync-waited or background-managed
206
+ *
207
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
208
+ * via the `definition` "TaskShellInfoExecutionMode".
209
+ */
210
+ export type TaskShellInfoExecutionMode = "sync" | "background";
153
211
  export type UIElicitationFieldValue = string | number | boolean | string[];
154
212
  export type UIElicitationSchemaProperty = UIElicitationStringEnumField | UIElicitationStringOneOfField | UIElicitationArrayEnumField | UIElicitationArrayAnyOfField | UIElicitationSchemaPropertyBoolean | UIElicitationSchemaPropertyString | UIElicitationSchemaPropertyNumber;
155
213
  export type UIElicitationSchemaPropertyStringFormat = "email" | "uri" | "date" | "date-time";
@@ -229,6 +287,10 @@ export interface AgentInfo {
229
287
  * Description of the agent's purpose
230
288
  */
231
289
  description: string;
290
+ /**
291
+ * Absolute local file path of the agent definition. Only set for file-based agents loaded from disk; remote agents do not have a path.
292
+ */
293
+ path?: string;
232
294
  }
233
295
  /** @experimental */
234
296
  export interface AgentList {
@@ -271,6 +333,28 @@ export interface CommandsHandlePendingCommandResult {
271
333
  */
272
334
  success: boolean;
273
335
  }
336
+ /** @internal */
337
+ export interface ConnectRequest {
338
+ /**
339
+ * Connection token; required when the server was started with COPILOT_CONNECTION_TOKEN
340
+ */
341
+ token?: string;
342
+ }
343
+ /** @internal */
344
+ export interface ConnectResult {
345
+ /**
346
+ * Always true on success
347
+ */
348
+ ok: true;
349
+ /**
350
+ * Server protocol version number
351
+ */
352
+ protocolVersion: number;
353
+ /**
354
+ * Server package version
355
+ */
356
+ version: string;
357
+ }
274
358
  export interface CurrentModel {
275
359
  /**
276
360
  * Currently active model identifier
@@ -289,6 +373,34 @@ export interface DiscoveredMcpServer {
289
373
  */
290
374
  enabled: boolean;
291
375
  }
376
+ export interface EmbeddedBlobResourceContents {
377
+ /**
378
+ * URI identifying the resource
379
+ */
380
+ uri: string;
381
+ /**
382
+ * MIME type of the blob content
383
+ */
384
+ mimeType?: string;
385
+ /**
386
+ * Base64-encoded binary content of the resource
387
+ */
388
+ blob: string;
389
+ }
390
+ export interface EmbeddedTextResourceContents {
391
+ /**
392
+ * URI identifying the resource
393
+ */
394
+ uri: string;
395
+ /**
396
+ * MIME type of the text content
397
+ */
398
+ mimeType?: string;
399
+ /**
400
+ * Text content of the resource
401
+ */
402
+ text: string;
403
+ }
292
404
  export interface Extension {
293
405
  /**
294
406
  * Source-qualified ID (e.g., 'project:my-ext', 'user:auth-helper')
@@ -326,6 +438,195 @@ export interface ExtensionsEnableRequest {
326
438
  */
327
439
  id: string;
328
440
  }
441
+ /**
442
+ * Expanded external tool result payload
443
+ *
444
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
445
+ * via the `definition` "ExternalToolTextResultForLlm".
446
+ */
447
+ export interface ExternalToolTextResultForLlm {
448
+ /**
449
+ * Text result returned to the model
450
+ */
451
+ textResultForLlm: string;
452
+ /**
453
+ * Execution outcome classification. Optional for back-compat; normalized to 'success' (or 'failure' when error is present) when missing or unrecognized.
454
+ */
455
+ resultType?: string;
456
+ /**
457
+ * Optional error message for failed executions
458
+ */
459
+ error?: string;
460
+ /**
461
+ * Detailed log content for timeline display
462
+ */
463
+ sessionLog?: string;
464
+ /**
465
+ * Optional tool-specific telemetry
466
+ */
467
+ toolTelemetry?: {
468
+ [k: string]: unknown;
469
+ };
470
+ /**
471
+ * Structured content blocks from the tool
472
+ */
473
+ contents?: ExternalToolTextResultForLlmContent[];
474
+ [k: string]: unknown;
475
+ }
476
+ /**
477
+ * Plain text content block
478
+ *
479
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
480
+ * via the `definition` "ExternalToolTextResultForLlmContentText".
481
+ */
482
+ export interface ExternalToolTextResultForLlmContentText {
483
+ /**
484
+ * Content block type discriminator
485
+ */
486
+ type: "text";
487
+ /**
488
+ * The text content
489
+ */
490
+ text: string;
491
+ }
492
+ /**
493
+ * Terminal/shell output content block with optional exit code and working directory
494
+ *
495
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
496
+ * via the `definition` "ExternalToolTextResultForLlmContentTerminal".
497
+ */
498
+ export interface ExternalToolTextResultForLlmContentTerminal {
499
+ /**
500
+ * Content block type discriminator
501
+ */
502
+ type: "terminal";
503
+ /**
504
+ * Terminal/shell output text
505
+ */
506
+ text: string;
507
+ /**
508
+ * Process exit code, if the command has completed
509
+ */
510
+ exitCode?: number;
511
+ /**
512
+ * Working directory where the command was executed
513
+ */
514
+ cwd?: string;
515
+ }
516
+ /**
517
+ * Image content block with base64-encoded data
518
+ *
519
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
520
+ * via the `definition` "ExternalToolTextResultForLlmContentImage".
521
+ */
522
+ export interface ExternalToolTextResultForLlmContentImage {
523
+ /**
524
+ * Content block type discriminator
525
+ */
526
+ type: "image";
527
+ /**
528
+ * Base64-encoded image data
529
+ */
530
+ data: string;
531
+ /**
532
+ * MIME type of the image (e.g., image/png, image/jpeg)
533
+ */
534
+ mimeType: string;
535
+ }
536
+ /**
537
+ * Audio content block with base64-encoded data
538
+ *
539
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
540
+ * via the `definition` "ExternalToolTextResultForLlmContentAudio".
541
+ */
542
+ export interface ExternalToolTextResultForLlmContentAudio {
543
+ /**
544
+ * Content block type discriminator
545
+ */
546
+ type: "audio";
547
+ /**
548
+ * Base64-encoded audio data
549
+ */
550
+ data: string;
551
+ /**
552
+ * MIME type of the audio (e.g., audio/wav, audio/mpeg)
553
+ */
554
+ mimeType: string;
555
+ }
556
+ /**
557
+ * Resource link content block referencing an external resource
558
+ *
559
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
560
+ * via the `definition` "ExternalToolTextResultForLlmContentResourceLink".
561
+ */
562
+ export interface ExternalToolTextResultForLlmContentResourceLink {
563
+ /**
564
+ * Icons associated with this resource
565
+ */
566
+ icons?: ExternalToolTextResultForLlmContentResourceLinkIcon[];
567
+ /**
568
+ * Resource name identifier
569
+ */
570
+ name: string;
571
+ /**
572
+ * Human-readable display title for the resource
573
+ */
574
+ title?: string;
575
+ /**
576
+ * URI identifying the resource
577
+ */
578
+ uri: string;
579
+ /**
580
+ * Human-readable description of the resource
581
+ */
582
+ description?: string;
583
+ /**
584
+ * MIME type of the resource content
585
+ */
586
+ mimeType?: string;
587
+ /**
588
+ * Size of the resource in bytes
589
+ */
590
+ size?: number;
591
+ /**
592
+ * Content block type discriminator
593
+ */
594
+ type: "resource_link";
595
+ }
596
+ /**
597
+ * Icon image for a resource
598
+ *
599
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
600
+ * via the `definition` "ExternalToolTextResultForLlmContentResourceLinkIcon".
601
+ */
602
+ export interface ExternalToolTextResultForLlmContentResourceLinkIcon {
603
+ /**
604
+ * URL or path to the icon image
605
+ */
606
+ src: string;
607
+ /**
608
+ * MIME type of the icon image
609
+ */
610
+ mimeType?: string;
611
+ /**
612
+ * Available icon sizes (e.g., ['16x16', '32x32'])
613
+ */
614
+ sizes?: string[];
615
+ theme?: ExternalToolTextResultForLlmContentResourceLinkIconTheme;
616
+ }
617
+ /**
618
+ * Embedded resource content block with inline text or binary data
619
+ *
620
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
621
+ * via the `definition` "ExternalToolTextResultForLlmContentResource".
622
+ */
623
+ export interface ExternalToolTextResultForLlmContentResource {
624
+ /**
625
+ * Content block type discriminator
626
+ */
627
+ type: "resource";
628
+ resource: ExternalToolTextResultForLlmContentResourceDetails;
629
+ }
329
630
  /** @experimental */
330
631
  export interface FleetStartRequest {
331
632
  /**
@@ -340,7 +641,18 @@ export interface FleetStartResult {
340
641
  */
341
642
  started: boolean;
342
643
  }
343
- export interface HandleToolCallResult {
644
+ export interface HandlePendingToolCallRequest {
645
+ /**
646
+ * Request ID of the pending tool call
647
+ */
648
+ requestId: string;
649
+ result?: ExternalToolResult;
650
+ /**
651
+ * Error message if the tool call failed
652
+ */
653
+ error?: string;
654
+ }
655
+ export interface HandlePendingToolCallResult {
344
656
  /**
345
657
  * Whether the tool call result was handled successfully
346
658
  */
@@ -507,6 +819,7 @@ export interface McpServerConfigHttp {
507
819
  };
508
820
  oauthClientId?: string;
509
821
  oauthPublicClient?: boolean;
822
+ oauthGrantType?: McpServerConfigHttpOauthGrantType;
510
823
  }
511
824
  export interface McpConfigDisableRequest {
512
825
  /**
@@ -811,7 +1124,7 @@ export interface ModeSetRequest {
811
1124
  }
812
1125
  export interface NameGetResult {
813
1126
  /**
814
- * The session name, falling back to the auto-generated summary, or null if neither exists
1127
+ * The session name (user-set or auto-generated), or null if not yet set
815
1128
  */
816
1129
  name: string | null;
817
1130
  }
@@ -832,7 +1145,11 @@ export interface PermissionDecisionApproveForSession {
832
1145
  * Approved and remembered for the rest of the session
833
1146
  */
834
1147
  kind: "approve-for-session";
835
- approval: PermissionDecisionApproveForSessionApproval;
1148
+ approval?: PermissionDecisionApproveForSessionApproval;
1149
+ /**
1150
+ * The URL domain to approve for this session
1151
+ */
1152
+ domain?: string;
836
1153
  }
837
1154
  export interface PermissionDecisionApproveForSessionApprovalCommands {
838
1155
  kind: "commands";
@@ -897,6 +1214,16 @@ export interface PermissionDecisionApproveForLocationApprovalCustomTool {
897
1214
  kind: "custom-tool";
898
1215
  toolName: string;
899
1216
  }
1217
+ export interface PermissionDecisionApprovePermanently {
1218
+ /**
1219
+ * Approved and persisted across sessions
1220
+ */
1221
+ kind: "approve-permanently";
1222
+ /**
1223
+ * The URL domain to approve permanently
1224
+ */
1225
+ domain: string;
1226
+ }
900
1227
  export interface PermissionDecisionReject {
901
1228
  /**
902
1229
  * Denied by the user during an interactive prompt
@@ -1011,6 +1338,17 @@ export interface PluginList {
1011
1338
  */
1012
1339
  plugins: Plugin[];
1013
1340
  }
1341
+ /** @experimental */
1342
+ export interface RemoteEnableResult {
1343
+ /**
1344
+ * Mission Control frontend URL for this session
1345
+ */
1346
+ url?: string;
1347
+ /**
1348
+ * Whether remote steering is enabled
1349
+ */
1350
+ remoteSteerable: boolean;
1351
+ }
1014
1352
  export interface ServerSkill {
1015
1353
  /**
1016
1354
  * Unique identifier for the skill
@@ -1407,6 +1745,194 @@ export interface SkillsEnableRequest {
1407
1745
  */
1408
1746
  name: string;
1409
1747
  }
1748
+ export interface TaskAgentInfo {
1749
+ /**
1750
+ * Task kind
1751
+ */
1752
+ type: "agent";
1753
+ /**
1754
+ * Unique task identifier
1755
+ */
1756
+ id: string;
1757
+ /**
1758
+ * Tool call ID associated with this agent task
1759
+ */
1760
+ toolCallId: string;
1761
+ /**
1762
+ * Short description of the task
1763
+ */
1764
+ description: string;
1765
+ status: TaskAgentInfoStatus;
1766
+ /**
1767
+ * ISO 8601 timestamp when the task was started
1768
+ */
1769
+ startedAt: string;
1770
+ /**
1771
+ * ISO 8601 timestamp when the task finished
1772
+ */
1773
+ completedAt?: string;
1774
+ /**
1775
+ * Accumulated active execution time in milliseconds
1776
+ */
1777
+ activeTimeMs?: number;
1778
+ /**
1779
+ * ISO 8601 timestamp when the current active period began
1780
+ */
1781
+ activeStartedAt?: string;
1782
+ /**
1783
+ * Error message when the task failed
1784
+ */
1785
+ error?: string;
1786
+ /**
1787
+ * Type of agent running this task
1788
+ */
1789
+ agentType: string;
1790
+ /**
1791
+ * Prompt passed to the agent
1792
+ */
1793
+ prompt: string;
1794
+ /**
1795
+ * Result text from the task when available
1796
+ */
1797
+ result?: string;
1798
+ /**
1799
+ * Model used for the task when specified
1800
+ */
1801
+ model?: string;
1802
+ executionMode?: TaskAgentInfoExecutionMode;
1803
+ /**
1804
+ * Whether the task is currently in the original sync wait and can be moved to background mode. False once it is already backgrounded, idle, finished, or no longer has a promotable sync waiter.
1805
+ */
1806
+ canPromoteToBackground?: boolean;
1807
+ /**
1808
+ * Most recent response text from the agent
1809
+ */
1810
+ latestResponse?: string;
1811
+ /**
1812
+ * ISO 8601 timestamp when the agent entered idle state
1813
+ */
1814
+ idleSince?: string;
1815
+ }
1816
+ export interface TaskShellInfo {
1817
+ /**
1818
+ * Task kind
1819
+ */
1820
+ type: "shell";
1821
+ /**
1822
+ * Unique task identifier
1823
+ */
1824
+ id: string;
1825
+ /**
1826
+ * Short description of the task
1827
+ */
1828
+ description: string;
1829
+ status: TaskShellInfoStatus;
1830
+ /**
1831
+ * ISO 8601 timestamp when the task was started
1832
+ */
1833
+ startedAt: string;
1834
+ /**
1835
+ * ISO 8601 timestamp when the task finished
1836
+ */
1837
+ completedAt?: string;
1838
+ /**
1839
+ * Command being executed
1840
+ */
1841
+ command: string;
1842
+ attachmentMode: TaskShellInfoAttachmentMode;
1843
+ executionMode?: TaskShellInfoExecutionMode;
1844
+ /**
1845
+ * Whether this shell task can be promoted to background mode
1846
+ */
1847
+ canPromoteToBackground?: boolean;
1848
+ /**
1849
+ * Path to the detached shell log, when available
1850
+ */
1851
+ logPath?: string;
1852
+ /**
1853
+ * Process ID when available
1854
+ */
1855
+ pid?: number;
1856
+ }
1857
+ /** @experimental */
1858
+ export interface TaskList {
1859
+ /**
1860
+ * Currently tracked tasks
1861
+ */
1862
+ tasks: TaskInfo[];
1863
+ }
1864
+ /** @experimental */
1865
+ export interface TasksCancelRequest {
1866
+ /**
1867
+ * Task identifier
1868
+ */
1869
+ id: string;
1870
+ }
1871
+ /** @experimental */
1872
+ export interface TasksCancelResult {
1873
+ /**
1874
+ * Whether the task was successfully cancelled
1875
+ */
1876
+ cancelled: boolean;
1877
+ }
1878
+ /** @experimental */
1879
+ export interface TasksPromoteToBackgroundRequest {
1880
+ /**
1881
+ * Task identifier
1882
+ */
1883
+ id: string;
1884
+ }
1885
+ /** @experimental */
1886
+ export interface TasksPromoteToBackgroundResult {
1887
+ /**
1888
+ * Whether the task was successfully promoted to background mode
1889
+ */
1890
+ promoted: boolean;
1891
+ }
1892
+ /** @experimental */
1893
+ export interface TasksRemoveRequest {
1894
+ /**
1895
+ * Task identifier
1896
+ */
1897
+ id: string;
1898
+ }
1899
+ /** @experimental */
1900
+ export interface TasksRemoveResult {
1901
+ /**
1902
+ * Whether the task was removed. Returns false if the task does not exist or is still running/idle (cancel it first).
1903
+ */
1904
+ removed: boolean;
1905
+ }
1906
+ /** @experimental */
1907
+ export interface TasksStartAgentRequest {
1908
+ /**
1909
+ * Type of agent to start (e.g., 'explore', 'task', 'general-purpose')
1910
+ */
1911
+ agentType: string;
1912
+ /**
1913
+ * Task prompt for the agent
1914
+ */
1915
+ prompt: string;
1916
+ /**
1917
+ * Short name for the agent, used to generate a human-readable ID
1918
+ */
1919
+ name: string;
1920
+ /**
1921
+ * Short description of the task
1922
+ */
1923
+ description?: string;
1924
+ /**
1925
+ * Optional model override
1926
+ */
1927
+ model?: string;
1928
+ }
1929
+ /** @experimental */
1930
+ export interface TasksStartAgentResult {
1931
+ /**
1932
+ * Generated agent ID for the background task
1933
+ */
1934
+ agentId: string;
1935
+ }
1410
1936
  export interface Tool {
1411
1937
  /**
1412
1938
  * Tool identifier (e.g., "bash", "grep", "str_replace_editor")
@@ -1431,43 +1957,12 @@ export interface Tool {
1431
1957
  */
1432
1958
  instructions?: string;
1433
1959
  }
1434
- export interface ToolCallResult {
1435
- /**
1436
- * Text result to send back to the LLM
1437
- */
1438
- textResultForLlm: string;
1439
- /**
1440
- * Type of the tool result
1441
- */
1442
- resultType?: string;
1443
- /**
1444
- * Error message if the tool call failed
1445
- */
1446
- error?: string;
1447
- /**
1448
- * Telemetry data from tool execution
1449
- */
1450
- toolTelemetry?: {
1451
- [k: string]: unknown;
1452
- };
1453
- }
1454
1960
  export interface ToolList {
1455
1961
  /**
1456
1962
  * List of available built-in tools with metadata
1457
1963
  */
1458
1964
  tools: Tool[];
1459
1965
  }
1460
- export interface ToolsHandlePendingToolCallRequest {
1461
- /**
1462
- * Request ID of the pending tool call
1463
- */
1464
- requestId: string;
1465
- result?: ToolsHandlePendingToolCall;
1466
- /**
1467
- * Error message if the tool call failed
1468
- */
1469
- error?: string;
1470
- }
1471
1966
  export interface ToolsListRequest {
1472
1967
  /**
1473
1968
  * Optional model ID — when provided, the returned tool list reflects model-specific overrides
@@ -1616,6 +2111,16 @@ export interface UsageGetMetricsResult {
1616
2111
  * Raw count of user-initiated API requests
1617
2112
  */
1618
2113
  totalUserRequests: number;
2114
+ /**
2115
+ * Session-wide accumulated nano-AI units cost
2116
+ */
2117
+ totalNanoAiu?: number;
2118
+ /**
2119
+ * Session-wide per-token-type accumulated token counts
2120
+ */
2121
+ tokenDetails?: {
2122
+ [k: string]: UsageMetricsTokenDetail;
2123
+ };
1619
2124
  /**
1620
2125
  * Total time spent in model API calls (milliseconds)
1621
2126
  */
@@ -1644,6 +2149,12 @@ export interface UsageGetMetricsResult {
1644
2149
  */
1645
2150
  lastCallOutputTokens: number;
1646
2151
  }
2152
+ export interface UsageMetricsTokenDetail {
2153
+ /**
2154
+ * Accumulated token count for this token type
2155
+ */
2156
+ tokenCount: number;
2157
+ }
1647
2158
  /**
1648
2159
  * Aggregated code change metrics
1649
2160
  *
@@ -1667,6 +2178,16 @@ export interface UsageMetricsCodeChanges {
1667
2178
  export interface UsageMetricsModelMetric {
1668
2179
  requests: UsageMetricsModelMetricRequests;
1669
2180
  usage: UsageMetricsModelMetricUsage;
2181
+ /**
2182
+ * Accumulated nano-AI units cost for this model
2183
+ */
2184
+ totalNanoAiu?: number;
2185
+ /**
2186
+ * Token count details per type
2187
+ */
2188
+ tokenDetails?: {
2189
+ [k: string]: UsageMetricsModelMetricTokenDetail;
2190
+ };
1670
2191
  }
1671
2192
  /**
1672
2193
  * Request count and cost metrics for this model
@@ -1712,6 +2233,12 @@ export interface UsageMetricsModelMetricUsage {
1712
2233
  */
1713
2234
  reasoningTokens?: number;
1714
2235
  }
2236
+ export interface UsageMetricsModelMetricTokenDetail {
2237
+ /**
2238
+ * Accumulated token count for this token type
2239
+ */
2240
+ tokenCount: number;
2241
+ }
1715
2242
  export interface WorkspacesCreateFileRequest {
1716
2243
  /**
1717
2244
  * Relative path within the workspace files directory
@@ -1733,8 +2260,9 @@ export interface WorkspacesGetWorkspaceResult {
1733
2260
  repository?: string;
1734
2261
  host_type?: "github" | "ado";
1735
2262
  branch?: string;
1736
- summary?: string;
1737
2263
  name?: string;
2264
+ user_named?: boolean;
2265
+ summary?: string;
1738
2266
  summary_count?: number;
1739
2267
  created_at?: string;
1740
2268
  updated_at?: string;
@@ -1801,8 +2329,17 @@ export declare function createServerRpc(connection: MessageConnection): {
1801
2329
  fork: (params: SessionsForkRequest) => Promise<SessionsForkResult>;
1802
2330
  };
1803
2331
  };
2332
+ /**
2333
+ * Create typed server-scoped RPC methods that are part of the SDK's internal
2334
+ * surface (e.g. handshake helpers). Not exported on the public client API.
2335
+ * @internal
2336
+ */
2337
+ export declare function createInternalServerRpc(connection: MessageConnection): {
2338
+ connect: (params: ConnectRequest) => Promise<ConnectResult>;
2339
+ };
1804
2340
  /** Create typed session-scoped RPC methods. */
1805
2341
  export declare function createSessionRpc(connection: MessageConnection, sessionId: string): {
2342
+ suspend: () => Promise<void>;
1806
2343
  auth: {
1807
2344
  getStatus: () => Promise<SessionAuthStatus>;
1808
2345
  };
@@ -1845,6 +2382,14 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
1845
2382
  reload: () => Promise<AgentReloadResult>;
1846
2383
  };
1847
2384
  /** @experimental */
2385
+ tasks: {
2386
+ startAgent: (params: TasksStartAgentRequest) => Promise<TasksStartAgentResult>;
2387
+ list: () => Promise<TaskList>;
2388
+ promoteToBackground: (params: TasksPromoteToBackgroundRequest) => Promise<TasksPromoteToBackgroundResult>;
2389
+ cancel: (params: TasksCancelRequest) => Promise<TasksCancelResult>;
2390
+ remove: (params: TasksRemoveRequest) => Promise<TasksRemoveResult>;
2391
+ };
2392
+ /** @experimental */
1848
2393
  skills: {
1849
2394
  list: () => Promise<SkillList>;
1850
2395
  enable: (params: SkillsEnableRequest) => Promise<void>;
@@ -1874,7 +2419,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
1874
2419
  reload: () => Promise<void>;
1875
2420
  };
1876
2421
  tools: {
1877
- handlePendingToolCall: (params: ToolsHandlePendingToolCallRequest) => Promise<HandleToolCallResult>;
2422
+ handlePendingToolCall: (params: HandlePendingToolCallRequest) => Promise<HandlePendingToolCallResult>;
1878
2423
  };
1879
2424
  commands: {
1880
2425
  handlePendingCommand: (params: CommandsHandlePendingCommandRequest) => Promise<CommandsHandlePendingCommandResult>;
@@ -1902,6 +2447,11 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
1902
2447
  usage: {
1903
2448
  getMetrics: () => Promise<UsageGetMetricsResult>;
1904
2449
  };
2450
+ /** @experimental */
2451
+ remote: {
2452
+ enable: () => Promise<RemoteEnableResult>;
2453
+ disable: () => Promise<void>;
2454
+ };
1905
2455
  };
1906
2456
  /** Handler for `sessionFs` client session API methods. */
1907
2457
  export interface SessionFsHandler {