@github/copilot-sdk 1.0.4 → 1.0.5-preview.1
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/dist/cjs/client.js +23 -9
- package/dist/cjs/generated/rpc.js +63 -7
- package/dist/cjs/session.js +43 -3
- package/dist/client.js +23 -9
- package/dist/generated/rpc.d.ts +657 -12
- package/dist/generated/rpc.js +63 -7
- package/dist/generated/session-events.d.ts +504 -7
- package/dist/index.d.ts +1 -1
- package/dist/session.d.ts +1 -0
- package/dist/session.js +43 -3
- package/dist/types.d.ts +88 -9
- package/package.json +2 -2
package/dist/generated/rpc.js
CHANGED
|
@@ -6,8 +6,11 @@ function createServerRpc(connection) {
|
|
|
6
6
|
* @param params Optional message to echo back to the caller.
|
|
7
7
|
*
|
|
8
8
|
* @returns Server liveness response, including the echoed message, current server timestamp, and protocol version.
|
|
9
|
+
*
|
|
10
|
+
* @experimental
|
|
9
11
|
*/
|
|
10
12
|
ping: async (params) => connection.sendRequest("ping", params),
|
|
13
|
+
/** @experimental */
|
|
11
14
|
models: {
|
|
12
15
|
/**
|
|
13
16
|
* Lists Copilot models available to the authenticated user.
|
|
@@ -18,6 +21,7 @@ function createServerRpc(connection) {
|
|
|
18
21
|
*/
|
|
19
22
|
list: async (params) => connection.sendRequest("models.list", params)
|
|
20
23
|
},
|
|
24
|
+
/** @experimental */
|
|
21
25
|
tools: {
|
|
22
26
|
/**
|
|
23
27
|
* Lists built-in tools available for a model.
|
|
@@ -28,6 +32,7 @@ function createServerRpc(connection) {
|
|
|
28
32
|
*/
|
|
29
33
|
list: async (params) => connection.sendRequest("tools.list", params)
|
|
30
34
|
},
|
|
35
|
+
/** @experimental */
|
|
31
36
|
account: {
|
|
32
37
|
/**
|
|
33
38
|
* Gets Copilot quota usage for the authenticated user or supplied GitHub token.
|
|
@@ -66,6 +71,7 @@ function createServerRpc(connection) {
|
|
|
66
71
|
*/
|
|
67
72
|
logout: async (params) => connection.sendRequest("account.logout", params)
|
|
68
73
|
},
|
|
74
|
+
/** @experimental */
|
|
69
75
|
secrets: {
|
|
70
76
|
/**
|
|
71
77
|
* Registers secret values for redaction in session logs and exports. The SDK calls this to inject dynamically generated secret values (e.g., OIDC tokens).
|
|
@@ -76,7 +82,9 @@ function createServerRpc(connection) {
|
|
|
76
82
|
*/
|
|
77
83
|
addFilterValues: async (params) => connection.sendRequest("secrets.addFilterValues", params)
|
|
78
84
|
},
|
|
85
|
+
/** @experimental */
|
|
79
86
|
mcp: {
|
|
87
|
+
/** @experimental */
|
|
80
88
|
config: {
|
|
81
89
|
/**
|
|
82
90
|
* Lists MCP servers from user configuration.
|
|
@@ -218,7 +226,9 @@ function createServerRpc(connection) {
|
|
|
218
226
|
refresh: async (params) => connection.sendRequest("plugins.marketplaces.refresh", params)
|
|
219
227
|
}
|
|
220
228
|
},
|
|
229
|
+
/** @experimental */
|
|
221
230
|
skills: {
|
|
231
|
+
/** @experimental */
|
|
222
232
|
config: {
|
|
223
233
|
/**
|
|
224
234
|
* Replaces the global list of disabled skills.
|
|
@@ -241,8 +251,6 @@ function createServerRpc(connection) {
|
|
|
241
251
|
* @param params Optional project paths to enumerate.
|
|
242
252
|
*
|
|
243
253
|
* @returns Canonical locations where skills can be created so the runtime will recognize them.
|
|
244
|
-
*
|
|
245
|
-
* @experimental
|
|
246
254
|
*/
|
|
247
255
|
getDiscoveryPaths: async (params) => connection.sendRequest("skills.getDiscoveryPaths", params)
|
|
248
256
|
},
|
|
@@ -284,20 +292,38 @@ function createServerRpc(connection) {
|
|
|
284
292
|
*/
|
|
285
293
|
getDiscoveryPaths: async (params) => connection.sendRequest("instructions.getDiscoveryPaths", params)
|
|
286
294
|
},
|
|
295
|
+
/** @experimental */
|
|
287
296
|
user: {
|
|
297
|
+
/** @experimental */
|
|
288
298
|
settings: {
|
|
289
299
|
/**
|
|
290
300
|
* Drops this runtime process's in-memory user settings cache so the next settings read observes disk.
|
|
291
301
|
*/
|
|
292
|
-
reload: async () => connection.sendRequest("user.settings.reload", {})
|
|
302
|
+
reload: async () => connection.sendRequest("user.settings.reload", {}),
|
|
303
|
+
/**
|
|
304
|
+
* Lists every known user setting (settings.json overlaid with the legacy config.json, config.json wins), each with its effective value, its default, and whether it is at the default — so settings the user has never set still appear with their default value. Does not include repository- or enterprise-managed overrides that the runtime layers on top at session time.
|
|
305
|
+
*
|
|
306
|
+
* @returns Per-key metadata for every known user setting (settings.json overlaid with the legacy config.json, config.json wins), including settings left at their default. Excludes repository- and enterprise-managed overrides.
|
|
307
|
+
*/
|
|
308
|
+
get: async () => connection.sendRequest("user.settings.get", {}),
|
|
309
|
+
/**
|
|
310
|
+
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed. Returns the keys whose new value is shadowed by a legacy config.json entry (config.json wins on read), which the runtime leaves in place — such writes do not take effect until the legacy value is removed.
|
|
311
|
+
*
|
|
312
|
+
* @param params Partial user settings to write to settings.json. Each top-level key is written individually, replacing the existing value; a key whose value is null is removed.
|
|
313
|
+
*
|
|
314
|
+
* @returns Outcome of writing user settings.
|
|
315
|
+
*/
|
|
316
|
+
set: async (params) => connection.sendRequest("user.settings.set", params)
|
|
293
317
|
}
|
|
294
318
|
},
|
|
319
|
+
/** @experimental */
|
|
295
320
|
runtime: {
|
|
296
321
|
/**
|
|
297
322
|
* Gracefully shuts down an SDK-owned runtime. The response is sent only after cleanup completes; callers may then terminate the owned runtime process.
|
|
298
323
|
*/
|
|
299
324
|
shutdown: async () => connection.sendRequest("runtime.shutdown", {})
|
|
300
325
|
},
|
|
326
|
+
/** @experimental */
|
|
301
327
|
sessionFs: {
|
|
302
328
|
/**
|
|
303
329
|
* Registers an SDK client as the session filesystem provider.
|
|
@@ -537,6 +563,8 @@ function createInternalServerRpc(connection) {
|
|
|
537
563
|
* @param params Optional connection token presented by the SDK client during the handshake.
|
|
538
564
|
*
|
|
539
565
|
* @returns Handshake result reporting the server's protocol version and package version on success.
|
|
566
|
+
*
|
|
567
|
+
* @experimental
|
|
540
568
|
*/
|
|
541
569
|
connect: async (params) => connection.sendRequest("connect", params),
|
|
542
570
|
/** @experimental */
|
|
@@ -627,13 +655,13 @@ function createSessionRpc(connection, sessionId) {
|
|
|
627
655
|
*/
|
|
628
656
|
shutdown: async (params) => connection.sendRequest("session.shutdown", { sessionId, ...params }),
|
|
629
657
|
/** @experimental */
|
|
630
|
-
|
|
658
|
+
gitHubAuth: {
|
|
631
659
|
/**
|
|
632
660
|
* Gets authentication status and account metadata for the session.
|
|
633
661
|
*
|
|
634
662
|
* @returns Authentication status and account metadata for the session.
|
|
635
663
|
*/
|
|
636
|
-
getStatus: async () => connection.sendRequest("session.
|
|
664
|
+
getStatus: async () => connection.sendRequest("session.gitHubAuth.getStatus", { sessionId }),
|
|
637
665
|
/**
|
|
638
666
|
* Updates the session's auth credentials used for outbound model and API requests.
|
|
639
667
|
*
|
|
@@ -641,7 +669,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
641
669
|
*
|
|
642
670
|
* @returns Indicates whether the credential update succeeded.
|
|
643
671
|
*/
|
|
644
|
-
setCredentials: async (params) => connection.sendRequest("session.
|
|
672
|
+
setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", { sessionId, ...params })
|
|
645
673
|
},
|
|
646
674
|
/** @experimental */
|
|
647
675
|
canvas: {
|
|
@@ -1111,6 +1139,17 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1111
1139
|
login: async (params) => connection.sendRequest("session.mcp.oauth.login", { sessionId, ...params })
|
|
1112
1140
|
},
|
|
1113
1141
|
/** @experimental */
|
|
1142
|
+
headers: {
|
|
1143
|
+
/**
|
|
1144
|
+
* Responds to a pending MCP dynamic headers refresh request. Hosts that subscribe to `mcp.headers_refresh_required` use this to provide short-lived per-server headers or to indicate that no dynamic headers are available for this refresh.
|
|
1145
|
+
*
|
|
1146
|
+
* @param params MCP headers refresh request id and the host response.
|
|
1147
|
+
*
|
|
1148
|
+
* @returns Indicates whether the pending MCP headers refresh response was accepted.
|
|
1149
|
+
*/
|
|
1150
|
+
handlePendingHeadersRefreshRequest: async (params) => connection.sendRequest("session.mcp.headers.handlePendingHeadersRefreshRequest", { sessionId, ...params })
|
|
1151
|
+
},
|
|
1152
|
+
/** @experimental */
|
|
1114
1153
|
apps: {
|
|
1115
1154
|
/**
|
|
1116
1155
|
* Fetch an MCP resource (typically a `ui://` MCP App bundle, per SEP-1865) from a connected server. Requires the `mcp-apps` session capability.
|
|
@@ -1289,7 +1328,7 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1289
1328
|
*
|
|
1290
1329
|
* @param params Slash command name and optional raw input string to invoke.
|
|
1291
1330
|
*
|
|
1292
|
-
* @returns Result of invoking the slash command (text output, prompt to send to the agent, or
|
|
1331
|
+
* @returns Result of invoking the slash command (text output, prompt to send to the agent, completion, or subcommand selection).
|
|
1293
1332
|
*/
|
|
1294
1333
|
invoke: async (params) => connection.sendRequest("session.commands.invoke", { sessionId, ...params }),
|
|
1295
1334
|
/**
|
|
@@ -1808,6 +1847,23 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1808
1847
|
notifySteerableChanged: async (params) => connection.sendRequest("session.remote.notifySteerableChanged", { sessionId, ...params })
|
|
1809
1848
|
},
|
|
1810
1849
|
/** @experimental */
|
|
1850
|
+
visibility: {
|
|
1851
|
+
/**
|
|
1852
|
+
* Returns the session's current Mission Control sharing status and shareable GitHub URL. Reflects whether the synced session is visible to repository readers ("repo") or restricted to its creator and collaborators ("unshared").
|
|
1853
|
+
*
|
|
1854
|
+
* @returns Current sharing status and shareable GitHub URL for a session.
|
|
1855
|
+
*/
|
|
1856
|
+
get: async () => connection.sendRequest("session.visibility.get", { sessionId }),
|
|
1857
|
+
/**
|
|
1858
|
+
* Sets the session's Mission Control sharing status, controlling whether the synced session is visible to repository readers. Returns the effective status and shareable GitHub URL after the change.
|
|
1859
|
+
*
|
|
1860
|
+
* @param params Desired sharing status for the session.
|
|
1861
|
+
*
|
|
1862
|
+
* @returns Effective sharing status and shareable GitHub URL after updating session visibility.
|
|
1863
|
+
*/
|
|
1864
|
+
set: async (params) => connection.sendRequest("session.visibility.set", { sessionId, ...params })
|
|
1865
|
+
},
|
|
1866
|
+
/** @experimental */
|
|
1811
1867
|
schedule: {
|
|
1812
1868
|
/**
|
|
1813
1869
|
* Lists the session's currently active scheduled prompts.
|