@github/copilot-sdk 1.0.20 → 1.0.21-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -671,6 +671,23 @@ if (result.status === "pending") {
671
671
 
672
672
  See [Auto tier persistence](../docs/features/session-persistence.md#auto-tier-persistence) for the full lifecycle rules.
673
673
 
674
+ ##### `rpc.model.getReasoningSummaries(params)` (experimental)
675
+
676
+ Read the current model's reasoning-summary presentation policy without changing session state. Call `session.rpc.model.list()` first to load the model catalog; otherwise the result may have `ready: false`. The request and result types are exported from `@github/copilot-sdk`.
677
+
678
+ ```typescript
679
+ import type {
680
+ ModelGetReasoningSummariesRequest,
681
+ ModelGetReasoningSummariesResult,
682
+ } from "@github/copilot-sdk";
683
+
684
+ const presentation: ModelGetReasoningSummariesRequest = { summariesVisible: false };
685
+ const policy: ModelGetReasoningSummariesResult =
686
+ await session.rpc.model.getReasoningSummaries(presentation);
687
+ ```
688
+
689
+ Omit `persistedShowReasoning` when no visibility setting is saved. `visibility` can remain unset while experiment assignment is pending; `clearRedundantSetting` tells the host when its persisted setting matches the model default.
690
+
674
691
  ##### `setTools(tools: Tool[]): Promise<void>`
675
692
 
676
693
  Replace the tools this client supplies to the session, together with the handlers that serve them (experimental). `tools` takes the same definitions as `createSession` and becomes this client's complete tool set; pass `[]` to remove all of this client's tools. Built-in, MCP, and plugin tools, and tools other connected clients supply, are unaffected.
@@ -1635,6 +1652,26 @@ npm ci
1635
1652
  npm test
1636
1653
  ```
1637
1654
 
1655
+ ### Internal feature-flag example
1656
+
1657
+ [`examples/internal-feature-flags.ts`](examples/internal-feature-flags.ts) uses
1658
+ the generated internal RPC factory against a real runtime over stdio.
1659
+ It lists the catalog and shows environment, settings, and explicit-override
1660
+ precedence. It also checks that static resolution does not apply `COPILOT_EXP_*`
1661
+ experiment assignments. It creates no session and sends no model request.
1662
+
1663
+ After you prepare matching runtime artifacts, run this from the runtime repository root:
1664
+
1665
+ ```bash
1666
+ COPILOT_RUNTIME_PROVIDER_LIB="$PWD/bazel-bin/src/native/runtime/runtime.node" \
1667
+ src/sdk/nodejs/node_modules/.bin/tsx \
1668
+ src/sdk/nodejs/examples/internal-feature-flags.ts \
1669
+ "$PWD/bazel-bin/src/runtime-bin/copilot-runtime"
1670
+ ```
1671
+
1672
+ The JSON output includes `staticResolution` values of `false`, `true`, `false`,
1673
+ and `true`, in that order. These methods are internal, not public SDK APIs.
1674
+
1638
1675
  ## License
1639
1676
 
1640
1677
  MIT
@@ -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.96";
25
+ const COPILOT_CLI_VERSION = "1.0.97-1";
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 = {
@@ -1299,6 +1299,7 @@ class CopilotClient {
1299
1299
  model: config.model,
1300
1300
  allowedModels: config.allowedModels,
1301
1301
  sessionId: localSessionId,
1302
+ name: config.name,
1302
1303
  clientName: config.clientName,
1303
1304
  reasoningEffort: config.reasoningEffort,
1304
1305
  reasoningSummary: config.reasoningSummary,
@@ -1377,6 +1378,8 @@ class CopilotClient {
1377
1378
  enableSkills: config.enableSkills,
1378
1379
  skillDirectories: config.skillDirectories,
1379
1380
  ...config.skillProvider ? { hasSkillProvider: true } : {},
1381
+ agentDirectories: config.agentDirectories,
1382
+ hookDirectories: config.hookDirectories,
1380
1383
  pluginDirectories: config.pluginDirectories,
1381
1384
  instructionDirectories: config.instructionDirectories,
1382
1385
  disabledSkills: config.disabledSkills,
@@ -1645,6 +1648,8 @@ class CopilotClient {
1645
1648
  agent: config.agent,
1646
1649
  skillDirectories: config.skillDirectories,
1647
1650
  ...config.skillProvider ? { hasSkillProvider: true } : {},
1651
+ agentDirectories: config.agentDirectories,
1652
+ hookDirectories: config.hookDirectories,
1648
1653
  pluginDirectories: config.pluginDirectories,
1649
1654
  instructionDirectories: config.instructionDirectories,
1650
1655
  disabledSkills: config.disabledSkills,