@ngosangns/ns-bridge 0.1.18 → 0.1.20

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
@@ -40,7 +40,7 @@ DSH requires `--profile`. Profile `desktop` is refused: the Electron app owns it
40
40
 
41
41
  `update` with no host updates this CLI, not the host plugins. It asks npm for the latest `@ngosangns/ns-bridge` and, with `--apply`, runs `npm install -g @ngosangns/ns-bridge@<latest>`. Already current prints the version and does not install. A host argument (`pi`, `omp`, `dsh`, or `all`) updates those plugins instead.
42
42
 
43
- `providers enable` and `providers disable` turn one of `kiro`, `devin`, or `grok` on or off. Pi and OMP share `~/.ns-bridge/providers.json` (`NS_BRIDGE_PROVIDERS` overrides the path); the extension reads it at launch. With no file, all three are on. OMP only takes `kiro` from it: `providers enable omp devin|grok` is refused with the reason, `providers disable omp devin|grok` changes nothing, `providers status omp` shows them as `not provided`, and `devin` or `grok` in the file or in an env list are ignored by the OMP plugin (they still apply to Pi). `NS_OMP_PROVIDERS` replaces the file, `NS_OMP_PROVIDER_ENABLE` adds, and `NS_OMP_PROVIDER_DISABLE` removes. DSH writes `disabled: true` on that plugin's id in the profile's `cordis.patch.yml`. In OMP, `kiro` stays with `ns-omp-provider-kiro` while that plugin is installed, unless the file or an env list names it.
43
+ `providers enable` and `providers disable` turn one of `kiro`, `devin`, or `grok` on or off. Pi and OMP share `~/.ns-bridge/providers.json` (`NS_BRIDGE_PROVIDERS` overrides the path); the extension reads it at launch. With no file, all three are on. OMP only takes `kiro` from it: `providers enable omp devin|grok` is refused with the reason, `providers disable omp devin|grok` changes nothing, `providers status omp` shows them as `not provided`, and `devin` or `grok` in the file or in an env list are ignored by the OMP plugin (they still apply to Pi). `NS_OMP_PROVIDERS` replaces the file, `NS_OMP_PROVIDER_ENABLE` adds, and `NS_OMP_PROVIDER_DISABLE` removes. DSH writes `disabled: true` on that plugin's id in the profile's `cordis.patch.yml`. In OMP, `kiro` stays with `ns-omp-provider-kiro` while that plugin is installed, whatever the file or an env list says. Only the key you change is written; defaults never land in the file.
44
44
 
45
45
  `usage` reads the ledger the plugins write while they work in Pi, OMP, and DSH. Each model response appends one JSON line to `~/.ns-bridge/usage/<day>/<vendor>/<session>.jsonl` (`NS_BRIDGE_USAGE_DIR` moves the root). A response with no session id goes to `_no-session.jsonl`. Plugins record unless `NS_BRIDGE_USAGE=0`. The command makes no network call and writes nothing.
46
46
 
@@ -1,4 +1,4 @@
1
- // @ngosangns/ns-bridge 0.1.18 — catalog refresh bundle.
1
+ // @ngosangns/ns-bridge 0.1.20 — catalog refresh bundle.
2
2
  import { createRequire as __nsBridgeCreateRequire } from 'node:module';
3
3
  const require = __nsBridgeCreateRequire(import.meta.url);
4
4
  var __create = Object.create;
@@ -7736,10 +7736,10 @@ async function setupSkills(ctx) {
7736
7736
  for (const skill of session.agent.skills) {
7737
7737
  try {
7738
7738
  const version = await client.beta.skills.versions.retrieve(skill.version, { skill_id: skill.skill_id });
7739
- let dirname7 = path.basename(version.name.trim());
7740
- if (dirname7 === "" || dirname7 === "." || dirname7 === "..")
7741
- dirname7 = skill.skill_id;
7742
- const dest = path.resolve(skillsRoot, dirname7);
7739
+ let dirname6 = path.basename(version.name.trim());
7740
+ if (dirname6 === "" || dirname6 === "." || dirname6 === "..")
7741
+ dirname6 = skill.skill_id;
7742
+ const dest = path.resolve(skillsRoot, dirname6);
7743
7743
  if (dest !== skillsRoot && !dest.startsWith(skillsRoot + path.sep)) {
7744
7744
  log.warn("skill name escapes the skills dir; skipping", {
7745
7745
  component: "agent-tool-context",
@@ -92325,13 +92325,13 @@ var init_typesafe_system_one = __esm({
92325
92325
  // ../kiro-core/dist/debug.js
92326
92326
  import { appendFileSync, mkdirSync as mkdirSync4 } from "node:fs";
92327
92327
  import { homedir as homedir6 } from "node:os";
92328
- import { dirname as dirname5, join as join7 } from "node:path";
92328
+ import { dirname as dirname4, join as join7 } from "node:path";
92329
92329
  function debugLog(section, data) {
92330
92330
  if (!ENABLED)
92331
92331
  return;
92332
92332
  try {
92333
92333
  if (!dirReady) {
92334
- mkdirSync4(dirname5(LOG_FILE), { recursive: true });
92334
+ mkdirSync4(dirname4(LOG_FILE), { recursive: true });
92335
92335
  dirReady = true;
92336
92336
  }
92337
92337
  const ts = (/* @__PURE__ */ new Date()).toISOString();
@@ -93126,7 +93126,7 @@ var init_oauth = __esm({
93126
93126
  import { randomUUID as randomUUID3 } from "node:crypto";
93127
93127
  import { mkdirSync as mkdirSync5, readFileSync as readFileSync7, renameSync as renameSync3, rmSync as rmSync2, writeFileSync as writeFileSync4 } from "node:fs";
93128
93128
  import { homedir as homedir9 } from "node:os";
93129
- import { dirname as dirname6, join as join10 } from "node:path";
93129
+ import { dirname as dirname5, join as join10 } from "node:path";
93130
93130
  function readKiroProfileSelection() {
93131
93131
  let value;
93132
93132
  try {
@@ -93146,7 +93146,7 @@ function writeKiroProfileSelection(selection) {
93146
93146
  rmSync2(KIRO_PROFILE_SELECTION_PATH, { force: true });
93147
93147
  return;
93148
93148
  }
93149
- mkdirSync5(dirname6(KIRO_PROFILE_SELECTION_PATH), { recursive: true });
93149
+ mkdirSync5(dirname5(KIRO_PROFILE_SELECTION_PATH), { recursive: true });
93150
93150
  const temporaryPath = `${KIRO_PROFILE_SELECTION_PATH}.${process.pid}.${randomUUID3()}.tmp`;
93151
93151
  try {
93152
93152
  writeFileSync4(temporaryPath, `${JSON.stringify(selection, null, 2)}
@@ -96585,23 +96585,142 @@ function grokBootstrapModels() {
96585
96585
  }));
96586
96586
  }
96587
96587
 
96588
- // ../pi-provider/src/shared/types.ts
96589
- function ensureCacheCost(cost) {
96588
+ // ../grok-core/dist/cli/binary.js
96589
+ import { execFile } from "node:child_process";
96590
+ import { accessSync, constants } from "node:fs";
96591
+ import { homedir as homedir3 } from "node:os";
96592
+ import { join as join3 } from "node:path";
96593
+ var CANDIDATE_NAMES = ["agent", "grok"];
96594
+ var BINARY_ENV_NAMES = ["GROK_AGENT_BIN", "GROK_BIN"];
96595
+ function isExecutable(path6) {
96596
+ try {
96597
+ accessSync(path6, constants.X_OK);
96598
+ return true;
96599
+ } catch {
96600
+ return false;
96601
+ }
96602
+ }
96603
+ function run(command, args, timeout) {
96604
+ return new Promise((resolve2) => {
96605
+ execFile(command, args, { encoding: "utf8", timeout }, (error, stdout) => {
96606
+ resolve2(error ? void 0 : stdout);
96607
+ });
96608
+ });
96609
+ }
96610
+ async function which(name) {
96611
+ const out = await run(process.platform === "win32" ? "where" : "which", [name], 5e3);
96612
+ if (out === void 0)
96613
+ return void 0;
96614
+ const first = out.trim().split(/\r?\n/).map((line) => line.trim()).find(Boolean);
96615
+ return first && isExecutable(first) ? first : void 0;
96616
+ }
96617
+ async function resolveGrokBinary(env3 = process.env) {
96618
+ const explicit = BINARY_ENV_NAMES.map((name) => env3[name]?.trim()).find(Boolean);
96619
+ if (explicit) {
96620
+ if (!isExecutable(explicit)) {
96621
+ throw new Error(`Configured Grok binary is not executable: ${explicit}. Check ${BINARY_ENV_NAMES.join(" / ")}.`);
96622
+ }
96623
+ return explicit;
96624
+ }
96625
+ for (const name of CANDIDATE_NAMES) {
96626
+ const found = await which(name);
96627
+ if (found)
96628
+ return found;
96629
+ }
96630
+ const homeBin = join3(homedir3(), ".grok", "bin");
96631
+ for (const name of CANDIDATE_NAMES) {
96632
+ const candidate = join3(homeBin, name);
96633
+ if (isExecutable(candidate))
96634
+ return candidate;
96635
+ }
96636
+ throw new Error("Grok CLI not found. Install/authenticate the xAI Grok CLI (`agent` or `grok` on PATH, or ~/.grok/bin). Then run: agent --version");
96637
+ }
96638
+
96639
+ // ../grok-core/dist/cli/models.js
96640
+ import { execFile as execFile2 } from "node:child_process";
96641
+ function grokContextWindowsFromCache(raw) {
96642
+ const windows = /* @__PURE__ */ new Map();
96643
+ if (!raw?.trim())
96644
+ return windows;
96645
+ try {
96646
+ const parsed = JSON.parse(raw);
96647
+ const models = parsed?.models;
96648
+ if (!models || typeof models !== "object")
96649
+ return windows;
96650
+ for (const [id, entry] of Object.entries(models)) {
96651
+ const info = entry?.info;
96652
+ const window2 = info?.context_window;
96653
+ if (typeof window2 === "number" && Number.isInteger(window2) && window2 > 0)
96654
+ windows.set(id, window2);
96655
+ }
96656
+ } catch {
96657
+ }
96658
+ return windows;
96659
+ }
96660
+ function parseGrokModelsOutput(stdout, contextWindows) {
96661
+ const models = [];
96662
+ const seen = /* @__PURE__ */ new Set();
96663
+ const bullet = /^\s*[*•-]\s+(\S+)/;
96664
+ const defaultLine = /default model:\s*(\S+)/i;
96665
+ for (const line of stdout.split(/\r?\n/)) {
96666
+ const m2 = line.match(bullet);
96667
+ if (m2) {
96668
+ const id = m2[1].replace(/[(),]+$/g, "");
96669
+ if (!seen.has(id)) {
96670
+ seen.add(id);
96671
+ models.push(describe(id, contextWindows));
96672
+ }
96673
+ continue;
96674
+ }
96675
+ const d = line.match(defaultLine);
96676
+ if (d && !seen.has(d[1])) {
96677
+ seen.add(d[1]);
96678
+ models.unshift(describe(d[1], contextWindows));
96679
+ }
96680
+ }
96681
+ return models;
96682
+ }
96683
+ function describe(id, contextWindows) {
96590
96684
  return {
96591
- input: cost?.input ?? 0,
96592
- output: cost?.output ?? 0,
96593
- cacheRead: cost?.cacheRead ?? 0,
96594
- cacheWrite: cost?.cacheWrite ?? 0
96685
+ id,
96686
+ name: id,
96687
+ contextWindow: contextWindows?.get(id) ?? GROK_DEFAULT_CONTEXT_WINDOW,
96688
+ maxTokens: GROK_DEFAULT_MAX_TOKENS,
96689
+ supportsReasoningEffort: true
96595
96690
  };
96596
96691
  }
96692
+ async function discoverGrokModels(binary, contextWindows) {
96693
+ try {
96694
+ const bin = binary ?? await resolveGrokBinary();
96695
+ const stdout = await new Promise((resolve2, reject) => {
96696
+ execFile2(bin, ["models"], { encoding: "utf8", timeout: 2e4 }, (error, out) => {
96697
+ if (error)
96698
+ reject(error);
96699
+ else
96700
+ resolve2(out);
96701
+ });
96702
+ });
96703
+ const parsed = parseGrokModelsOutput(stdout, contextWindows);
96704
+ if (parsed.length === 0) {
96705
+ return { models: [], source: "fallback", error: "empty model list from CLI" };
96706
+ }
96707
+ return { models: parsed, source: "live" };
96708
+ } catch (err) {
96709
+ return {
96710
+ models: [],
96711
+ source: "fallback",
96712
+ error: err instanceof Error ? err.message : String(err)
96713
+ };
96714
+ }
96715
+ }
96597
96716
 
96598
96717
  // ../pi-provider/src/shared/catalog-cache.ts
96599
- import { mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync3, existsSync as existsSync2 } from "node:fs";
96600
- import { join as join3 } from "node:path";
96601
- import { homedir as homedir3 } from "node:os";
96718
+ import { existsSync as existsSync2, mkdirSync as mkdirSync3, readFileSync as readFileSync4, renameSync as renameSync2, writeFileSync as writeFileSync3 } from "node:fs";
96719
+ import { homedir as homedir4 } from "node:os";
96720
+ import { join as join4 } from "node:path";
96602
96721
  var DEFAULT_TTL_MS = 15 * 60 * 1e3;
96603
96722
  function defaultCacheDir() {
96604
- return join3(homedir3(), ".pi", "agent", "cache", "ns-pi-provider");
96723
+ return join4(homedir4(), ".pi", "agent", "cache", "ns-pi-provider");
96605
96724
  }
96606
96725
  var CatalogCache = class {
96607
96726
  cacheDir;
@@ -96625,7 +96744,7 @@ var CatalogCache = class {
96625
96744
  };
96626
96745
  }
96627
96746
  pathFor(providerId) {
96628
- return join3(this.cacheDir, `${providerId}.models.json`);
96747
+ return join4(this.cacheDir, `${providerId}.models.json`);
96629
96748
  }
96630
96749
  lookup(providerId, expectedVersion) {
96631
96750
  const mem = this.memory.get(providerId);
@@ -96736,134 +96855,15 @@ function getDefaultCatalogCache(options) {
96736
96855
  return defaultCache;
96737
96856
  }
96738
96857
 
96739
- // ../grok-core/dist/cli/binary.js
96740
- import { execFile } from "node:child_process";
96741
- import { accessSync, constants } from "node:fs";
96742
- import { homedir as homedir4 } from "node:os";
96743
- import { join as join4 } from "node:path";
96744
- var CANDIDATE_NAMES = ["agent", "grok"];
96745
- var BINARY_ENV_NAMES = ["GROK_AGENT_BIN", "GROK_BIN"];
96746
- function isExecutable(path6) {
96747
- try {
96748
- accessSync(path6, constants.X_OK);
96749
- return true;
96750
- } catch {
96751
- return false;
96752
- }
96753
- }
96754
- function run(command, args, timeout) {
96755
- return new Promise((resolve2) => {
96756
- execFile(command, args, { encoding: "utf8", timeout }, (error, stdout) => {
96757
- resolve2(error ? void 0 : stdout);
96758
- });
96759
- });
96760
- }
96761
- async function which(name) {
96762
- const out = await run(process.platform === "win32" ? "where" : "which", [name], 5e3);
96763
- if (out === void 0)
96764
- return void 0;
96765
- const first = out.trim().split(/\r?\n/).map((line) => line.trim()).find(Boolean);
96766
- return first && isExecutable(first) ? first : void 0;
96767
- }
96768
- async function resolveGrokBinary(env3 = process.env) {
96769
- const explicit = BINARY_ENV_NAMES.map((name) => env3[name]?.trim()).find(Boolean);
96770
- if (explicit) {
96771
- if (!isExecutable(explicit)) {
96772
- throw new Error(`Configured Grok binary is not executable: ${explicit}. Check ${BINARY_ENV_NAMES.join(" / ")}.`);
96773
- }
96774
- return explicit;
96775
- }
96776
- for (const name of CANDIDATE_NAMES) {
96777
- const found = await which(name);
96778
- if (found)
96779
- return found;
96780
- }
96781
- const homeBin = join4(homedir4(), ".grok", "bin");
96782
- for (const name of CANDIDATE_NAMES) {
96783
- const candidate = join4(homeBin, name);
96784
- if (isExecutable(candidate))
96785
- return candidate;
96786
- }
96787
- throw new Error("Grok CLI not found. Install/authenticate the xAI Grok CLI (`agent` or `grok` on PATH, or ~/.grok/bin). Then run: agent --version");
96788
- }
96789
-
96790
- // ../grok-core/dist/cli/models.js
96791
- import { execFile as execFile2 } from "node:child_process";
96792
- function grokContextWindowsFromCache(raw) {
96793
- const windows = /* @__PURE__ */ new Map();
96794
- if (!raw?.trim())
96795
- return windows;
96796
- try {
96797
- const parsed = JSON.parse(raw);
96798
- const models = parsed?.models;
96799
- if (!models || typeof models !== "object")
96800
- return windows;
96801
- for (const [id, entry] of Object.entries(models)) {
96802
- const info = entry?.info;
96803
- const window2 = info?.context_window;
96804
- if (typeof window2 === "number" && Number.isInteger(window2) && window2 > 0)
96805
- windows.set(id, window2);
96806
- }
96807
- } catch {
96808
- }
96809
- return windows;
96810
- }
96811
- function parseGrokModelsOutput(stdout, contextWindows) {
96812
- const models = [];
96813
- const seen = /* @__PURE__ */ new Set();
96814
- const bullet = /^\s*[*•-]\s+(\S+)/;
96815
- const defaultLine = /default model:\s*(\S+)/i;
96816
- for (const line of stdout.split(/\r?\n/)) {
96817
- const m2 = line.match(bullet);
96818
- if (m2) {
96819
- const id = m2[1].replace(/[(),]+$/g, "");
96820
- if (!seen.has(id)) {
96821
- seen.add(id);
96822
- models.push(describe(id, contextWindows));
96823
- }
96824
- continue;
96825
- }
96826
- const d = line.match(defaultLine);
96827
- if (d && !seen.has(d[1])) {
96828
- seen.add(d[1]);
96829
- models.unshift(describe(d[1], contextWindows));
96830
- }
96831
- }
96832
- return models;
96833
- }
96834
- function describe(id, contextWindows) {
96858
+ // ../pi-provider/src/shared/types.ts
96859
+ function ensureCacheCost(cost) {
96835
96860
  return {
96836
- id,
96837
- name: id,
96838
- contextWindow: contextWindows?.get(id) ?? GROK_DEFAULT_CONTEXT_WINDOW,
96839
- maxTokens: GROK_DEFAULT_MAX_TOKENS,
96840
- supportsReasoningEffort: true
96861
+ input: cost?.input ?? 0,
96862
+ output: cost?.output ?? 0,
96863
+ cacheRead: cost?.cacheRead ?? 0,
96864
+ cacheWrite: cost?.cacheWrite ?? 0
96841
96865
  };
96842
96866
  }
96843
- async function discoverGrokModels(binary, contextWindows) {
96844
- try {
96845
- const bin = binary ?? await resolveGrokBinary();
96846
- const stdout = await new Promise((resolve2, reject) => {
96847
- execFile2(bin, ["models"], { encoding: "utf8", timeout: 2e4 }, (error, out) => {
96848
- if (error)
96849
- reject(error);
96850
- else
96851
- resolve2(out);
96852
- });
96853
- });
96854
- const parsed = parseGrokModelsOutput(stdout, contextWindows);
96855
- if (parsed.length === 0) {
96856
- return { models: [], source: "fallback", error: "empty model list from CLI" };
96857
- }
96858
- return { models: parsed, source: "live" };
96859
- } catch (err) {
96860
- return {
96861
- models: [],
96862
- source: "fallback",
96863
- error: err instanceof Error ? err.message : String(err)
96864
- };
96865
- }
96866
- }
96867
96867
 
96868
96868
  // ../pi-provider/src/grok/config.ts
96869
96869
  var THINKING_LEVEL_MAP = {
@@ -98920,6 +98920,19 @@ function getKiroEffortConfig(schema, kiroModelId) {
98920
98920
 
98921
98921
  // ../kiro-core/dist/models.js
98922
98922
  init_endpoints();
98923
+
98924
+ // ../kiro-core/dist/long-context.js
98925
+ var KIRO_LONG_CONTEXT_THRESHOLDS = {
98926
+ "gpt-5-6-luna": 272e3,
98927
+ "gpt-5-6-sol": 272e3,
98928
+ "gpt-5-6-terra": 272e3
98929
+ };
98930
+ function kiroStandardContextWindow(model) {
98931
+ const threshold = Object.hasOwn(KIRO_LONG_CONTEXT_THRESHOLDS, model.id) ? KIRO_LONG_CONTEXT_THRESHOLDS[model.id] : void 0;
98932
+ return threshold !== void 0 && threshold < model.contextWindow ? threshold : model.contextWindow;
98933
+ }
98934
+
98935
+ // ../kiro-core/dist/models.js
98923
98936
  init_profile();
98924
98937
  init_endpoints();
98925
98938
  var KIRO_MANAGEMENT_CACHE_VERSION = 1;
@@ -99143,7 +99156,7 @@ var kiroModels = bootstrapKiroModels.map((model) => ({
99143
99156
  // The seed is what a machine that never refreshed serves, so it carries the
99144
99157
  // same budget a refresh would write. `compactionBudget` never returns
99145
99158
  // undefined for these windows.
99146
- compaction: compactionBudget(model) ?? { reserveTokens: model.maxTokens, thresholdTokens: model.contextWindow }
99159
+ compaction: kiroCompactionBudget(model) ?? { reserveTokens: model.maxTokens, thresholdTokens: model.contextWindow }
99147
99160
  }));
99148
99161
  var BOOTSTRAP_KIRO_MODEL_IDS = kiroModels.map((model) => model.kiroModelId);
99149
99162
  var KIRO_MODEL_IDS = new Set(BOOTSTRAP_KIRO_MODEL_IDS);
@@ -99264,8 +99277,11 @@ function hasReasoningFamilyFallback(modelId) {
99264
99277
  function hasVerifiedImageInput(kiroModelId) {
99265
99278
  return kiroModelId.startsWith("claude-") || VERIFIED_IMAGE_MODEL_IDS.has(kiroModelId.toLowerCase());
99266
99279
  }
99280
+ function kiroCompactionBudget(model) {
99281
+ return compactionBudget({ contextWindow: kiroStandardContextWindow(model), maxTokens: model.maxTokens });
99282
+ }
99267
99283
  function withCompaction3(model) {
99268
- const budget = compactionBudget(model);
99284
+ const budget = kiroCompactionBudget(model);
99269
99285
  if (!budget)
99270
99286
  return model;
99271
99287
  const current = model.compaction;
@@ -28,5 +28,10 @@ export declare function readSelectionFile(path: string): Partial<ProviderSelecti
28
28
  * Disable removes, and wins over both.
29
29
  */
30
30
  export declare function resolveSelection(file: Partial<ProviderSelection>, env?: SelectionEnv): ProviderSelection;
31
- /** Write one provider. Other keys already in the file stay. */
31
+ /**
32
+ * Write one provider. Other keys already in the file stay, and defaults are not
33
+ * written: a key in the file is a choice someone made, and readers act on that
34
+ * (ns-omp-provider used to register `kiro` next to ns-omp-provider-kiro because
35
+ * a disable of devin had written `kiro: true`). Returns the resolved selection.
36
+ */
32
37
  export declare function writeProvider(path: string, provider: ProviderName, enabled: boolean): ProviderSelection;
package/dist/selection.js CHANGED
@@ -62,15 +62,20 @@ export function resolveSelection(file, env = {}) {
62
62
  }
63
63
  return selection;
64
64
  }
65
- /** Write one provider. Other keys already in the file stay. */
65
+ /**
66
+ * Write one provider. Other keys already in the file stay, and defaults are not
67
+ * written: a key in the file is a choice someone made, and readers act on that
68
+ * (ns-omp-provider used to register `kiro` next to ns-omp-provider-kiro because
69
+ * a disable of devin had written `kiro: true`). Returns the resolved selection.
70
+ */
66
71
  export function writeProvider(path, provider, enabled) {
67
- const next = { ...DEFAULT_SELECTION, ...readSelectionFile(path), [provider]: enabled };
72
+ const next = { ...readSelectionFile(path), [provider]: enabled };
68
73
  const dir = dirname(path);
69
74
  mkdirSync(dir, { recursive: true });
70
75
  const tmp = join(dir, `.providers.${process.pid}.tmp`);
71
76
  writeFileSync(tmp, `${JSON.stringify(next, null, 2)}\n`, "utf8");
72
77
  renameSync(tmp, path);
73
- return next;
78
+ return { ...DEFAULT_SELECTION, ...next };
74
79
  }
75
80
  /** `undefined` means the env var was absent, so the file decides. */
76
81
  function parseList(value) {
@@ -1 +1 @@
1
- {"version":3,"file":"selection.js","sourceRoot":"","sources":["../src/selection.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE1C,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,MAAM,CAAU,CAAC;AAI5D,MAAM,CAAC,MAAM,iBAAiB,GAAsB,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;AAW5F,MAAM,UAAU,aAAa,CAAC,MAAyB,OAAO,CAAC,GAAG,EAAE,IAAI,GAAG,OAAO,EAAE;IAClF,OAAO,GAAG,CAAC,mBAAmB,IAAI,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,gBAAgB,CAAC,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,KAAyB;IACrD,MAAM,IAAI,GAAG,KAAK,EAAE,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;IACzC,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM;QAAE,OAAO,IAAI,CAAC;IACxE,OAAO,EAAE,KAAK,EAAE,oBAAoB,KAAK,IAAI,EAAE,kCAAkC,EAAE,CAAC;AACtF,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,iBAAiB,CAAC,IAAY;IA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,qEAAqE;AACrE,SAAS,SAAS,CAAC,KAAyB;IAC1C,IAAI,KAAK,KAAK,SAAS,IAAI,KAAK,CAAC,IAAI,EAAE,KAAK,EAAE;QAAE,OAAO,SAAS,CAAC;IACjE,MAAM,KAAK,GAAwC,EAAE,CAAC;IACtD,KAAK,MAAM,IAAI,IAAI,KAAK,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,EAAE,CAAC,WAAW,EAAE,CAAC;QACvC,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,OAAO,IAAI,IAAI,KAAK,MAAM;YAAE,KAAK,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACjF,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ngosangns/ns-bridge",
3
- "version": "0.1.18",
3
+ "version": "0.1.20",
4
4
  "description": "Install, update, and refresh ns-bridge providers outside Pi, OMP, and DSH.",
5
5
  "type": "module",
6
6
  "license": "MIT",