@github/copilot-sdk 1.0.0-beta.3 → 1.0.0-beta.4

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.
@@ -117,7 +117,8 @@ function createSessionRpc(connection, sessionId) {
117
117
  list: async () => connection.sendRequest("session.tasks.list", { sessionId }),
118
118
  promoteToBackground: async (params) => connection.sendRequest("session.tasks.promoteToBackground", { sessionId, ...params }),
119
119
  cancel: async (params) => connection.sendRequest("session.tasks.cancel", { sessionId, ...params }),
120
- remove: async (params) => connection.sendRequest("session.tasks.remove", { sessionId, ...params })
120
+ remove: async (params) => connection.sendRequest("session.tasks.remove", { sessionId, ...params }),
121
+ sendMessage: async (params) => connection.sendRequest("session.tasks.sendMessage", { sessionId, ...params })
121
122
  },
122
123
  /** @experimental */
123
124
  skills: {
@@ -152,7 +153,8 @@ function createSessionRpc(connection, sessionId) {
152
153
  handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", { sessionId, ...params })
153
154
  },
154
155
  commands: {
155
- handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", { sessionId, ...params })
156
+ handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", { sessionId, ...params }),
157
+ respondToQueuedCommand: async (params) => connection.sendRequest("session.commands.respondToQueuedCommand", { sessionId, ...params })
156
158
  },
157
159
  ui: {
158
160
  elicitation: async (params) => connection.sendRequest("session.ui.elicitation", { sessionId, ...params }),
@@ -10,6 +10,13 @@ import type { MessageConnection } from "vscode-jsonrpc/node.js";
10
10
  * via the `definition` "AuthInfoType".
11
11
  */
12
12
  export type AuthInfoType = "hmac" | "env" | "user" | "gh-cli" | "api-key" | "token" | "copilot-api-token";
13
+ /**
14
+ * Result of the queued command execution
15
+ *
16
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
17
+ * via the `definition` "QueuedCommandResult".
18
+ */
19
+ export type QueuedCommandResult = QueuedCommandHandled | QueuedCommandNotHandled;
13
20
  /**
14
21
  * Server transport type: stdio, http, sse, or memory (local configs are normalized to stdio)
15
22
  *
@@ -122,6 +129,20 @@ export type McpServerStatus = "connected" | "failed" | "needs-auth" | "pending"
122
129
  * via the `definition` "McpServerSource".
123
130
  */
124
131
  export type McpServerSource = "user" | "workspace" | "plugin" | "builtin";
132
+ /**
133
+ * Model capability category for grouping in the model picker
134
+ *
135
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
136
+ * via the `definition` "ModelPickerCategory".
137
+ */
138
+ export type ModelPickerCategory = "lightweight" | "versatile" | "powerful";
139
+ /**
140
+ * Relative cost tier for token-based billing users
141
+ *
142
+ * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
143
+ * via the `definition` "ModelPickerPriceCategory".
144
+ */
145
+ export type ModelPickerPriceCategory = "low" | "medium" | "high" | "very_high";
125
146
  /**
126
147
  * The agent mode. Valid values: "interactive", "plan", "autopilot".
127
148
  *
@@ -136,14 +157,14 @@ export type PermissionDecision = PermissionDecisionApproveOnce | PermissionDecis
136
157
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
137
158
  * via the `definition` "PermissionDecisionApproveForSessionApproval".
138
159
  */
139
- export type PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMcp | PermissionDecisionApproveForSessionApprovalMcpSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool;
160
+ export type PermissionDecisionApproveForSessionApproval = PermissionDecisionApproveForSessionApprovalCommands | PermissionDecisionApproveForSessionApprovalRead | PermissionDecisionApproveForSessionApprovalWrite | PermissionDecisionApproveForSessionApprovalMcp | PermissionDecisionApproveForSessionApprovalMcpSampling | PermissionDecisionApproveForSessionApprovalMemory | PermissionDecisionApproveForSessionApprovalCustomTool | PermissionDecisionApproveForSessionApprovalExtensionManagement | PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess;
140
161
  /**
141
162
  * The approval to persist for this location
142
163
  *
143
164
  * This interface was referenced by `_RpcSchemaRoot`'s JSON-Schema
144
165
  * via the `definition` "PermissionDecisionApproveForLocationApproval".
145
166
  */
146
- export type PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMcp | PermissionDecisionApproveForLocationApprovalMcpSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool;
167
+ export type PermissionDecisionApproveForLocationApproval = PermissionDecisionApproveForLocationApprovalCommands | PermissionDecisionApproveForLocationApprovalRead | PermissionDecisionApproveForLocationApprovalWrite | PermissionDecisionApproveForLocationApprovalMcp | PermissionDecisionApproveForLocationApprovalMcpSampling | PermissionDecisionApproveForLocationApprovalMemory | PermissionDecisionApproveForLocationApprovalCustomTool | PermissionDecisionApproveForLocationApprovalExtensionManagement | PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess;
147
168
  /**
148
169
  * Error classification
149
170
  *
@@ -333,6 +354,35 @@ export interface CommandsHandlePendingCommandResult {
333
354
  */
334
355
  success: boolean;
335
356
  }
357
+ export interface CommandsRespondToQueuedCommandRequest {
358
+ /**
359
+ * Request ID from the queued command event
360
+ */
361
+ requestId: string;
362
+ result: QueuedCommandResult;
363
+ }
364
+ export interface QueuedCommandHandled {
365
+ /**
366
+ * The command was handled
367
+ */
368
+ handled: true;
369
+ /**
370
+ * If true, stop processing remaining queued items
371
+ */
372
+ stopProcessingQueue?: boolean;
373
+ }
374
+ export interface QueuedCommandNotHandled {
375
+ /**
376
+ * The command was not handled
377
+ */
378
+ handled: false;
379
+ }
380
+ export interface CommandsRespondToQueuedCommandResult {
381
+ /**
382
+ * Whether the response was accepted (false if the requestId was not found or already resolved)
383
+ */
384
+ success: boolean;
385
+ }
336
386
  /** @internal */
337
387
  export interface ConnectRequest {
338
388
  /**
@@ -945,6 +995,8 @@ export interface Model {
945
995
  * Default reasoning effort level (only present if model supports reasoning effort)
946
996
  */
947
997
  defaultReasoningEffort?: string;
998
+ modelPickerCategory?: ModelPickerCategory;
999
+ modelPickerPriceCategory?: ModelPickerPriceCategory;
948
1000
  }
949
1001
  /**
950
1002
  * Model capabilities and limits
@@ -1039,7 +1091,7 @@ export interface ModelBilling {
1039
1091
  /**
1040
1092
  * Billing cost multiplier relative to the base rate
1041
1093
  */
1042
- multiplier: number;
1094
+ multiplier?: number;
1043
1095
  }
1044
1096
  /**
1045
1097
  * Override individual model capabilities resolved by the runtime
@@ -1177,6 +1229,14 @@ export interface PermissionDecisionApproveForSessionApprovalCustomTool {
1177
1229
  kind: "custom-tool";
1178
1230
  toolName: string;
1179
1231
  }
1232
+ export interface PermissionDecisionApproveForSessionApprovalExtensionManagement {
1233
+ kind: "extension-management";
1234
+ operation?: string;
1235
+ }
1236
+ export interface PermissionDecisionApproveForSessionApprovalExtensionPermissionAccess {
1237
+ kind: "extension-permission-access";
1238
+ extensionName: string;
1239
+ }
1180
1240
  export interface PermissionDecisionApproveForLocation {
1181
1241
  /**
1182
1242
  * Approved and persisted for this project location
@@ -1214,6 +1274,14 @@ export interface PermissionDecisionApproveForLocationApprovalCustomTool {
1214
1274
  kind: "custom-tool";
1215
1275
  toolName: string;
1216
1276
  }
1277
+ export interface PermissionDecisionApproveForLocationApprovalExtensionManagement {
1278
+ kind: "extension-management";
1279
+ operation?: string;
1280
+ }
1281
+ export interface PermissionDecisionApproveForLocationApprovalExtensionPermissionAccess {
1282
+ kind: "extension-permission-access";
1283
+ extensionName: string;
1284
+ }
1217
1285
  export interface PermissionDecisionApprovePermanently {
1218
1286
  /**
1219
1287
  * Approved and persisted across sessions
@@ -1904,6 +1972,32 @@ export interface TasksRemoveResult {
1904
1972
  removed: boolean;
1905
1973
  }
1906
1974
  /** @experimental */
1975
+ export interface TasksSendMessageRequest {
1976
+ /**
1977
+ * Agent task identifier
1978
+ */
1979
+ id: string;
1980
+ /**
1981
+ * Message content to send to the agent
1982
+ */
1983
+ message: string;
1984
+ /**
1985
+ * Agent ID of the sender, if sent on behalf of another agent
1986
+ */
1987
+ fromAgentId?: string;
1988
+ }
1989
+ /** @experimental */
1990
+ export interface TasksSendMessageResult {
1991
+ /**
1992
+ * Whether the message was successfully delivered or steered
1993
+ */
1994
+ sent: boolean;
1995
+ /**
1996
+ * Error message if delivery failed
1997
+ */
1998
+ error?: string;
1999
+ }
2000
+ /** @experimental */
1907
2001
  export interface TasksStartAgentRequest {
1908
2002
  /**
1909
2003
  * Type of agent to start (e.g., 'explore', 'task', 'general-purpose')
@@ -2262,7 +2356,6 @@ export interface WorkspacesGetWorkspaceResult {
2262
2356
  branch?: string;
2263
2357
  name?: string;
2264
2358
  user_named?: boolean;
2265
- summary?: string;
2266
2359
  summary_count?: number;
2267
2360
  created_at?: string;
2268
2361
  updated_at?: string;
@@ -2270,7 +2363,6 @@ export interface WorkspacesGetWorkspaceResult {
2270
2363
  mc_task_id?: string;
2271
2364
  mc_session_id?: string;
2272
2365
  mc_last_event_id?: string;
2273
- session_sync_level?: "local" | "user" | "repo_and_user";
2274
2366
  chronicle_sync_dismissed?: boolean;
2275
2367
  } | null;
2276
2368
  }
@@ -2388,6 +2480,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
2388
2480
  promoteToBackground: (params: TasksPromoteToBackgroundRequest) => Promise<TasksPromoteToBackgroundResult>;
2389
2481
  cancel: (params: TasksCancelRequest) => Promise<TasksCancelResult>;
2390
2482
  remove: (params: TasksRemoveRequest) => Promise<TasksRemoveResult>;
2483
+ sendMessage: (params: TasksSendMessageRequest) => Promise<TasksSendMessageResult>;
2391
2484
  };
2392
2485
  /** @experimental */
2393
2486
  skills: {
@@ -2423,6 +2516,7 @@ export declare function createSessionRpc(connection: MessageConnection, sessionI
2423
2516
  };
2424
2517
  commands: {
2425
2518
  handlePendingCommand: (params: CommandsHandlePendingCommandRequest) => Promise<CommandsHandlePendingCommandResult>;
2519
+ respondToQueuedCommand: (params: CommandsRespondToQueuedCommandRequest) => Promise<CommandsRespondToQueuedCommandResult>;
2426
2520
  };
2427
2521
  ui: {
2428
2522
  elicitation: (params: UIElicitationRequest) => Promise<UIElicitationResponse>;
@@ -91,7 +91,8 @@ function createSessionRpc(connection, sessionId) {
91
91
  list: async () => connection.sendRequest("session.tasks.list", { sessionId }),
92
92
  promoteToBackground: async (params) => connection.sendRequest("session.tasks.promoteToBackground", { sessionId, ...params }),
93
93
  cancel: async (params) => connection.sendRequest("session.tasks.cancel", { sessionId, ...params }),
94
- remove: async (params) => connection.sendRequest("session.tasks.remove", { sessionId, ...params })
94
+ remove: async (params) => connection.sendRequest("session.tasks.remove", { sessionId, ...params }),
95
+ sendMessage: async (params) => connection.sendRequest("session.tasks.sendMessage", { sessionId, ...params })
95
96
  },
96
97
  /** @experimental */
97
98
  skills: {
@@ -126,7 +127,8 @@ function createSessionRpc(connection, sessionId) {
126
127
  handlePendingToolCall: async (params) => connection.sendRequest("session.tools.handlePendingToolCall", { sessionId, ...params })
127
128
  },
128
129
  commands: {
129
- handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", { sessionId, ...params })
130
+ handlePendingCommand: async (params) => connection.sendRequest("session.commands.handlePendingCommand", { sessionId, ...params }),
131
+ respondToQueuedCommand: async (params) => connection.sendRequest("session.commands.respondToQueuedCommand", { sessionId, ...params })
130
132
  },
131
133
  ui: {
132
134
  elicitation: async (params) => connection.sendRequest("session.ui.elicitation", { sessionId, ...params }),
@@ -74,7 +74,7 @@ export type SystemNotificationAgentCompletedStatus = "completed" | "failed";
74
74
  /**
75
75
  * Details of the permission being requested
76
76
  */
77
- export type PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook;
77
+ export type PermissionRequest = PermissionRequestShell | PermissionRequestWrite | PermissionRequestRead | PermissionRequestMcp | PermissionRequestUrl | PermissionRequestMemory | PermissionRequestCustomTool | PermissionRequestHook | PermissionRequestExtensionManagement | PermissionRequestExtensionPermissionAccess;
78
78
  /**
79
79
  * Whether this is a store or vote memory operation
80
80
  */
@@ -86,7 +86,7 @@ export type PermissionRequestMemoryDirection = "upvote" | "downvote";
86
86
  /**
87
87
  * Derived user-facing permission prompt details for UI consumers
88
88
  */
89
- export type PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook;
89
+ export type PermissionPromptRequest = PermissionPromptRequestCommands | PermissionPromptRequestWrite | PermissionPromptRequestRead | PermissionPromptRequestMcp | PermissionPromptRequestUrl | PermissionPromptRequestMemory | PermissionPromptRequestCustomTool | PermissionPromptRequestPath | PermissionPromptRequestHook | PermissionPromptRequestExtensionManagement | PermissionPromptRequestExtensionPermissionAccess;
90
90
  /**
91
91
  * Whether this is a store or vote memory operation
92
92
  */
@@ -106,7 +106,7 @@ export type PermissionResult = PermissionApproved | PermissionApprovedForSession
106
106
  /**
107
107
  * The approval to add as a session-scoped rule
108
108
  */
109
- export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool;
109
+ export type UserToolSessionApproval = UserToolSessionApprovalCommands | UserToolSessionApprovalRead | UserToolSessionApprovalWrite | UserToolSessionApprovalMcp | UserToolSessionApprovalMemory | UserToolSessionApprovalCustomTool | UserToolSessionApprovalExtensionManagement | UserToolSessionApprovalExtensionPermissionAccess;
110
110
  /**
111
111
  * Elicitation mode; "form" for structured input, "url" for browser-based. Defaults to "form" when absent.
112
112
  */
@@ -169,6 +169,10 @@ export interface StartData {
169
169
  * Version string of the Copilot application
170
170
  */
171
171
  copilotVersion: string;
172
+ /**
173
+ * When set, identifies a parent session whose context this session continues — e.g., a detached headless rem-agent run launched on the parent's interactive shutdown. Telemetry from this session is reported under the parent's session_id.
174
+ */
175
+ detachedFromSpawningParentSessionId?: string;
172
176
  /**
173
177
  * Identifier of the software producing the events (e.g., "copilot-agent")
174
178
  */
@@ -1822,6 +1826,14 @@ export interface AssistantMessageEvent {
1822
1826
  * Assistant response containing text content, optional tool requests, and interaction metadata
1823
1827
  */
1824
1828
  export interface AssistantMessageData {
1829
+ /**
1830
+ * Raw Anthropic content array with advisor blocks (server_tool_use, advisor_tool_result) for verbatim round-tripping
1831
+ */
1832
+ anthropicAdvisorBlocks?: unknown[];
1833
+ /**
1834
+ * Anthropic advisor model ID used for this response, for timeline display on replay
1835
+ */
1836
+ anthropicAdvisorModel?: string;
1825
1837
  /**
1826
1838
  * The assistant's text response content
1827
1839
  */
@@ -1838,6 +1850,10 @@ export interface AssistantMessageData {
1838
1850
  * Unique identifier for this assistant message
1839
1851
  */
1840
1852
  messageId: string;
1853
+ /**
1854
+ * Model that produced this assistant message, if known
1855
+ */
1856
+ model?: string;
1841
1857
  /**
1842
1858
  * Actual output token count from the API response (completion_tokens), used for accurate token accounting
1843
1859
  */
@@ -3569,6 +3585,48 @@ export interface PermissionRequestHook {
3569
3585
  */
3570
3586
  toolName: string;
3571
3587
  }
3588
+ /**
3589
+ * Extension management permission request
3590
+ */
3591
+ export interface PermissionRequestExtensionManagement {
3592
+ /**
3593
+ * Name of the extension being managed
3594
+ */
3595
+ extensionName?: string;
3596
+ /**
3597
+ * Permission kind discriminator
3598
+ */
3599
+ kind: "extension-management";
3600
+ /**
3601
+ * The extension management operation (scaffold, reload)
3602
+ */
3603
+ operation: string;
3604
+ /**
3605
+ * Tool call ID that triggered this permission request
3606
+ */
3607
+ toolCallId?: string;
3608
+ }
3609
+ /**
3610
+ * Extension permission access request
3611
+ */
3612
+ export interface PermissionRequestExtensionPermissionAccess {
3613
+ /**
3614
+ * Capabilities the extension is requesting
3615
+ */
3616
+ capabilities: string[];
3617
+ /**
3618
+ * Name of the extension requesting permission access
3619
+ */
3620
+ extensionName: string;
3621
+ /**
3622
+ * Permission kind discriminator
3623
+ */
3624
+ kind: "extension-permission-access";
3625
+ /**
3626
+ * Tool call ID that triggered this permission request
3627
+ */
3628
+ toolCallId?: string;
3629
+ }
3572
3630
  /**
3573
3631
  * Shell command permission prompt
3574
3632
  */
@@ -3806,6 +3864,48 @@ export interface PermissionPromptRequestHook {
3806
3864
  */
3807
3865
  toolName: string;
3808
3866
  }
3867
+ /**
3868
+ * Extension management permission prompt
3869
+ */
3870
+ export interface PermissionPromptRequestExtensionManagement {
3871
+ /**
3872
+ * Name of the extension being managed
3873
+ */
3874
+ extensionName?: string;
3875
+ /**
3876
+ * Prompt kind discriminator
3877
+ */
3878
+ kind: "extension-management";
3879
+ /**
3880
+ * The extension management operation (scaffold, reload)
3881
+ */
3882
+ operation: string;
3883
+ /**
3884
+ * Tool call ID that triggered this permission request
3885
+ */
3886
+ toolCallId?: string;
3887
+ }
3888
+ /**
3889
+ * Extension permission access prompt
3890
+ */
3891
+ export interface PermissionPromptRequestExtensionPermissionAccess {
3892
+ /**
3893
+ * Capabilities the extension is requesting
3894
+ */
3895
+ capabilities: string[];
3896
+ /**
3897
+ * Name of the extension requesting permission access
3898
+ */
3899
+ extensionName: string;
3900
+ /**
3901
+ * Prompt kind discriminator
3902
+ */
3903
+ kind: "extension-permission-access";
3904
+ /**
3905
+ * Tool call ID that triggered this permission request
3906
+ */
3907
+ toolCallId?: string;
3908
+ }
3809
3909
  export interface PermissionCompletedEvent {
3810
3910
  /**
3811
3911
  * Sub-agent instance identifier. Absent for events from the root/main agent and session-level events.
@@ -3909,6 +4009,26 @@ export interface UserToolSessionApprovalCustomTool {
3909
4009
  */
3910
4010
  toolName: string;
3911
4011
  }
4012
+ export interface UserToolSessionApprovalExtensionManagement {
4013
+ /**
4014
+ * Extension management approval kind
4015
+ */
4016
+ kind: "extension-management";
4017
+ /**
4018
+ * Optional operation identifier
4019
+ */
4020
+ operation?: string;
4021
+ }
4022
+ export interface UserToolSessionApprovalExtensionPermissionAccess {
4023
+ /**
4024
+ * Extension name
4025
+ */
4026
+ extensionName: string;
4027
+ /**
4028
+ * Extension permission access approval kind
4029
+ */
4030
+ kind: "extension-permission-access";
4031
+ }
3912
4032
  export interface PermissionApprovedForLocation {
3913
4033
  approval: UserToolSessionApproval;
3914
4034
  /**
package/dist/types.d.ts CHANGED
@@ -1470,7 +1470,7 @@ export interface ModelPolicy {
1470
1470
  * Model billing information
1471
1471
  */
1472
1472
  export interface ModelBilling {
1473
- multiplier: number;
1473
+ multiplier?: number;
1474
1474
  }
1475
1475
  /**
1476
1476
  * Information about an available model
package/package.json CHANGED
@@ -4,7 +4,7 @@
4
4
  "type": "git",
5
5
  "url": "https://github.com/github/copilot-sdk.git"
6
6
  },
7
- "version": "1.0.0-beta.3",
7
+ "version": "1.0.0-beta.4",
8
8
  "description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
9
9
  "main": "./dist/cjs/index.js",
10
10
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "author": "GitHub",
57
57
  "license": "MIT",
58
58
  "dependencies": {
59
- "@github/copilot": "^1.0.44-2",
59
+ "@github/copilot": "^1.0.46",
60
60
  "vscode-jsonrpc": "^8.2.1",
61
61
  "zod": "^4.3.6"
62
62
  },