@github/copilot-sdk 1.0.6-preview.1 → 1.0.7-preview.0
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 +9 -5
- package/dist/cjs/generated/rpc.js +64 -28
- package/dist/client.js +9 -5
- package/dist/generated/rpc.d.ts +893 -155
- package/dist/generated/rpc.js +64 -28
- package/dist/generated/session-events.d.ts +373 -84
- package/dist/types.d.ts +7 -0
- package/package.json +2 -2
package/dist/generated/rpc.js
CHANGED
|
@@ -293,6 +293,15 @@ function createServerRpc(connection) {
|
|
|
293
293
|
getDiscoveryPaths: async (params) => connection.sendRequest("instructions.getDiscoveryPaths", params)
|
|
294
294
|
},
|
|
295
295
|
/** @experimental */
|
|
296
|
+
commands: {
|
|
297
|
+
/**
|
|
298
|
+
* Lists the well-known built-in slash commands that work as the first message in a new session (e.g. /plan, /env), without requiring an active session. Commands that depend on session state, authentication, or a synced session are omitted.
|
|
299
|
+
*
|
|
300
|
+
* @returns Slash commands available in the session, after applying any include/exclude filters.
|
|
301
|
+
*/
|
|
302
|
+
list: async () => connection.sendRequest("commands.list", {})
|
|
303
|
+
},
|
|
304
|
+
/** @experimental */
|
|
296
305
|
user: {
|
|
297
306
|
/** @experimental */
|
|
298
307
|
settings: {
|
|
@@ -560,7 +569,7 @@ function createInternalServerRpc(connection) {
|
|
|
560
569
|
/**
|
|
561
570
|
* Performs the SDK server connection handshake and validates the optional connection token. Marked internal because this is JSON-RPC transport plumbing invoked automatically by an SDK client's own `connect()` wrapper, not a user-facing method. Stays internal as long as the SDK client owns the handshake; would only become public if the SDK ever exposed the raw schema surface to consumers without a connection wrapper.
|
|
562
571
|
*
|
|
563
|
-
* @param params
|
|
572
|
+
* @param params Parameters for the `server.connect` handshake: an optional connection token and optional connection-level opt-ins (e.g. GitHub telemetry forwarding).
|
|
564
573
|
*
|
|
565
574
|
* @returns Handshake result reporting the server's protocol version and package version on success.
|
|
566
575
|
*
|
|
@@ -628,6 +637,16 @@ function createSessionRpc(connection, sessionId) {
|
|
|
628
637
|
* @experimental
|
|
629
638
|
*/
|
|
630
639
|
send: async (params) => connection.sendRequest("session.send", { sessionId, ...params }),
|
|
640
|
+
/**
|
|
641
|
+
* Sends zero or more user messages to the session in a single turn and returns their message IDs. All provided messages are appended to the conversation in order, then exactly one agent turn runs over the resulting history. When the list is empty, one turn runs over the existing history with no new user message. Remote-backed (Mission Control) sessions do not support this method and will return an error.
|
|
642
|
+
*
|
|
643
|
+
* @param params Parameters for sending zero or more user messages to the session in a single turn. Remote-backed (Mission Control) sessions do not support this method and will return an error.
|
|
644
|
+
*
|
|
645
|
+
* @returns Result of sending zero or more user messages
|
|
646
|
+
*
|
|
647
|
+
* @experimental
|
|
648
|
+
*/
|
|
649
|
+
sendMessages: async (params) => connection.sendRequest("session.sendMessages", { sessionId, ...params }),
|
|
631
650
|
/**
|
|
632
651
|
* Aborts the current agent turn.
|
|
633
652
|
*
|
|
@@ -664,6 +683,17 @@ function createSessionRpc(connection, sessionId) {
|
|
|
664
683
|
setCredentials: async (params) => connection.sendRequest("session.gitHubAuth.setCredentials", { sessionId, ...params })
|
|
665
684
|
},
|
|
666
685
|
/** @experimental */
|
|
686
|
+
debug: {
|
|
687
|
+
/**
|
|
688
|
+
* Collects a redacted session debug log bundle into a local archive or staging directory. The runtime includes session-owned logs by default and accepts caller-provided diagnostic entries so host applications can add their own files without changing this API shape.
|
|
689
|
+
*
|
|
690
|
+
* @param params Options for collecting a redacted session debug bundle.
|
|
691
|
+
*
|
|
692
|
+
* @returns Result of collecting a redacted debug bundle.
|
|
693
|
+
*/
|
|
694
|
+
collectLogs: async (params) => connection.sendRequest("session.debug.collectLogs", { sessionId, ...params })
|
|
695
|
+
},
|
|
696
|
+
/** @experimental */
|
|
667
697
|
canvas: {
|
|
668
698
|
/**
|
|
669
699
|
* Lists canvases declared for the session.
|
|
@@ -1114,6 +1144,18 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1114
1144
|
* @returns Indicates whether the auto-managed `github` MCP server was removed (false when nothing to remove).
|
|
1115
1145
|
*/
|
|
1116
1146
|
removeGitHub: async () => connection.sendRequest("session.mcp.removeGitHub", { sessionId }),
|
|
1147
|
+
/**
|
|
1148
|
+
* Starts an individual MCP server on the live session from a caller-supplied config. Session-scoped and ephemeral: the server is added to this session's running set only and is reaped when the session ends. Does NOT modify persistent user configuration (`mcp.config.*`), so it does not affect future sessions. The server surfaces through `session.mcp.list` and the `session.mcp_servers_loaded` / `session.mcp_server_status_changed` events like any other server.
|
|
1149
|
+
*
|
|
1150
|
+
* @param params Server name and configuration for an individual MCP server start.
|
|
1151
|
+
*/
|
|
1152
|
+
startServer: async (params) => connection.sendRequest("session.mcp.startServer", { sessionId, ...params }),
|
|
1153
|
+
/**
|
|
1154
|
+
* Restarts an individual MCP server on the live session (stops then starts). Omit `config` for a config-free restart-by-name of an already-configured server; supply `config` to restart with a replacement configuration. Session-scoped and ephemeral: does NOT modify persistent user configuration (`mcp.config.*`).
|
|
1155
|
+
*
|
|
1156
|
+
* @param params Server name and optional replacement configuration for an individual MCP server restart. Omit `config` for a config-free restart-by-name of an already-configured server.
|
|
1157
|
+
*/
|
|
1158
|
+
restartServer: async (params) => connection.sendRequest("session.mcp.restartServer", { sessionId, ...params }),
|
|
1117
1159
|
/**
|
|
1118
1160
|
* Stops an individual MCP server on the session's host.
|
|
1119
1161
|
*
|
|
@@ -1502,17 +1544,17 @@ function createSessionRpc(connection, sessionId) {
|
|
|
1502
1544
|
*/
|
|
1503
1545
|
setApproveAll: async (params) => connection.sendRequest("session.permissions.setApproveAll", { sessionId, ...params }),
|
|
1504
1546
|
/**
|
|
1505
|
-
*
|
|
1547
|
+
* Sets the allow-all permission mode for the session. Used by attach-mode clients (e.g. LocalRpcSession's `/allow-all` forwarder) to flip the target session's permission state. The `on` mode swaps in unrestricted path and URL managers and emits `session.permissions_changed` on transition; the `auto` mode keeps normal prompt paths active while attaching LLM safety recommendations. The result returns the authoritative post-mutation state so callers can update their local mirrors without racing the `session.permissions_changed` notification on the same wire.
|
|
1506
1548
|
*
|
|
1507
|
-
* @param params
|
|
1549
|
+
* @param params Allow-all mode to apply for the session.
|
|
1508
1550
|
*
|
|
1509
1551
|
* @returns Indicates whether the operation succeeded and reports the post-mutation state.
|
|
1510
1552
|
*/
|
|
1511
1553
|
setAllowAll: async (params) => connection.sendRequest("session.permissions.setAllowAll", { sessionId, ...params }),
|
|
1512
1554
|
/**
|
|
1513
|
-
* Returns
|
|
1555
|
+
* Returns the current allow-all permission mode for the session.
|
|
1514
1556
|
*
|
|
1515
|
-
* @returns Current
|
|
1557
|
+
* @returns Current allow-all permission mode.
|
|
1516
1558
|
*/
|
|
1517
1559
|
getAllowAll: async () => connection.sendRequest("session.permissions.getAllowAll", { sessionId }),
|
|
1518
1560
|
/**
|
|
@@ -1934,40 +1976,34 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
1934
1976
|
*/
|
|
1935
1977
|
configureGitHub: async (params) => connection.sendRequest("session.mcp.configureGitHub", { sessionId, ...params }),
|
|
1936
1978
|
/**
|
|
1937
|
-
*
|
|
1979
|
+
* Registers a pre-connected external MCP client (e.g. IDE) on the session's host. The caller retains lifecycle ownership of the client and transport. Marked internal because the `client` and `transport` arguments are in-process MCP SDK instances that cannot be serialized across the JSON-RPC boundary; once the CLI moves on top of the SDK, external clients will be expressed as transport configs the runtime can construct itself.
|
|
1938
1980
|
*
|
|
1939
|
-
* @param params
|
|
1981
|
+
* @param params Registration parameters for an external MCP client.
|
|
1940
1982
|
*/
|
|
1941
|
-
|
|
1983
|
+
registerExternalClient: async (params) => connection.sendRequest("session.mcp.registerExternalClient", { sessionId, ...params }),
|
|
1942
1984
|
/**
|
|
1943
|
-
*
|
|
1985
|
+
* Unregisters a previously registered external MCP client by server name. Marked internal as the paired companion of `registerExternalClient`: only in-process callers that registered a client this way can meaningfully unregister it. Disappears alongside `registerExternalClient`: once external clients are described to the runtime as config rather than handed in as instances, lifecycle (including deregistration) is owned entirely by the runtime.
|
|
1944
1986
|
*
|
|
1945
|
-
* @param params Server name
|
|
1987
|
+
* @param params Server name identifying the external client to remove.
|
|
1946
1988
|
*/
|
|
1947
|
-
|
|
1989
|
+
unregisterExternalClient: async (params) => connection.sendRequest("session.mcp.unregisterExternalClient", { sessionId, ...params })
|
|
1990
|
+
},
|
|
1991
|
+
/** @experimental */
|
|
1992
|
+
settings: {
|
|
1948
1993
|
/**
|
|
1949
|
-
*
|
|
1994
|
+
* Returns a redacted snapshot of session runtime settings, with secrets and raw feature flags excluded. Internal: the runtime settings shape is a runtime-internal surface and is deliberately kept out of the public SDK, because consumers should not depend on the runtime's internal settings layout. It remains callable in-process and is expected to be reworked as the runtime internals are consolidated.
|
|
1950
1995
|
*
|
|
1951
|
-
* @
|
|
1996
|
+
* @returns Redacted, serializable view of session runtime settings for SDK boundary consumers. Secrets and raw feature flags are intentionally excluded.
|
|
1952
1997
|
*/
|
|
1953
|
-
|
|
1998
|
+
snapshot: async () => connection.sendRequest("session.settings.snapshot", { sessionId }),
|
|
1954
1999
|
/**
|
|
1955
|
-
*
|
|
2000
|
+
* Evaluates a named Rust-owned settings predicate without exposing raw feature flags. Internal: the raw feature-flag names and composition are runtime-internal, so this predicate-evaluation helper is kept out of the public SDK surface and is callable in-process only.
|
|
1956
2001
|
*
|
|
1957
|
-
* @param params
|
|
2002
|
+
* @param params Named Rust-owned settings predicate to evaluate for this session.
|
|
2003
|
+
*
|
|
2004
|
+
* @returns Result of evaluating a Rust-owned settings predicate.
|
|
1958
2005
|
*/
|
|
1959
|
-
|
|
1960
|
-
/** @experimental */
|
|
1961
|
-
oauth: {
|
|
1962
|
-
/**
|
|
1963
|
-
* Responds to a pending MCP OAuth request with an in-process provider. This internal CLI-only API accepts a live OAuthClientProvider instance and cannot be used over the SDK JSON-RPC boundary. Use session.mcp.oauth.handlePendingRequest instead for the public SDK-safe response path.
|
|
1964
|
-
*
|
|
1965
|
-
* @param params MCP OAuth request id and optional provider response.
|
|
1966
|
-
*
|
|
1967
|
-
* @returns Empty result after recording the MCP OAuth response.
|
|
1968
|
-
*/
|
|
1969
|
-
respond: async (params) => connection.sendRequest("session.mcp.oauth.respond", { sessionId, ...params })
|
|
1970
|
-
}
|
|
2006
|
+
evaluatePredicate: async (params) => connection.sendRequest("session.settings.evaluatePredicate", { sessionId, ...params })
|
|
1971
2007
|
}
|
|
1972
2008
|
};
|
|
1973
2009
|
}
|