@github/copilot-sdk 1.0.17-preview.9 → 1.0.17-unstable.37553872417.gc9f6176
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 +0 -41
- package/dist/cjs/cliVersion.js +1 -1
- package/dist/cjs/client.js +2 -44
- package/dist/cjs/extension.js +0 -2
- package/dist/cjs/generated/rpc.js +10 -198
- package/dist/cjs/session.js +0 -67
- package/dist/cliVersion.d.ts +1 -1
- package/dist/cliVersion.js +1 -1
- package/dist/client.d.ts +0 -1
- package/dist/client.js +2 -44
- package/dist/extension.d.ts +1 -1
- package/dist/extension.js +0 -2
- package/dist/generated/rpc.d.ts +197 -686
- package/dist/generated/rpc.js +10 -198
- package/dist/generated/session-events.d.ts +3 -19
- package/dist/index.d.ts +1 -1
- package/dist/session.d.ts +0 -7
- package/dist/session.js +0 -67
- package/dist/types.d.ts +0 -76
- package/package.json +12 -12
package/dist/generated/rpc.js
CHANGED
|
@@ -638,15 +638,21 @@ function createServerRpc(connection) {
|
|
|
638
638
|
/** @experimental */
|
|
639
639
|
settings: {
|
|
640
640
|
/**
|
|
641
|
-
*
|
|
641
|
+
* Drops this runtime process's in-memory user settings cache so the next settings read observes disk.
|
|
642
|
+
*/
|
|
643
|
+
reload: async () => connection.sendRequest("user.settings.reload", {}),
|
|
644
|
+
/**
|
|
645
|
+
* 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.
|
|
642
646
|
*
|
|
643
|
-
* @returns Per-key metadata for every known user setting
|
|
647
|
+
* @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.
|
|
644
648
|
*/
|
|
645
649
|
get: async () => connection.sendRequest("user.settings.get", {}),
|
|
646
650
|
/**
|
|
647
|
-
* Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
|
|
651
|
+
* 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.
|
|
648
652
|
*
|
|
649
653
|
* @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.
|
|
654
|
+
*
|
|
655
|
+
* @returns Outcome of writing user settings.
|
|
650
656
|
*/
|
|
651
657
|
set: async (params) => connection.sendRequest("user.settings.set", params)
|
|
652
658
|
}
|
|
@@ -946,37 +952,6 @@ function createServerRpc(connection) {
|
|
|
946
952
|
* @returns Outcome of an agentRegistry.spawn call.
|
|
947
953
|
*/
|
|
948
954
|
spawn: async (params) => connection.sendRequest("agentRegistry.spawn", params)
|
|
949
|
-
},
|
|
950
|
-
/** @experimental */
|
|
951
|
-
connectors: {
|
|
952
|
-
/**
|
|
953
|
-
* Returns feature availability.
|
|
954
|
-
*
|
|
955
|
-
* @returns Feature availability.
|
|
956
|
-
*/
|
|
957
|
-
getCapabilities: async () => connection.sendRequest("connectors.getCapabilities", {}),
|
|
958
|
-
/**
|
|
959
|
-
* Returns eligible accounts.
|
|
960
|
-
*
|
|
961
|
-
* @returns Eligible accounts.
|
|
962
|
-
*/
|
|
963
|
-
getAccounts: async () => connection.sendRequest("connectors.getAccounts", {}),
|
|
964
|
-
/**
|
|
965
|
-
* Lists entries for the selected account.
|
|
966
|
-
*
|
|
967
|
-
* @param params Selected account.
|
|
968
|
-
*
|
|
969
|
-
* @returns Entries for the selected account.
|
|
970
|
-
*/
|
|
971
|
-
list: async (params) => connection.sendRequest("connectors.list", params),
|
|
972
|
-
/**
|
|
973
|
-
* Refreshes entries for the selected account.
|
|
974
|
-
*
|
|
975
|
-
* @param params Selected account.
|
|
976
|
-
*
|
|
977
|
-
* @returns Entries for the selected account.
|
|
978
|
-
*/
|
|
979
|
-
refresh: async (params) => connection.sendRequest("connectors.refresh", params)
|
|
980
955
|
}
|
|
981
956
|
};
|
|
982
957
|
}
|
|
@@ -1032,133 +1007,6 @@ function createInternalServerRpc(connection) {
|
|
|
1032
1007
|
*/
|
|
1033
1008
|
connect: async (params) => connection.sendRequest("connect", params),
|
|
1034
1009
|
/** @experimental */
|
|
1035
|
-
agents: {
|
|
1036
|
-
/**
|
|
1037
|
-
* Lists the agents this runtime ships, by name. A consumer separating shipped agents from ones the user or a plugin authored should compare against these names rather than against `AgentInfo.source`: an authored agent may carry the `builtin` source while not being one of these, and the runtime treats the two as separate questions. `disableableNames` is the subset a user may turn off, which a client needs to decide whether to offer a toggle. `yamlBasedNames` is the subset backed by a shipped YAML definition, which a client needs before asking the runtime to load one.
|
|
1038
|
-
*
|
|
1039
|
-
* @returns The agents this runtime ships, named so a consumer can tell them apart from authored ones.
|
|
1040
|
-
*/
|
|
1041
|
-
getBuiltins: async () => connection.sendRequest("agents.getBuiltins", {}),
|
|
1042
|
-
/**
|
|
1043
|
-
* Lists the shipped agents a client should offer right now, filtered by the feature flags it passes. `getBuiltins` names every agent the runtime knows about; some of those are gated, so a client rendering a picker wants this narrower list together with the description to show beside each name.
|
|
1044
|
-
*
|
|
1045
|
-
* @param params The feature flags to evaluate shipped agents against.
|
|
1046
|
-
*
|
|
1047
|
-
* @returns The shipped agents available under the requested flags.
|
|
1048
|
-
*/
|
|
1049
|
-
getAvailableBuiltins: async (params) => connection.sendRequest("agents.getAvailableBuiltins", params),
|
|
1050
|
-
/**
|
|
1051
|
-
* Loads one shipped agent's YAML definition, for a client that needs what the agent declares rather than only its name. `getBuiltins` reports which names have a definition to load: a name outside its `yamlBasedNames` is special-cased in code and has none. The definition crosses as its own JSON rather than as contract-typed fields, because the runtime parses it with the agent schema's tolerant shape and re-typing it here would drop the keys that shape accepts and this one does not. The projected `__nativeCustomAgent` view the runtime derives is included, so a caller reading the declared model and a caller rendering the agent see the same definition.
|
|
1052
|
-
*
|
|
1053
|
-
* @param params The shipped agent whose definition to load.
|
|
1054
|
-
*
|
|
1055
|
-
* @returns One shipped agent's definition.
|
|
1056
|
-
*/
|
|
1057
|
-
getBuiltinDefinition: async (params) => connection.sendRequest("agents.getBuiltinDefinition", params),
|
|
1058
|
-
/**
|
|
1059
|
-
* Projects one shipped agent the way a picker lists it, reading only the metadata at the head of the definition file and stopping before the prompt body. `getBuiltinDefinition` answers the whole definition instead, so a client listing every shipped agent should prefer this one: the cost of a listing grows with the number of agents, and the prompt body is the part a listing never shows. The two also differ in shape. This returns the projected custom agent on its own, whereas `getBuiltinDefinition` returns the authored definition with that projection nested under `__nativeCustomAgent`.
|
|
1060
|
-
*
|
|
1061
|
-
* @param params The shipped agent whose listing entry to load.
|
|
1062
|
-
*
|
|
1063
|
-
* @returns One shipped agent, projected for a listing.
|
|
1064
|
-
*/
|
|
1065
|
-
getBuiltinListingDefinition: async (params) => connection.sendRequest("agents.getBuiltinListingDefinition", params),
|
|
1066
|
-
/**
|
|
1067
|
-
* Resolves the model a custom agent asks for against the models actually available, and answers both the model to switch to and the warning a user should see when the agent's preference cannot be met. A custom agent may name several acceptable models in preference order, so the decision is a match rather than a lookup, and an agent whose preference is unavailable is a normal outcome that produces a warning rather than an error. A host must call this rather than pick the first available name itself, because the preference order and the wording of the warning are what keep one installation's agent selection the same as another's.
|
|
1068
|
-
*
|
|
1069
|
-
* @param params The models a custom agent asks for, and the models actually available.
|
|
1070
|
-
*
|
|
1071
|
-
* @returns The model to switch to, and the warning to show when the agent's preference could not be met.
|
|
1072
|
-
*/
|
|
1073
|
-
customAgentInitialModelDecision: async (params) => connection.sendRequest("agents.customAgentInitialModelDecision", params)
|
|
1074
|
-
},
|
|
1075
|
-
/** @experimental */
|
|
1076
|
-
globalState: {
|
|
1077
|
-
/**
|
|
1078
|
-
* Reads the host's machine-wide state: which plugins are installed and the one-off flags and timestamps that record what the user has already been shown or migrated. This is the state that outlives a single session and a single workspace, so a host reads it to decide whether to run a first-launch step, offer an onboarding prompt, or skip one it has already completed. The stored credentials are deliberately not part of this result; a caller that needs an authenticated identity asks the account methods for it instead. Reading is non-destructive and every field is optional, because a fresh install has recorded nothing yet.
|
|
1079
|
-
*
|
|
1080
|
-
* @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
|
|
1081
|
-
*/
|
|
1082
|
-
load: async () => connection.sendRequest("globalState.load", {}),
|
|
1083
|
-
/**
|
|
1084
|
-
* Reads the host's machine-wide state exactly as `globalState.load` does, but from a caller-supplied configuration directory instead of the one the server resolved for itself. Use this when a consumer scopes a session to its own Copilot home — the SDK's per-session `configDir` override — so the state read matches the directory that session actually uses. An absent or empty `configDir` resolves the server's own home, making this identical to `globalState.load`. The stored credentials are omitted here for the same reason they are omitted from `globalState.load`: a caller that needs an authenticated identity asks the account methods instead, so pointing this at another directory cannot be used to read the credentials kept in it.
|
|
1085
|
-
*
|
|
1086
|
-
* @param params Selects the configuration directory whose machine-wide state to read.
|
|
1087
|
-
*
|
|
1088
|
-
* @returns The host's machine-wide state. Every field is optional because a fresh install has recorded nothing yet, so a reader must treat an absent field as `not yet`, never as a negative answer. Stored credentials are deliberately absent from this shape.
|
|
1089
|
-
*/
|
|
1090
|
-
loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
|
|
1091
|
-
/**
|
|
1092
|
-
* Records one top-level key in the host's machine-wide state, the counterpart to `globalState.load`. A host calls this to remember that it has shown an onboarding step, asked a one-off question, or completed a migration, so the next run can skip it. Only the named key is replaced and the rest of the document is preserved, which lets two writers record different flags without overwriting each other; passing no value removes the key instead. Only the keys a host records itself are writable: `appInstallNudgeResponded`, `appTipShown`, `askedSetupTerminals`, `autoFeedbackLastPromptedAt`, `firstLaunchAt`, `recentModelIds`, `sandboxCredentialProxyCaDeclined` and `sandboxOnboardingShown`. Every other key is refused, including `installedPlugins`, the stored credentials, `trustedFolders`, the staff flags and the signed-in accounts. Plugin enablement must use the plugin APIs, which apply repository and managed-policy checks.
|
|
1093
|
-
*
|
|
1094
|
-
* @param params A single top-level key to record in the host's machine-wide state. The write replaces only that key and leaves the rest of the document untouched, so two writers recording different one-off flags do not overwrite each other. The stored credential keys cannot be written through this method.
|
|
1095
|
-
*/
|
|
1096
|
-
writeKey: async (params) => connection.sendRequest("globalState.writeKey", params)
|
|
1097
|
-
},
|
|
1098
|
-
/** @experimental */
|
|
1099
|
-
gitHubRepository: {
|
|
1100
|
-
/**
|
|
1101
|
-
* Resolves the GitHub repository that owns a working-tree path by reading the selected git remote configured for it, preferring `origin`. Returns a null `repository` when the path is inside a git working tree but that selected remote does not resolve to a GitHub host. Fails when the path is not inside a git working tree at all, so a caller can tell 'not a repository' apart from 'a repository with no GitHub remote'.
|
|
1102
|
-
*
|
|
1103
|
-
* @param params Working-tree path whose owning GitHub repository should be resolved.
|
|
1104
|
-
*
|
|
1105
|
-
* @returns The GitHub repository that owns the requested path, when the selected remote (`origin`, else the first) is on a GitHub host.
|
|
1106
|
-
*/
|
|
1107
|
-
atPath: async (params) => connection.sendRequest("gitHubRepository.atPath", params)
|
|
1108
|
-
},
|
|
1109
|
-
/** @experimental */
|
|
1110
|
-
gitHubOwners: {
|
|
1111
|
-
/**
|
|
1112
|
-
* Registers a cancellable owner listing and returns its request id. Separate from `gitHubOwners.list` so the id exists before the listing starts: a caller that abandons the listing the moment it begins would otherwise have nothing to name in `gitHubOwners.cancel`. The id serves one listing only. Long-abandoned unused ids can be released by later allocations.
|
|
1113
|
-
*
|
|
1114
|
-
* @returns A freshly registered request id. Registering it before the listing starts is what lets a cancel that races the request still find the owner listing slot. The id serves one listing only. Long-abandoned unused ids can be released by later allocations.
|
|
1115
|
-
*/
|
|
1116
|
-
nextRequestId: async () => connection.sendRequest("gitHubOwners.nextRequestId", {}),
|
|
1117
|
-
/**
|
|
1118
|
-
* Lists the logins the authenticated user may act as — their own account first, then the organizations they belong to — by asking the GitHub API under the supplied credential. No credential travels in the request: `authInfo` selects one the runtime already holds, and the runtime resolves the token and the GitHub host from it. A failure the caller should render arrives as `message`; one it should raise arrives as `throwError`.
|
|
1119
|
-
*
|
|
1120
|
-
* @param params Credential to list owners under, and the request id that makes the listing cancellable.
|
|
1121
|
-
*
|
|
1122
|
-
* @returns Outcome of an owner listing. Exactly one of `owners` and `message` is present, except that `throwError` reports a failure the caller is expected to raise rather than render.
|
|
1123
|
-
*/
|
|
1124
|
-
list: async (params) => connection.sendRequest("gitHubOwners.list", params),
|
|
1125
|
-
/**
|
|
1126
|
-
* Abandons an owner listing started with the given request id. Answers `canceled: true` while a listing with that id is running. Answers `canceled: false` when the id was never registered, was registered but not used, was released after being abandoned, or its listing has ended. Canceling an unused id releases it, and a later `list` with that id is refused. The cancel acts only on owner listings and never reaches another request of the host.
|
|
1127
|
-
*
|
|
1128
|
-
* @param params The owner listing to abandon.
|
|
1129
|
-
*
|
|
1130
|
-
* @returns Whether the id named a running owner listing.
|
|
1131
|
-
*/
|
|
1132
|
-
cancel: async (params) => connection.sendRequest("gitHubOwners.cancel", params)
|
|
1133
|
-
},
|
|
1134
|
-
/** @experimental */
|
|
1135
|
-
git: {
|
|
1136
|
-
/**
|
|
1137
|
-
* Reads the remote that the branch checked out in a working tree tracks, as `branch.<name>.remote` configures it. Reports `origin` rather than failing whenever there is no tracking configuration to read — on a detached HEAD, on a branch with no upstream, or when git itself fails — because a caller asking which remote to talk to needs an answer it can act on, not an error. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on.
|
|
1138
|
-
*
|
|
1139
|
-
* @param params Working-tree path a git query applies to.
|
|
1140
|
-
*
|
|
1141
|
-
* @returns The remote the checked-out branch tracks.
|
|
1142
|
-
*/
|
|
1143
|
-
currentBranchRemote: async (params) => connection.sendRequest("git.currentBranchRemote", params),
|
|
1144
|
-
/**
|
|
1145
|
-
* Collects the repository context of a working directory in one call: working tree root, repository identifier and host, current branch, and the HEAD and base commits. Every repository field is omitted when the path is not inside a git working tree, and the requested path is echoed back as `cwd`. The answer is the same `SessionWorkingDirectoryContext` that `session.metadata.recordContextChange` accepts, so a caller polling for a context change can forward the result unchanged. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on. It can become public once an SDK consumer needs to derive session context from a directory itself.
|
|
1146
|
-
*
|
|
1147
|
-
* @param params Working-tree path a git query applies to.
|
|
1148
|
-
*
|
|
1149
|
-
* @returns Updated working directory and git context. Emitted as the new payload of `session.context_changed`.
|
|
1150
|
-
*/
|
|
1151
|
-
workingDirectoryContext: async (params) => connection.sendRequest("git.workingDirectoryContext", params),
|
|
1152
|
-
/**
|
|
1153
|
-
* Lists the GitHub repositories a working tree's remotes point at, one entry per distinct repository, so a caller can resolve a base and head repository without parsing remote URLs itself. When several remotes name the same repository, only the first is listed, and the entry keeps that remote name. Remotes pointing at no GitHub host are left out, so an empty list means the tree reaches GitHub through no remote. Failing to read the remotes is reported as an error rather than as an empty list, because the two mean different things to a caller. Marked internal because it exists to carry a CLI call site off the napi boundary onto the SDK contract; it is migration plumbing, not a surface consumers are meant to depend on.
|
|
1154
|
-
*
|
|
1155
|
-
* @param params Git working tree whose GitHub remotes should be listed.
|
|
1156
|
-
*
|
|
1157
|
-
* @returns The GitHub repositories a working tree's remotes point at.
|
|
1158
|
-
*/
|
|
1159
|
-
reposFromRemotes: async (params) => connection.sendRequest("git.reposFromRemotes", params)
|
|
1160
|
-
},
|
|
1161
|
-
/** @experimental */
|
|
1162
1010
|
sessions: {
|
|
1163
1011
|
/**
|
|
1164
1012
|
* Reads lightweight persisted metadata for one local session without opening it.
|
|
@@ -1198,30 +1046,6 @@ function createInternalServerRpc(connection) {
|
|
|
1198
1046
|
* @param params Session ID to delete from disk.
|
|
1199
1047
|
*/
|
|
1200
1048
|
delete: async (params) => connection.sendRequest("sessions.delete", params),
|
|
1201
|
-
/**
|
|
1202
|
-
* Creates the workspace record for a session that has not been opened yet. A host that hands a session off to another application — writing the record and then launching that application against the session ID — needs the record on disk before any session exists to carry it, which the session-scoped workspace methods cannot do. Replaces any existing record and resets the checkpoint index. When writing to the local filesystem, a stored `fork_count` survives on disk. Returns the record it built, so a surviving stored `fork_count` can differ from the answer.
|
|
1203
|
-
*
|
|
1204
|
-
* @param params Identity, state location and starting context for a workspace record.
|
|
1205
|
-
*
|
|
1206
|
-
* @returns The workspace record that was written.
|
|
1207
|
-
*/
|
|
1208
|
-
createWorkspace: async (params) => connection.sendRequest("sessions.createWorkspace", params),
|
|
1209
|
-
/**
|
|
1210
|
-
* Reads a session's workspace record straight from disk, without opening the session. Resuming by session ID has to know where the session lives before it can connect, so the lookup cannot come from the session-scoped workspace methods, which resolve their location from a live session's context. Returns no record when the file is absent.
|
|
1211
|
-
*
|
|
1212
|
-
* @param params Where the session's state lives, as a root directory and the session ID under it.
|
|
1213
|
-
*
|
|
1214
|
-
* @returns The workspace record on disk, omitted when the session has none.
|
|
1215
|
-
*/
|
|
1216
|
-
loadWorkspace: async (params) => connection.sendRequest("sessions.loadWorkspace", params),
|
|
1217
|
-
/**
|
|
1218
|
-
* Merges fields into a session's workspace record on disk, creating the record when it is absent. The counterpart to `sessions.loadWorkspace`, for the same before-the-session-exists case. It preserves stored workspace-schema fields the request does not supply, does not preserve stored keys outside the workspace schema, and never replaces a stored `fork_count`.
|
|
1219
|
-
*
|
|
1220
|
-
* @param params Where the session's state lives, plus workspace-schema fields to merge into its workspace record. Stored keys outside the schema are not preserved, and a stored `fork_count` is never replaced.
|
|
1221
|
-
*
|
|
1222
|
-
* @returns The merge completed. The record carries the supplied workspace-schema fields, but a stored `fork_count` stays.
|
|
1223
|
-
*/
|
|
1224
|
-
updateWorkspaceFields: async (params) => connection.sendRequest("sessions.updateWorkspaceFields", params),
|
|
1225
1049
|
/**
|
|
1226
1050
|
* Gets the dynamic-context board entry count associated with a session, when available. Internal: this exists solely so CLI telemetry events (`rem_spawn_gate`, `rem_consolidation_complete`) can pair START / END board counts around the detached rem-agent spawn. "Dynamic context board" is a runtime-internal concept that is not part of the public SDK contract; the long-term plan is to relocate the telemetry emission into the runtime so this method can be deleted entirely.
|
|
1227
1051
|
*
|
|
@@ -2096,17 +1920,11 @@ function createSessionRpc(connection, sessionId) {
|
|
|
2096
1920
|
/** @experimental */
|
|
2097
1921
|
mcp: {
|
|
2098
1922
|
/**
|
|
2099
|
-
* Lists
|
|
1923
|
+
* Lists MCP servers configured for the session, their connection status, and host-level state. The host-level state (disabled/filtered servers, failed/needs-auth/pending connections, mcp3p policy, full config) is empty/zero when no MCP host has been initialized for the session.
|
|
2100
1924
|
*
|
|
2101
1925
|
* @returns MCP servers configured for the session, with their connection status and host-level state.
|
|
2102
1926
|
*/
|
|
2103
1927
|
list: async () => connection.sendRequest("session.mcp.list", { sessionId }),
|
|
2104
|
-
/**
|
|
2105
|
-
* Lists effective MCP configuration without starting, restarting, authenticating, or waiting for servers. An optional live observation is from an already materialized matching server; this is not a readiness guarantee.
|
|
2106
|
-
*
|
|
2107
|
-
* @returns Effective MCP configuration with optional live observations from matching already materialized servers.
|
|
2108
|
-
*/
|
|
2109
|
-
listConfigured: async () => connection.sendRequest("session.mcp.listConfigured", { sessionId }),
|
|
2110
1928
|
/**
|
|
2111
1929
|
* Lists the tools exposed by a connected MCP server on this session's host. This performs a live `tools/list` request. Tool UI metadata is returned independently of whether MCP Apps rendering is enabled for the session.
|
|
2112
1930
|
*
|
|
@@ -3555,12 +3373,6 @@ function createInternalSessionRpc(connection, sessionId) {
|
|
|
3555
3373
|
},
|
|
3556
3374
|
/** @experimental */
|
|
3557
3375
|
mcp: {
|
|
3558
|
-
/**
|
|
3559
|
-
* Records the IDE the host is connected to, so the agent's system prompt can name it and its workspace folder. Null or an omitted `ide` clears the recorded value, which is how a host reports that it is disconnected; there is no separate clear method. Both `ideName` and `workspaceFolder` are required together, because half a state cannot be attributed to a project.
|
|
3560
|
-
*
|
|
3561
|
-
* @param params Records which IDE the host is connected to, or clears it.
|
|
3562
|
-
*/
|
|
3563
|
-
setConnectedIdeInfo: async (params) => connection.sendRequest("session.mcp.setConnectedIdeInfo", { ...params, sessionId }),
|
|
3564
3376
|
/**
|
|
3565
3377
|
* Reloads MCP server connections for the session with an explicit host-provided configuration.
|
|
3566
3378
|
*
|
|
@@ -740,7 +740,7 @@ export type AbortReason =
|
|
|
740
740
|
/** Autopilot stopped the run because the active objective reached its user-set --max-ai-credits limit. */
|
|
741
741
|
| "autopilot_credit_limit";
|
|
742
742
|
/**
|
|
743
|
-
* Configuration source: user, workspace, plugin, builtin,
|
|
743
|
+
* Configuration source: user, workspace, plugin, builtin, or managed
|
|
744
744
|
*/
|
|
745
745
|
export type McpServerSource =
|
|
746
746
|
/** Server configured in the user's global MCP configuration. */
|
|
@@ -752,9 +752,7 @@ export type McpServerSource =
|
|
|
752
752
|
/** Server bundled with the runtime. */
|
|
753
753
|
| "builtin"
|
|
754
754
|
/** Server supplied by a trusted host-managed catalog. */
|
|
755
|
-
| "managed"
|
|
756
|
-
/** Server contributed by a signed-in account; enablement and organization policy still apply. */
|
|
757
|
-
| "account";
|
|
755
|
+
| "managed";
|
|
758
756
|
/**
|
|
759
757
|
* Transport mechanism: stdio, http, sse (deprecated), or memory (in-process MCP server)
|
|
760
758
|
*/
|
|
@@ -1380,7 +1378,7 @@ export type McpServerStatus =
|
|
|
1380
1378
|
| "pending"
|
|
1381
1379
|
/** The server is configured but disabled. */
|
|
1382
1380
|
| "disabled"
|
|
1383
|
-
/** The server
|
|
1381
|
+
/** The server was intentionally stopped and can be restarted on demand when policy permits; a server quarantined by restrictive managed policy stays stopped and cannot be restarted until the policy allows it. */
|
|
1384
1382
|
| "stopped"
|
|
1385
1383
|
/** The server is not configured for this session. */
|
|
1386
1384
|
| "not_configured";
|
|
@@ -8854,8 +8852,6 @@ export interface PermissionApprovalEvaluation {
|
|
|
8854
8852
|
| "action-too-long"
|
|
8855
8853
|
/** The script path was not authorized for inspection. */
|
|
8856
8854
|
| "path-not-authorized"
|
|
8857
|
-
/** A code source was excluded from review by content exclusion policy. */
|
|
8858
|
-
| "content-excluded"
|
|
8859
8855
|
/** The script working directory was invalid. */
|
|
8860
8856
|
| "invalid-working-directory"
|
|
8861
8857
|
/** The script snapshot could not be read. */
|
|
@@ -8880,18 +8876,6 @@ export interface PermissionApprovalEvaluation {
|
|
|
8880
8876
|
| "unreviewable-script-invocation"
|
|
8881
8877
|
/** The script argument binding could not be reviewed. */
|
|
8882
8878
|
| "argument-binding-unreviewable"
|
|
8883
|
-
/** The shell command could not be analyzed for execution evidence. */
|
|
8884
|
-
| "unsupported-command-shape"
|
|
8885
|
-
/** The shell command used a code source that cannot be bound for review. */
|
|
8886
|
-
| "unsupported-source"
|
|
8887
|
-
/** The shell command used a code source computed at run time. */
|
|
8888
|
-
| "dynamic-source"
|
|
8889
|
-
/** The shell command referenced more code sources than can be reviewed. */
|
|
8890
|
-
| "too-many-sources"
|
|
8891
|
-
/** A code-bearing executable could not be inspected. */
|
|
8892
|
-
| "executable-unavailable"
|
|
8893
|
-
/** A code-bearing executable exceeded the binding size limit. */
|
|
8894
|
-
| "executable-too-large"
|
|
8895
8879
|
/** The script review metadata was malformed. */
|
|
8896
8880
|
| "malformed-script-action-review"
|
|
8897
8881
|
/** The script snapshot manifest was malformed. */
|
package/dist/index.d.ts
CHANGED
|
@@ -13,5 +13,5 @@ export { defineWorkflow, WorkflowResumeError, isWorkflowRunTerminal } from "./wo
|
|
|
13
13
|
export { Canvas, CanvasError, createCanvas, type CanvasAction, type CanvasDeclaration, type CanvasHostContext, type CanvasHostContextCapabilities, type CanvasJsonSchema, type CanvasOptions, } from "./canvas.js";
|
|
14
14
|
export { defineTool, approveAll, createAttributedPermissionResult, convertMcpCallToolResult, createSessionFsAdapter, CopilotRequestHandler, CopilotWebSocketHandler, CopilotWebSocketCloseStatus, CopilotWebSocketForwarder, SessionFsSqliteTransactionFailure, SessionFsWriteFailure, SYSTEM_MESSAGE_SECTIONS, } from "./types.js";
|
|
15
15
|
export type * from "./generated/session-events.js";
|
|
16
|
-
export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AuthIdentityMetadata, AuthInfoType, ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogEntry, ConnectorCatalogResult, ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, ConnectorReconcileRequest, ConnectorRuntimeStatus, ConnectorSessionAccount, ConnectorSessionAccountResult, ConnectorStatus, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, SubagentStartHandler, SubagentStartHookInput, SubagentStartHookOutput, SubagentStopHandler, SubagentStopHookInput, SubagentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, InstallationConfirmationHandler, InstallationConfirmationRequest, InstallationConfirmationResponse, InstallationDecision, InstallationReview, McpInstallationReview, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionLaunchProfile, ExtensionLaunchProvider, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, ExtensionContextAttachment, MessageOptions, ResponseSchema, MessageSource, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, AutoTier, CapiSessionOptions, CurrentModel, ModelSwitchAutoTierResult, ModelSwitchAutoTierStatus, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderConfigModelProvider, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, SandboxConfigSource, ResumeSessionConfig, TranscriptRecovery, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionConfigBase, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventMetadata, SessionLifecycleEventType, SessionLifecycleHandler, SessionHooks, SessionCreatedEvent, SessionDeletedEvent, SessionUpdatedEvent, SessionForegroundEvent, SessionBackgroundEvent, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SessionFsSqliteStatement, SessionFsSqliteTransactionErrorClass,
|
|
16
|
+
export type { AskUserVariant, CommandContext, CommandDefinition, CommandHandler, CanvasProviderIdentity, CloudSessionOptions, CloudSessionRepository, AuthIdentityMetadata, AuthInfoType, ConnectorAccountRequest, ConnectorAvailability, ConnectorCapabilities, ConnectorCatalogEntry, ConnectorCatalogResult, ConnectorCatalogStatus, ConnectorConnectRequest, ConnectorConnectResult, ConnectorContinueRequest, ConnectorDisconnectResult, ConnectorMcpStatus, ConnectorReconcileRequest, ConnectorRuntimeStatus, ConnectorSessionAccount, ConnectorSessionAccountResult, ConnectorStatus, AutoModeSwitchHandler, AutoModeSwitchRequest, AutoModeSwitchResponse, AgentStopHandler, AgentStopHookInput, AgentStopHookOutput, SubagentStartHandler, SubagentStartHookInput, SubagentStartHookOutput, SubagentStopHandler, SubagentStopHookInput, SubagentStopHookOutput, UserPromptTransformedHandler, UserPromptTransformedHookInput, UserPromptTransformedHookOutput, CopilotClientInfo, CopilotClientMode, CopilotClientOptions, InstallationConfirmationHandler, InstallationConfirmationRequest, InstallationConfirmationResponse, InstallationDecision, InstallationReview, McpInstallationReview, CopilotExpAssignmentResponse, StdioRuntimeConnection, InProcessRuntimeConnection, TcpRuntimeConnection, UriRuntimeConnection, ChildProcessRuntimeConnection, CustomAgentConfig, ElicitationFieldValue, ElicitationHandler, ElicitationParams, ElicitationContext, ElicitationResult, ElicitationSchema, ElicitationSchemaField, ExpConfigEntry, ExpFlagValue, ExitPlanModeHandler, ExitPlanModeRequest, ExitPlanModeResult, ExtensionLaunchProfile, ExtensionLaunchProvider, ExtensionLaunchProviderResolveRequest, ExtensionLaunchProviderResolveResult, ExtensionInfo, ForegroundSessionInfo, GetAuthStatusResponse, GetStatusResponse, GitHubMcpToolConfig, GitHubTelemetryNotification, GitHubTelemetryEvent, GitHubTelemetryClientInfo, GitHubTokenAcquireReason, GitHubTokenAcquireResult, GitHubTokenProvider, GitHubTokenProviderArgs, GitHubTokenProviderResult, InfiniteSessionConfig, LargeToolOutputConfig, MemoryConfiguration, UiInputOptions, MCPStdioServerConfig, MCPHTTPServerConfig, MCPServerConfig, DefaultAgentConfig, BearerTokenProvider, ExtensionContextAttachment, MessageOptions, ResponseSchema, MessageSource, ManagedSettings, ManagedSettingsPermissions, ModelBilling, ModelBillingTokenPrices, ModelBillingTokenPricesLongContext, AutoTier, CapiSessionOptions, CurrentModel, ModelSwitchAutoTierResult, ModelSwitchAutoTierStatus, ModelCapabilities, ModelCapabilitiesOverride, ModelInfo, ModelPolicy, NamedProviderConfig, PermissionHandler, PermissionRequest, PermissionRequestedData, PermissionRequestedEvent, PermissionRequestResult, AttributedPermissionResult, PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSource, PermissionDecisionSurface, PermissionResponseCapability, ProviderConfig, ProviderConfigModelProvider, ProviderModelConfig, ProviderTokenArgs, RemoteSessionMode, SandboxConfigSource, ResumeSessionConfig, TranscriptRecovery, SectionOverride, SectionOverrideAction, SectionTransformFn, SessionCapabilities, SessionConfig, SessionConfigBase, SessionEvent, SessionEventHandler, SessionEventPayload, SessionEventType, SessionLifecycleEvent, SessionLifecycleEventMetadata, SessionLifecycleEventType, SessionLifecycleHandler, SessionHooks, SessionCreatedEvent, SessionDeletedEvent, SessionUpdatedEvent, SessionForegroundEvent, SessionBackgroundEvent, SessionContext, SessionListFilter, SessionMetadata, SessionUiApi, SessionFsConfig, SessionFsProvider, SessionFsFileInfo, SessionFsSqliteQueryResult, SessionFsSqliteQueryType, SessionFsSqliteProvider, SessionFsSqliteStatement, SessionFsSqliteTransactionErrorClass, CopilotRequestContext, SystemMessageAppendConfig, SystemMessageConfig, SystemMessageCustomizeConfig, SystemMessageReplaceConfig, SystemMessageSection, TelemetryConfig, TraceContext, TraceContextProvider, Tool, ToolHandler, ToolInvocation, CurrentToolMetadata, ToolTelemetry, ToolResultObject, ToolSearchConfig, TypedSessionEventHandler, TypedSessionLifecycleHandler, ZodSchema, } from "./types.js";
|
|
17
17
|
export type { JsonValue, WorkflowRunOptions, WorkflowResumeOptions, WorkflowLimitOverrides, WorkflowResumeErrorCode, SessionWorkflowApi, WorkflowAgentOptions, WorkflowContext, WorkflowDefinition, WorkflowHandle, WorkflowJsonSchema, WorkflowLimits, WorkflowMeta, WorkflowPipelineStage, WorkflowStepOptions, WorkflowRunResult, WorkflowRunStatus, WorkflowRunSummary, WorkflowListRunsOptions, WorkflowRunsPage, WorkflowRunDetail, WorkflowProgressPage, WorkflowProgressLine, WorkflowPhaseObservation, WorkflowPhaseStatus, WorkflowAgentSummary, } from "./workflow.js";
|
package/dist/session.d.ts
CHANGED
|
@@ -59,7 +59,6 @@ export declare class CopilotSession {
|
|
|
59
59
|
private elicitationHandler?;
|
|
60
60
|
private exitPlanModeHandler?;
|
|
61
61
|
private autoModeSwitchHandler?;
|
|
62
|
-
private skillProvider?;
|
|
63
62
|
private hooks?;
|
|
64
63
|
private transformCallbacks?;
|
|
65
64
|
private _rpc;
|
|
@@ -236,12 +235,6 @@ export declare class CopilotSession {
|
|
|
236
235
|
private _confirm;
|
|
237
236
|
private _select;
|
|
238
237
|
private _input;
|
|
239
|
-
private requireSkillProvider;
|
|
240
|
-
/**
|
|
241
|
-
* Runs a provider call with an abort signal tied to the runtime's request
|
|
242
|
-
* cancellation. Failures are logged locally and reported generically.
|
|
243
|
-
*/
|
|
244
|
-
private callSkillProvider;
|
|
245
238
|
/**
|
|
246
239
|
* Retrieves all events and messages from this session's history.
|
|
247
240
|
*
|
package/dist/session.js
CHANGED
|
@@ -266,7 +266,6 @@ class CopilotSession {
|
|
|
266
266
|
elicitationHandler;
|
|
267
267
|
exitPlanModeHandler;
|
|
268
268
|
autoModeSwitchHandler;
|
|
269
|
-
skillProvider;
|
|
270
269
|
hooks;
|
|
271
270
|
transformCallbacks;
|
|
272
271
|
_rpc = null;
|
|
@@ -679,7 +678,6 @@ class CopilotSession {
|
|
|
679
678
|
this.elicitationHandler = void 0;
|
|
680
679
|
this.exitPlanModeHandler = void 0;
|
|
681
680
|
this.autoModeSwitchHandler = void 0;
|
|
682
|
-
this.skillProvider = void 0;
|
|
683
681
|
this.commandHandlers.clear();
|
|
684
682
|
this.canvases.clear();
|
|
685
683
|
this.workflows.clear();
|
|
@@ -1586,68 +1584,6 @@ class CopilotSession {
|
|
|
1586
1584
|
registerUserInputHandler(handler) {
|
|
1587
1585
|
this.userInputHandler = handler;
|
|
1588
1586
|
}
|
|
1589
|
-
/**
|
|
1590
|
-
* Registers the session's skill provider.
|
|
1591
|
-
*
|
|
1592
|
-
* @param provider - The skill provider, or undefined to remove it
|
|
1593
|
-
* @internal This method is typically called internally when creating a session.
|
|
1594
|
-
*/
|
|
1595
|
-
registerSkillProvider(provider) {
|
|
1596
|
-
this.skillProvider = provider;
|
|
1597
|
-
}
|
|
1598
|
-
/**
|
|
1599
|
-
* Handles a `skillProvider.list` request from the runtime.
|
|
1600
|
-
*
|
|
1601
|
-
* @internal This method is for internal use by the SDK.
|
|
1602
|
-
*/
|
|
1603
|
-
async _handleSkillProviderList(token) {
|
|
1604
|
-
const provider = this.requireSkillProvider();
|
|
1605
|
-
return await this.callSkillProvider("listSkills", token, async (options) => ({
|
|
1606
|
-
skills: await provider.listSkills(options) ?? []
|
|
1607
|
-
}));
|
|
1608
|
-
}
|
|
1609
|
-
/**
|
|
1610
|
-
* Handles a `skillProvider.read` request from the runtime.
|
|
1611
|
-
*
|
|
1612
|
-
* @internal This method is for internal use by the SDK.
|
|
1613
|
-
*/
|
|
1614
|
-
async _handleSkillProviderRead(name, token) {
|
|
1615
|
-
const provider = this.requireSkillProvider();
|
|
1616
|
-
return await this.callSkillProvider("readSkill", token, async (options) => ({
|
|
1617
|
-
markdown: await provider.readSkill(name, options) ?? null
|
|
1618
|
-
}));
|
|
1619
|
-
}
|
|
1620
|
-
requireSkillProvider() {
|
|
1621
|
-
if (!this.skillProvider) {
|
|
1622
|
-
throw new Error(`No skill provider for session: ${this.sessionId}`);
|
|
1623
|
-
}
|
|
1624
|
-
return this.skillProvider;
|
|
1625
|
-
}
|
|
1626
|
-
/**
|
|
1627
|
-
* Runs a provider call with an abort signal tied to the runtime's request
|
|
1628
|
-
* cancellation. Failures are logged locally and reported generically.
|
|
1629
|
-
*/
|
|
1630
|
-
async callSkillProvider(operation, token, call) {
|
|
1631
|
-
const controller = new AbortController();
|
|
1632
|
-
const subscription = token?.onCancellationRequested(() => controller.abort());
|
|
1633
|
-
if (token?.isCancellationRequested) {
|
|
1634
|
-
controller.abort();
|
|
1635
|
-
}
|
|
1636
|
-
try {
|
|
1637
|
-
return await call({ signal: controller.signal });
|
|
1638
|
-
} catch (error) {
|
|
1639
|
-
if (controller.signal.aborted) {
|
|
1640
|
-
throw new ResponseError(-32800, `Skill provider ${operation} cancelled`);
|
|
1641
|
-
}
|
|
1642
|
-
console.error(`Skill provider ${operation} failed`, {
|
|
1643
|
-
sessionId: this.sessionId,
|
|
1644
|
-
error
|
|
1645
|
-
});
|
|
1646
|
-
throw skillProviderFailure(operation);
|
|
1647
|
-
} finally {
|
|
1648
|
-
subscription?.dispose();
|
|
1649
|
-
}
|
|
1650
|
-
}
|
|
1651
1587
|
/**
|
|
1652
1588
|
* Registers hook handlers for session lifecycle events.
|
|
1653
1589
|
*
|
|
@@ -2001,9 +1937,6 @@ function toCanvasRpcError(error) {
|
|
|
2001
1937
|
const message = error instanceof Error ? error.message : String(error);
|
|
2002
1938
|
return new ResponseError(ErrorCodes.InternalError, message, { code, message });
|
|
2003
1939
|
}
|
|
2004
|
-
function skillProviderFailure(operation) {
|
|
2005
|
-
return new ResponseError(ErrorCodes.InternalError, `Skill provider ${operation} failed`);
|
|
2006
|
-
}
|
|
2007
1940
|
function strictJsonValidationError(context, category, message, path) {
|
|
2008
1941
|
return new ResponseError(ErrorCodes.InternalError, message, {
|
|
2009
1942
|
code: context.code,
|
package/dist/types.d.ts
CHANGED
|
@@ -50,8 +50,6 @@ export type { SessionFsSqliteTransactionErrorClass } from "./sessionFsProvider.j
|
|
|
50
50
|
export { SessionFsSqliteTransactionFailure } from "./sessionFsProvider.js";
|
|
51
51
|
export { SessionFsWriteFailure } from "./sessionFsProvider.js";
|
|
52
52
|
export type { LlmInferenceHeaders } from "./generated/rpc.js";
|
|
53
|
-
import type { SkillProviderDescriptor } from "./generated/rpc.js";
|
|
54
|
-
export type { SkillProviderDescriptor };
|
|
55
53
|
export type { PermissionDecisionContext, PermissionDecisionOutcome, PermissionDecisionSurface, PermissionResponseCapability, } from "./generated/rpc.js";
|
|
56
54
|
export type { PermissionDecisionSource } from "./generated/session-events.js";
|
|
57
55
|
export type { CopilotRequestContext } from "./copilotRequestHandler.js";
|
|
@@ -1882,13 +1880,6 @@ export interface ManagedSettingsPermissions {
|
|
|
1882
1880
|
* (across managed layers) must admit an operation for it to be allowed.
|
|
1883
1881
|
*/
|
|
1884
1882
|
allow?: string[];
|
|
1885
|
-
/**
|
|
1886
|
-
* Closed-world host boundary expressed as `Domain(hostname)`, `Domain(IP)`,
|
|
1887
|
-
* or `Domain(*.example.com)` rules. Schemes, ports, paths, queries, and
|
|
1888
|
-
* fragments are rejected. Multiple managed layers intersect their lists;
|
|
1889
|
-
* an empty list denies all hosts.
|
|
1890
|
-
*/
|
|
1891
|
-
limitTo?: string[];
|
|
1892
1883
|
}
|
|
1893
1884
|
/**
|
|
1894
1885
|
* Host-injected enterprise managed settings. The first supported contract is
|
|
@@ -1902,57 +1893,6 @@ export interface ManagedSettings {
|
|
|
1902
1893
|
}
|
|
1903
1894
|
/** Selects the model-facing shape of the built-in `ask_user` tool. */
|
|
1904
1895
|
export type AskUserVariant = "legacy" | "elicitation";
|
|
1905
|
-
/**
|
|
1906
|
-
* Supplies session-scoped skills from the host's own storage, such as a
|
|
1907
|
-
* database, instead of `SKILL.md` files on disk.
|
|
1908
|
-
*
|
|
1909
|
-
* The runtime calls {@link SkillProvider.listSkills} when it builds the
|
|
1910
|
-
* session's skill catalog, and {@link SkillProvider.readSkill} each time it
|
|
1911
|
-
* needs a skill's instructions: when the model loads the skill through the
|
|
1912
|
-
* `skill` tool, when a user runs `/skill-name`, or when a custom agent lists
|
|
1913
|
-
* the skill. Calls may run concurrently, including on behalf of sub-agents, and
|
|
1914
|
-
* each call must finish within 30 seconds. Errors thrown by a provider are
|
|
1915
|
-
* never shown to the model.
|
|
1916
|
-
*
|
|
1917
|
-
* Supply a provider with {@link SessionConfigBase.skillProvider}. Providers
|
|
1918
|
-
* aren't supported for cloud sessions.
|
|
1919
|
-
*
|
|
1920
|
-
* @experimental Session-scoped skill providers are experimental and may change
|
|
1921
|
-
* or be removed in future SDK or CLI releases.
|
|
1922
|
-
*/
|
|
1923
|
-
export interface SkillProvider {
|
|
1924
|
-
/**
|
|
1925
|
-
* Returns catalog metadata for every skill the provider supplies. The
|
|
1926
|
-
* descriptors are authoritative: names must be unique ignoring case, and
|
|
1927
|
-
* the runtime validates their limits.
|
|
1928
|
-
*/
|
|
1929
|
-
listSkills(options: SkillProviderCallOptions): SkillProviderDescriptor[] | Promise<SkillProviderDescriptor[]>;
|
|
1930
|
-
/**
|
|
1931
|
-
* Returns the `SKILL.md` text for the named skill, or `null`/`undefined`
|
|
1932
|
-
* when the skill no longer exists.
|
|
1933
|
-
*
|
|
1934
|
-
* YAML frontmatter is optional. Fields it omits come from the skill's
|
|
1935
|
-
* descriptor, fields it declares must match the descriptor, and
|
|
1936
|
-
* `allowed-tools` can only be set there. Text whose first line is `---` is
|
|
1937
|
-
* parsed as frontmatter.
|
|
1938
|
-
*
|
|
1939
|
-
* @param name - The skill's name, as listed by {@link SkillProvider.listSkills}.
|
|
1940
|
-
*/
|
|
1941
|
-
readSkill(name: string, options: SkillProviderCallOptions): string | null | undefined | Promise<string | null | undefined>;
|
|
1942
|
-
}
|
|
1943
|
-
/**
|
|
1944
|
-
* Per-call options passed to {@link SkillProvider} methods.
|
|
1945
|
-
*
|
|
1946
|
-
* @experimental Session-scoped skill providers are experimental and may change
|
|
1947
|
-
* or be removed in future SDK or CLI releases.
|
|
1948
|
-
*/
|
|
1949
|
-
export interface SkillProviderCallOptions {
|
|
1950
|
-
/**
|
|
1951
|
-
* Aborted when the runtime cancels the call, for example when it times out
|
|
1952
|
-
* or the session disconnects. The runtime ignores any later result.
|
|
1953
|
-
*/
|
|
1954
|
-
signal: AbortSignal;
|
|
1955
|
-
}
|
|
1956
1896
|
/**
|
|
1957
1897
|
* Shared configuration fields used by both {@link SessionConfig} (for
|
|
1958
1898
|
* creating a new session) and {@link ResumeSessionConfig} (for resuming
|
|
@@ -2372,22 +2312,6 @@ export interface SessionConfigBase {
|
|
|
2372
2312
|
* Directories to load skills from.
|
|
2373
2313
|
*/
|
|
2374
2314
|
skillDirectories?: string[];
|
|
2375
|
-
/**
|
|
2376
|
-
* Supplies skills from the host's own storage instead of `SKILL.md` files on
|
|
2377
|
-
* disk. Provider skills join the session's skill catalog alongside file-based
|
|
2378
|
-
* skills. See {@link SkillProvider}.
|
|
2379
|
-
*
|
|
2380
|
-
* Supplying a provider enables skills unless `enableSkills` is set explicitly,
|
|
2381
|
-
* so set `enableSkills: true` when the client runs in `"empty"` mode. With
|
|
2382
|
-
* `enableSkills: false` the provider stays bound but receives no calls.
|
|
2383
|
-
*
|
|
2384
|
-
* The provider isn't persisted. Pass it again when resuming the session;
|
|
2385
|
-
* resuming without one removes the provider's skills.
|
|
2386
|
-
*
|
|
2387
|
-
* @experimental Session-scoped skill providers are experimental and may change
|
|
2388
|
-
* or be removed in future SDK or CLI releases.
|
|
2389
|
-
*/
|
|
2390
|
-
skillProvider?: SkillProvider;
|
|
2391
2315
|
/**
|
|
2392
2316
|
* Local filesystem paths to Open Plugins-format directories
|
|
2393
2317
|
* (https://open-plugins.com/) to load for this session.
|
package/package.json
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
"url": "https://github.com/github/copilot-agent-runtime.git",
|
|
6
6
|
"directory": "src/sdk/nodejs"
|
|
7
7
|
},
|
|
8
|
-
"version": "1.0.17-
|
|
9
|
-
"copilotCliVersion": "1.0.
|
|
8
|
+
"version": "1.0.17-unstable.37553872417.gc9f6176",
|
|
9
|
+
"copilotCliVersion": "1.0.92-4.unstable.r37553872417.gc9f6176",
|
|
10
10
|
"description": "TypeScript SDK for programmatic control of GitHub Copilot CLI via JSON-RPC",
|
|
11
11
|
"main": "./dist/cjs/index.js",
|
|
12
12
|
"types": "./dist/index.d.ts",
|
|
@@ -103,18 +103,18 @@
|
|
|
103
103
|
"README.md"
|
|
104
104
|
],
|
|
105
105
|
"copilotRuntime": {
|
|
106
|
-
"sourceSha": "
|
|
107
|
-
"version": "1.0.
|
|
106
|
+
"sourceSha": "c9f6176371c5f61d81a031ed0f237096a436fd69",
|
|
107
|
+
"version": "1.0.92-4.unstable.r37553872417.gc9f6176",
|
|
108
108
|
"visibility": "public"
|
|
109
109
|
},
|
|
110
110
|
"optionalDependencies": {
|
|
111
|
-
"@github/copilot-sdk-darwin-arm64": "1.0.17-
|
|
112
|
-
"@github/copilot-sdk-darwin-x64": "1.0.17-
|
|
113
|
-
"@github/copilot-sdk-linux-arm64": "1.0.17-
|
|
114
|
-
"@github/copilot-sdk-linux-x64": "1.0.17-
|
|
115
|
-
"@github/copilot-sdk-linuxmusl-arm64": "1.0.17-
|
|
116
|
-
"@github/copilot-sdk-linuxmusl-x64": "1.0.17-
|
|
117
|
-
"@github/copilot-sdk-win32-arm64": "1.0.17-
|
|
118
|
-
"@github/copilot-sdk-win32-x64": "1.0.17-
|
|
111
|
+
"@github/copilot-sdk-darwin-arm64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
112
|
+
"@github/copilot-sdk-darwin-x64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
113
|
+
"@github/copilot-sdk-linux-arm64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
114
|
+
"@github/copilot-sdk-linux-x64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
115
|
+
"@github/copilot-sdk-linuxmusl-arm64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
116
|
+
"@github/copilot-sdk-linuxmusl-x64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
117
|
+
"@github/copilot-sdk-win32-arm64": "1.0.17-unstable.37553872417.gc9f6176",
|
|
118
|
+
"@github/copilot-sdk-win32-x64": "1.0.17-unstable.37553872417.gc9f6176"
|
|
119
119
|
}
|
|
120
120
|
}
|