@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 CHANGED
@@ -369,7 +369,6 @@ Create a new conversation session.
369
369
  - `askUserVariant?: "legacy" | "elicitation"` - Selects the model-facing `ask_user` tool shape when creating or cold-resuming a session. Defaults to `"legacy"`; use `"elicitation"` with `onElicitationRequest`.
370
370
  - `onElicitationRequest?: ElicitationHandler` - Handler for elicitation requests dispatched by the server. Enables this client to present form-based UI dialogs on behalf of the agent or other session participants. See [Elicitation Requests](#elicitation-requests) section.
371
371
  - `hooks?: SessionHooks` - Hook handlers for session lifecycle events. See [Session Hooks](#session-hooks) section.
372
- - `skillProvider?: SkillProvider` - **Experimental.** Serves skills from host storage instead of skill directories. Not persisted; pass it again on resume. See [Skill providers](#skill-providers-experimental).
373
372
 
374
373
  ```typescript
375
374
  const session = await client.createSession({
@@ -1121,46 +1120,6 @@ const session = await client.createSession({
1121
1120
  });
1122
1121
  ```
1123
1122
 
1124
- ### Skill providers (experimental)
1125
-
1126
- A skill provider serves skills from your own storage, such as a database, instead of `SKILL.md`
1127
- files on disk. Provider skills join the session's skill catalog and load on demand through the
1128
- `skill` tool, just like file-based skills.
1129
-
1130
- ```typescript
1131
- import type { SkillProvider } from "@github/copilot-sdk";
1132
-
1133
- const skillProvider: SkillProvider = {
1134
- listSkills: async () => [
1135
- { name: "release-notes", description: "Writes release notes in the team's format." },
1136
- ],
1137
- readSkill: async (name, { signal }) => (await db.findSkill(name, { signal }))?.markdown ?? null,
1138
- };
1139
-
1140
- const session = await client.createSession({
1141
- onPermissionRequest: approveAll,
1142
- skillProvider,
1143
- });
1144
- ```
1145
-
1146
- - `listSkills()` returns the catalog metadata. `readSkill(name)` returns the skill's markdown, or
1147
- `null`/`undefined` if the skill no longer exists. The markdown may omit YAML frontmatter; when
1148
- frontmatter is present, its fields must agree with the listed metadata, and `allowed-tools` is
1149
- read only from frontmatter.
1150
- - Each call receives `{ signal }`, an `AbortSignal` that fires when the runtime cancels the call,
1151
- for example after its 30-second limit or when the session disconnects. It doesn't fire when the
1152
- connection closes or the client is force-stopped; a running call then continues until it returns.
1153
- - The provider is never persisted. Pass it again to `resumeSession`; resuming without it unbinds
1154
- the provider.
1155
- - A provider enables skills unless you set `enableSkills: false`, which keeps it bound but unused.
1156
- In `mode: "empty"`, skills stay disabled until you set `enableSkills: true`.
1157
- - Errors thrown by the provider are reported to the model as a generic load failure; their
1158
- messages are not forwarded.
1159
- - The runtime may call the provider concurrently, so both methods must be safe for concurrent use.
1160
- - Skill providers are not supported for cloud sessions.
1161
-
1162
- See [Custom skills](../docs/features/skills.md#skill-providers-experimental) for limits and details.
1163
-
1164
1123
  ### Multiple Sessions
1165
1124
 
1166
1125
  ```typescript
@@ -22,7 +22,7 @@ __export(cliVersion_exports, {
22
22
  COPILOT_CLI_VERSION: () => COPILOT_CLI_VERSION
23
23
  });
24
24
  module.exports = __toCommonJS(cliVersion_exports);
25
- const COPILOT_CLI_VERSION = "1.0.93-3";
25
+ const COPILOT_CLI_VERSION = "1.0.92-4.unstable.r37553872417.gc9f6176";
26
26
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
27
27
  // Annotate the CommonJS export names for ESM import in node:
28
28
  0 && (module.exports = {
@@ -1204,9 +1204,6 @@ class CopilotClient {
1204
1204
  if (config.gitHubToken !== void 0 && config.gitHubTokenProvider !== void 0) {
1205
1205
  throw new Error("gitHubToken and gitHubTokenProvider are mutually exclusive");
1206
1206
  }
1207
- if (config.cloud != null && config.skillProvider) {
1208
- throw new Error("Skill providers are not supported for cloud sessions.");
1209
- }
1210
1207
  if (!this.connection) {
1211
1208
  await this.start();
1212
1209
  }
@@ -1266,9 +1263,6 @@ class CopilotClient {
1266
1263
  if (config.hooks) {
1267
1264
  s.registerHooks(config.hooks);
1268
1265
  }
1269
- if (config.skillProvider) {
1270
- s.registerSkillProvider(config.skillProvider);
1271
- }
1272
1266
  if (transformCallbacks) {
1273
1267
  s.registerTransformCallbacks(transformCallbacks);
1274
1268
  }
@@ -1375,7 +1369,6 @@ class CopilotClient {
1375
1369
  enableSessionStore: config.enableSessionStore,
1376
1370
  enableSkills: config.enableSkills,
1377
1371
  skillDirectories: config.skillDirectories,
1378
- ...config.skillProvider ? { hasSkillProvider: true } : {},
1379
1372
  pluginDirectories: config.pluginDirectories,
1380
1373
  instructionDirectories: config.instructionDirectories,
1381
1374
  disabledSkills: config.disabledSkills,
@@ -1529,9 +1522,6 @@ class CopilotClient {
1529
1522
  if (config.hooks) {
1530
1523
  session.registerHooks(config.hooks);
1531
1524
  }
1532
- if (config.skillProvider) {
1533
- session.registerSkillProvider(config.skillProvider);
1534
- }
1535
1525
  const modeDefaults = this.configDefaultsForMode();
1536
1526
  config = { ...modeDefaults, ...config };
1537
1527
  config.customAgentsLocalOnly ??= modeDefaults.customAgentsLocalOnly;
@@ -1545,10 +1535,9 @@ class CopilotClient {
1545
1535
  if (config.onEvent) {
1546
1536
  session.on(config.onEvent);
1547
1537
  }
1548
- const toolFilterOptions = this.resolveToolFilterOptions(config);
1549
1538
  this.setupSessionFs(session, config);
1550
- const replacedSession = this.sessions.get(sessionId);
1551
1539
  this.sessions.set(sessionId, session);
1540
+ const toolFilterOptions = this.resolveToolFilterOptions(config);
1552
1541
  const gitHubTokenProviderRegistrationId = this.registerGitHubTokenProvider(
1553
1542
  config.gitHubTokenProvider,
1554
1543
  sessionId
@@ -1641,7 +1630,6 @@ class CopilotClient {
1641
1630
  defaultAgent: config.defaultAgent,
1642
1631
  agent: config.agent,
1643
1632
  skillDirectories: config.skillDirectories,
1644
- ...config.skillProvider ? { hasSkillProvider: true } : {},
1645
1633
  pluginDirectories: config.pluginDirectories,
1646
1634
  instructionDirectories: config.instructionDirectories,
1647
1635
  disabledSkills: config.disabledSkills,
@@ -1686,13 +1674,7 @@ class CopilotClient {
1686
1674
  this.commitGitHubTokenProvider(sessionId, gitHubTokenProviderRegistrationId);
1687
1675
  } catch (e) {
1688
1676
  session._markDisconnected();
1689
- if (this.sessions.get(sessionId) === session) {
1690
- if (replacedSession) {
1691
- this.sessions.set(sessionId, replacedSession);
1692
- } else {
1693
- this.sessions.delete(sessionId);
1694
- }
1695
- }
1677
+ this.sessions.delete(sessionId);
1696
1678
  if (gitHubTokenProviderRegistrationId !== void 0) {
1697
1679
  this.githubTokenProviders.delete(gitHubTokenProviderRegistrationId);
1698
1680
  }
@@ -2668,20 +2650,6 @@ stderr: ${stderrOutput}` : ""}`
2668
2650
  return await this.handleHooksInvoke(params);
2669
2651
  }
2670
2652
  );
2671
- this.connection.onRequest(
2672
- "skillProvider.list",
2673
- async (params, token) => await this.resolveSkillProviderSession(params)._handleSkillProviderList(token)
2674
- );
2675
- this.connection.onRequest(
2676
- "skillProvider.read",
2677
- async (params, token) => {
2678
- const session = this.resolveSkillProviderSession(params);
2679
- if (typeof params.name !== "string") {
2680
- throw new Error("Invalid skillProvider.read payload");
2681
- }
2682
- return await session._handleSkillProviderRead(params.name, token);
2683
- }
2684
- );
2685
2653
  const connection = this.connection;
2686
2654
  const messageWriter = this.messageWriter;
2687
2655
  const cliProcess = this.isExternalServer ? null : this.cliProcess;
@@ -2838,16 +2806,6 @@ stderr: ${stderrOutput}` : ""}`
2838
2806
  });
2839
2807
  return { response };
2840
2808
  }
2841
- resolveSkillProviderSession(params) {
2842
- if (!params || typeof params.sessionId !== "string") {
2843
- throw new Error("Invalid skillProvider payload");
2844
- }
2845
- const session = this.sessions.get(params.sessionId);
2846
- if (!session) {
2847
- throw new Error(`Session not found: ${params.sessionId}`);
2848
- }
2849
- return session;
2850
- }
2851
2809
  async handleHooksInvoke(params) {
2852
2810
  if (!params || typeof params.sessionId !== "string" || typeof params.hookType !== "string") {
2853
2811
  throw new Error("Invalid hooks invoke payload");
@@ -41,13 +41,11 @@ async function joinSession(config = {}) {
41
41
  const client = new import_client.CopilotClient({ _internalConnection: { kind: "parent-process" } });
42
42
  const {
43
43
  extensionSdkPath: _stripped,
44
- skillProvider: _strippedSkillProvider,
45
44
  workflows,
46
45
  requestedEnvironmentVariables,
47
46
  ...rest
48
47
  } = config;
49
48
  void _stripped;
50
- void _strippedSkillProvider;
51
49
  return client.resumeSessionForExtension(
52
50
  sessionId,
53
51
  {
@@ -666,15 +666,21 @@ function createServerRpc(connection) {
666
666
  /** @experimental */
667
667
  settings: {
668
668
  /**
669
- * Lists every known user setting from settings.json, 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.
669
+ * Drops this runtime process's in-memory user settings cache so the next settings read observes disk.
670
+ */
671
+ reload: async () => connection.sendRequest("user.settings.reload", {}),
672
+ /**
673
+ * 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.
670
674
  *
671
- * @returns Per-key metadata for every known user setting in settings.json, including settings left at their default. Excludes repository- and enterprise-managed overrides.
675
+ * @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.
672
676
  */
673
677
  get: async () => connection.sendRequest("user.settings.get", {}),
674
678
  /**
675
- * Writes one or more user settings to settings.json, replacing each provided top-level key. A key whose value is null is removed.
679
+ * 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.
676
680
  *
677
681
  * @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.
682
+ *
683
+ * @returns Outcome of writing user settings.
678
684
  */
679
685
  set: async (params) => connection.sendRequest("user.settings.set", params)
680
686
  }
@@ -974,37 +980,6 @@ function createServerRpc(connection) {
974
980
  * @returns Outcome of an agentRegistry.spawn call.
975
981
  */
976
982
  spawn: async (params) => connection.sendRequest("agentRegistry.spawn", params)
977
- },
978
- /** @experimental */
979
- connectors: {
980
- /**
981
- * Returns feature availability.
982
- *
983
- * @returns Feature availability.
984
- */
985
- getCapabilities: async () => connection.sendRequest("connectors.getCapabilities", {}),
986
- /**
987
- * Returns eligible accounts.
988
- *
989
- * @returns Eligible accounts.
990
- */
991
- getAccounts: async () => connection.sendRequest("connectors.getAccounts", {}),
992
- /**
993
- * Lists entries for the selected account.
994
- *
995
- * @param params Selected account.
996
- *
997
- * @returns Entries for the selected account.
998
- */
999
- list: async (params) => connection.sendRequest("connectors.list", params),
1000
- /**
1001
- * Refreshes entries for the selected account.
1002
- *
1003
- * @param params Selected account.
1004
- *
1005
- * @returns Entries for the selected account.
1006
- */
1007
- refresh: async (params) => connection.sendRequest("connectors.refresh", params)
1008
983
  }
1009
984
  };
1010
985
  }
@@ -1060,133 +1035,6 @@ function createInternalServerRpc(connection) {
1060
1035
  */
1061
1036
  connect: async (params) => connection.sendRequest("connect", params),
1062
1037
  /** @experimental */
1063
- agents: {
1064
- /**
1065
- * 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.
1066
- *
1067
- * @returns The agents this runtime ships, named so a consumer can tell them apart from authored ones.
1068
- */
1069
- getBuiltins: async () => connection.sendRequest("agents.getBuiltins", {}),
1070
- /**
1071
- * 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.
1072
- *
1073
- * @param params The feature flags to evaluate shipped agents against.
1074
- *
1075
- * @returns The shipped agents available under the requested flags.
1076
- */
1077
- getAvailableBuiltins: async (params) => connection.sendRequest("agents.getAvailableBuiltins", params),
1078
- /**
1079
- * 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.
1080
- *
1081
- * @param params The shipped agent whose definition to load.
1082
- *
1083
- * @returns One shipped agent's definition.
1084
- */
1085
- getBuiltinDefinition: async (params) => connection.sendRequest("agents.getBuiltinDefinition", params),
1086
- /**
1087
- * 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`.
1088
- *
1089
- * @param params The shipped agent whose listing entry to load.
1090
- *
1091
- * @returns One shipped agent, projected for a listing.
1092
- */
1093
- getBuiltinListingDefinition: async (params) => connection.sendRequest("agents.getBuiltinListingDefinition", params),
1094
- /**
1095
- * 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.
1096
- *
1097
- * @param params The models a custom agent asks for, and the models actually available.
1098
- *
1099
- * @returns The model to switch to, and the warning to show when the agent's preference could not be met.
1100
- */
1101
- customAgentInitialModelDecision: async (params) => connection.sendRequest("agents.customAgentInitialModelDecision", params)
1102
- },
1103
- /** @experimental */
1104
- globalState: {
1105
- /**
1106
- * 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.
1107
- *
1108
- * @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.
1109
- */
1110
- load: async () => connection.sendRequest("globalState.load", {}),
1111
- /**
1112
- * 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.
1113
- *
1114
- * @param params Selects the configuration directory whose machine-wide state to read.
1115
- *
1116
- * @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.
1117
- */
1118
- loadForConfigDir: async (params) => connection.sendRequest("globalState.loadForConfigDir", params),
1119
- /**
1120
- * 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.
1121
- *
1122
- * @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.
1123
- */
1124
- writeKey: async (params) => connection.sendRequest("globalState.writeKey", params)
1125
- },
1126
- /** @experimental */
1127
- gitHubRepository: {
1128
- /**
1129
- * 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'.
1130
- *
1131
- * @param params Working-tree path whose owning GitHub repository should be resolved.
1132
- *
1133
- * @returns The GitHub repository that owns the requested path, when the selected remote (`origin`, else the first) is on a GitHub host.
1134
- */
1135
- atPath: async (params) => connection.sendRequest("gitHubRepository.atPath", params)
1136
- },
1137
- /** @experimental */
1138
- gitHubOwners: {
1139
- /**
1140
- * 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.
1141
- *
1142
- * @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.
1143
- */
1144
- nextRequestId: async () => connection.sendRequest("gitHubOwners.nextRequestId", {}),
1145
- /**
1146
- * 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`.
1147
- *
1148
- * @param params Credential to list owners under, and the request id that makes the listing cancellable.
1149
- *
1150
- * @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.
1151
- */
1152
- list: async (params) => connection.sendRequest("gitHubOwners.list", params),
1153
- /**
1154
- * 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.
1155
- *
1156
- * @param params The owner listing to abandon.
1157
- *
1158
- * @returns Whether the id named a running owner listing.
1159
- */
1160
- cancel: async (params) => connection.sendRequest("gitHubOwners.cancel", params)
1161
- },
1162
- /** @experimental */
1163
- git: {
1164
- /**
1165
- * 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.
1166
- *
1167
- * @param params Working-tree path a git query applies to.
1168
- *
1169
- * @returns The remote the checked-out branch tracks.
1170
- */
1171
- currentBranchRemote: async (params) => connection.sendRequest("git.currentBranchRemote", params),
1172
- /**
1173
- * 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.
1174
- *
1175
- * @param params Working-tree path a git query applies to.
1176
- *
1177
- * @returns Updated working directory and git context. Emitted as the new payload of `session.context_changed`.
1178
- */
1179
- workingDirectoryContext: async (params) => connection.sendRequest("git.workingDirectoryContext", params),
1180
- /**
1181
- * 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.
1182
- *
1183
- * @param params Git working tree whose GitHub remotes should be listed.
1184
- *
1185
- * @returns The GitHub repositories a working tree's remotes point at.
1186
- */
1187
- reposFromRemotes: async (params) => connection.sendRequest("git.reposFromRemotes", params)
1188
- },
1189
- /** @experimental */
1190
1038
  sessions: {
1191
1039
  /**
1192
1040
  * Reads lightweight persisted metadata for one local session without opening it.
@@ -1226,30 +1074,6 @@ function createInternalServerRpc(connection) {
1226
1074
  * @param params Session ID to delete from disk.
1227
1075
  */
1228
1076
  delete: async (params) => connection.sendRequest("sessions.delete", params),
1229
- /**
1230
- * 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.
1231
- *
1232
- * @param params Identity, state location and starting context for a workspace record.
1233
- *
1234
- * @returns The workspace record that was written.
1235
- */
1236
- createWorkspace: async (params) => connection.sendRequest("sessions.createWorkspace", params),
1237
- /**
1238
- * 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.
1239
- *
1240
- * @param params Where the session's state lives, as a root directory and the session ID under it.
1241
- *
1242
- * @returns The workspace record on disk, omitted when the session has none.
1243
- */
1244
- loadWorkspace: async (params) => connection.sendRequest("sessions.loadWorkspace", params),
1245
- /**
1246
- * 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`.
1247
- *
1248
- * @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.
1249
- *
1250
- * @returns The merge completed. The record carries the supplied workspace-schema fields, but a stored `fork_count` stays.
1251
- */
1252
- updateWorkspaceFields: async (params) => connection.sendRequest("sessions.updateWorkspaceFields", params),
1253
1077
  /**
1254
1078
  * 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.
1255
1079
  *
@@ -2124,17 +1948,11 @@ function createSessionRpc(connection, sessionId) {
2124
1948
  /** @experimental */
2125
1949
  mcp: {
2126
1950
  /**
2127
- * Lists materialized MCP servers and their connection status. Cache misses may start and wait for MCP servers.
1951
+ * 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.
2128
1952
  *
2129
1953
  * @returns MCP servers configured for the session, with their connection status and host-level state.
2130
1954
  */
2131
1955
  list: async () => connection.sendRequest("session.mcp.list", { sessionId }),
2132
- /**
2133
- * 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.
2134
- *
2135
- * @returns Effective MCP configuration with optional live observations from matching already materialized servers.
2136
- */
2137
- listConfigured: async () => connection.sendRequest("session.mcp.listConfigured", { sessionId }),
2138
1956
  /**
2139
1957
  * 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.
2140
1958
  *
@@ -3583,12 +3401,6 @@ function createInternalSessionRpc(connection, sessionId) {
3583
3401
  },
3584
3402
  /** @experimental */
3585
3403
  mcp: {
3586
- /**
3587
- * 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.
3588
- *
3589
- * @param params Records which IDE the host is connected to, or clears it.
3590
- */
3591
- setConnectedIdeInfo: async (params) => connection.sendRequest("session.mcp.setConnectedIdeInfo", { ...params, sessionId }),
3592
3404
  /**
3593
3405
  * Reloads MCP server connections for the session with an explicit host-provided configuration.
3594
3406
  *
@@ -284,7 +284,6 @@ class CopilotSession {
284
284
  elicitationHandler;
285
285
  exitPlanModeHandler;
286
286
  autoModeSwitchHandler;
287
- skillProvider;
288
287
  hooks;
289
288
  transformCallbacks;
290
289
  _rpc = null;
@@ -697,7 +696,6 @@ class CopilotSession {
697
696
  this.elicitationHandler = void 0;
698
697
  this.exitPlanModeHandler = void 0;
699
698
  this.autoModeSwitchHandler = void 0;
700
- this.skillProvider = void 0;
701
699
  this.commandHandlers.clear();
702
700
  this.canvases.clear();
703
701
  this.workflows.clear();
@@ -1604,68 +1602,6 @@ class CopilotSession {
1604
1602
  registerUserInputHandler(handler) {
1605
1603
  this.userInputHandler = handler;
1606
1604
  }
1607
- /**
1608
- * Registers the session's skill provider.
1609
- *
1610
- * @param provider - The skill provider, or undefined to remove it
1611
- * @internal This method is typically called internally when creating a session.
1612
- */
1613
- registerSkillProvider(provider) {
1614
- this.skillProvider = provider;
1615
- }
1616
- /**
1617
- * Handles a `skillProvider.list` request from the runtime.
1618
- *
1619
- * @internal This method is for internal use by the SDK.
1620
- */
1621
- async _handleSkillProviderList(token) {
1622
- const provider = this.requireSkillProvider();
1623
- return await this.callSkillProvider("listSkills", token, async (options) => ({
1624
- skills: await provider.listSkills(options) ?? []
1625
- }));
1626
- }
1627
- /**
1628
- * Handles a `skillProvider.read` request from the runtime.
1629
- *
1630
- * @internal This method is for internal use by the SDK.
1631
- */
1632
- async _handleSkillProviderRead(name, token) {
1633
- const provider = this.requireSkillProvider();
1634
- return await this.callSkillProvider("readSkill", token, async (options) => ({
1635
- markdown: await provider.readSkill(name, options) ?? null
1636
- }));
1637
- }
1638
- requireSkillProvider() {
1639
- if (!this.skillProvider) {
1640
- throw new Error(`No skill provider for session: ${this.sessionId}`);
1641
- }
1642
- return this.skillProvider;
1643
- }
1644
- /**
1645
- * Runs a provider call with an abort signal tied to the runtime's request
1646
- * cancellation. Failures are logged locally and reported generically.
1647
- */
1648
- async callSkillProvider(operation, token, call) {
1649
- const controller = new AbortController();
1650
- const subscription = token?.onCancellationRequested(() => controller.abort());
1651
- if (token?.isCancellationRequested) {
1652
- controller.abort();
1653
- }
1654
- try {
1655
- return await call({ signal: controller.signal });
1656
- } catch (error) {
1657
- if (controller.signal.aborted) {
1658
- throw new import_node.ResponseError(-32800, `Skill provider ${operation} cancelled`);
1659
- }
1660
- console.error(`Skill provider ${operation} failed`, {
1661
- sessionId: this.sessionId,
1662
- error
1663
- });
1664
- throw skillProviderFailure(operation);
1665
- } finally {
1666
- subscription?.dispose();
1667
- }
1668
- }
1669
1605
  /**
1670
1606
  * Registers hook handlers for session lifecycle events.
1671
1607
  *
@@ -2019,9 +1955,6 @@ function toCanvasRpcError(error) {
2019
1955
  const message = error instanceof Error ? error.message : String(error);
2020
1956
  return new import_node.ResponseError(import_node.ErrorCodes.InternalError, message, { code, message });
2021
1957
  }
2022
- function skillProviderFailure(operation) {
2023
- return new import_node.ResponseError(import_node.ErrorCodes.InternalError, `Skill provider ${operation} failed`);
2024
- }
2025
1958
  function strictJsonValidationError(context, category, message, path) {
2026
1959
  return new import_node.ResponseError(import_node.ErrorCodes.InternalError, message, {
2027
1960
  code: context.code,
@@ -1,2 +1,2 @@
1
- export declare const COPILOT_CLI_VERSION = "1.0.93-3";
1
+ export declare const COPILOT_CLI_VERSION = "1.0.92-4.unstable.r37553872417.gc9f6176";
2
2
  export declare const COPILOT_CLI_USE_NPM_PACKAGE = false;
@@ -1,4 +1,4 @@
1
- const COPILOT_CLI_VERSION = "1.0.93-3";
1
+ const COPILOT_CLI_VERSION = "1.0.92-4.unstable.r37553872417.gc9f6176";
2
2
  const COPILOT_CLI_USE_NPM_PACKAGE = false;
3
3
  export {
4
4
  COPILOT_CLI_USE_NPM_PACKAGE,
package/dist/client.d.ts CHANGED
@@ -507,7 +507,6 @@ export declare class CopilotClient {
507
507
  private handleUserInputRequest;
508
508
  private handleExitPlanModeRequest;
509
509
  private handleAutoModeSwitchRequest;
510
- private resolveSkillProviderSession;
511
510
  private handleHooksInvoke;
512
511
  private handleSystemMessageTransform;
513
512
  }