@wrongstack/cli 1.0.35 → 1.0.37

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.
Files changed (168) hide show
  1. package/dist/{acp-T77EAEDB.js → acp-HCGUTFNE.js} +11 -8
  2. package/dist/ascii-mode-B6PKLRHM.js +8 -0
  3. package/dist/{audit-KCBTHUQI.js → audit-NH7NUKBV.js} +3 -2
  4. package/dist/{auth-M6LXZTDA.js → auth-ANOVZVHE.js} +12 -11
  5. package/dist/auto-discover-providers-V75ICIBG.js +8 -0
  6. package/dist/{automation-MCDFCIMV.js → automation-O7ZRZSFS.js} +20 -4
  7. package/dist/{bench-MMZHFHDL.js → bench-NDYES33Y.js} +3 -2
  8. package/dist/boot/governance-evidence-candidate.d.ts +1 -1
  9. package/dist/boot/system-prompt-menu.d.ts +7 -0
  10. package/dist/boot/tui-settings-adapter.d.ts +0 -12
  11. package/dist/{boot-auto-thin-YMAZI3QL.js → boot-auto-thin-7D4OVEWA.js} +5 -4
  12. package/dist/boot-provider-selection.d.ts +9 -0
  13. package/dist/{chronicle-PBJS7BN6.js → chronicle-WBK3TJRB.js} +2 -1
  14. package/dist/{chunk-R4QGL6GB.js → chunk-2MV474XR.js} +1 -1
  15. package/dist/{chunk-AFOH6CHO.js → chunk-3EXRPTAU.js} +1 -1
  16. package/dist/{chunk-2EZ2DHOW.js → chunk-3R3OADC5.js} +2 -2
  17. package/dist/{chunk-RKU66D2O.js → chunk-57PSSEBR.js} +1 -1
  18. package/dist/{chunk-2CMMWRQH.js → chunk-5TRZZHMN.js} +2 -2
  19. package/dist/{chunk-RWNI5OWT.js → chunk-6KJU6POA.js} +6 -6
  20. package/dist/{chunk-AKESWZH5.js → chunk-6VPWQ4TG.js} +2 -2
  21. package/dist/{chunk-CJSHS2K7.js → chunk-75OLD563.js} +1 -1
  22. package/dist/{chunk-4UWCMBPG.js → chunk-76JE54WD.js} +7 -5
  23. package/dist/{chunk-7BNBD4PE.js → chunk-7IY2UTBE.js} +2 -2
  24. package/dist/{chunk-6Z6C6ZHH.js → chunk-AWRZWPJ3.js} +20 -26
  25. package/dist/{chunk-TXAFIERF.js → chunk-BAWRRA6O.js} +2 -2
  26. package/dist/{chunk-DAKVBMD4.js → chunk-BCKVNORU.js} +1 -1
  27. package/dist/{chunk-4BX2YDTQ.js → chunk-BIGSVBPI.js} +45 -4
  28. package/dist/{chunk-CZTXF6HY.js → chunk-BJ4LDJ4H.js} +1 -1
  29. package/dist/{chunk-KMU7GF7X.js → chunk-C2BBH4S4.js} +2 -2
  30. package/dist/chunk-C4654QI2.js +8 -0
  31. package/dist/{chunk-M4G5FO7F.js → chunk-C5JP6DJN.js} +1 -1
  32. package/dist/{chunk-LDV4ERNV.js → chunk-CIGEY7NU.js} +5 -5
  33. package/dist/{chunk-WTJDSTYD.js → chunk-CVVQ5NCN.js} +5 -5
  34. package/dist/{chunk-D3K4NYQL.js → chunk-DXHQFV5V.js} +1 -1
  35. package/dist/{chunk-SUDNPYWD.js → chunk-FM7DPSYA.js} +2 -2
  36. package/dist/{chunk-YL4KCHZG.js → chunk-FPUB5WWP.js} +1 -1
  37. package/dist/{chunk-P3Q3KMFH.js → chunk-FUJHWQV4.js} +1 -1
  38. package/dist/{chunk-ERX4BLKP.js → chunk-GFQH77OH.js} +1 -1
  39. package/dist/{chunk-DIOODAYM.js → chunk-H53EXXAU.js} +3 -3
  40. package/dist/{chunk-F5DCFAKI.js → chunk-HKMOIIPQ.js} +1 -1
  41. package/dist/{chunk-AUQDGU5D.js → chunk-HQBY6OFT.js} +1 -1
  42. package/dist/{chunk-6SIUTX75.js → chunk-IJLIAPCW.js} +1 -2
  43. package/dist/{chunk-QD544J2B.js → chunk-JTTV2EVA.js} +1 -1
  44. package/dist/{chunk-UKP7H2U4.js → chunk-KHFFJ2LC.js} +1 -1
  45. package/dist/{chunk-4TVYGG6G.js → chunk-MKM4X2AM.js} +1 -1
  46. package/dist/chunk-ML3US333.js +61 -0
  47. package/dist/{chunk-HLSHFXTO.js → chunk-NL2ABOAS.js} +2 -2
  48. package/dist/{chunk-Q7E3BPDU.js → chunk-OGVSKS4Q.js} +1 -1
  49. package/dist/chunk-OZCYZYN2.js +3708 -0
  50. package/dist/{chunk-EWKESL4L.js → chunk-P24ZPPYH.js} +1 -1
  51. package/dist/chunk-PY2LMG2V.js +1 -0
  52. package/dist/{chunk-CSAPOCBP.js → chunk-QC6CLAK7.js} +1 -1
  53. package/dist/{chunk-HXJYHAR4.js → chunk-QVITQ425.js} +1 -1
  54. package/dist/{chunk-GZSKLXYG.js → chunk-RAWHRRUJ.js} +10 -10
  55. package/dist/{chunk-PA4VBCXS.js → chunk-RBZVDWTL.js} +1 -1
  56. package/dist/{chunk-YMXXOOFN.js → chunk-SPSHEZ46.js} +1 -1
  57. package/dist/{chunk-TWSQTQKR.js → chunk-T4TGMTH2.js} +3 -3
  58. package/dist/{chunk-LKFKO4JW.js → chunk-TZPKOS5G.js} +3 -3
  59. package/dist/{chunk-X4LW5CZM.js → chunk-UBDLNC3N.js} +1 -1
  60. package/dist/{chunk-SDJCLEK6.js → chunk-UFRVTBV6.js} +1 -1
  61. package/dist/{chunk-VCYZ3WZV.js → chunk-UOQPDZ5H.js} +1 -1
  62. package/dist/{chunk-PZQBGUVZ.js → chunk-UVF3BGET.js} +1 -1
  63. package/dist/{chunk-HHRYIDOW.js → chunk-VAQXOZKP.js} +34 -7
  64. package/dist/{chunk-4XCBEUBX.js → chunk-VHC47E7U.js} +1 -1
  65. package/dist/{chunk-LKPEBZBE.js → chunk-VI2HE4A5.js} +1 -1
  66. package/dist/chunk-W23PY4IJ.js +44 -0
  67. package/dist/{chunk-AT2A7RJZ.js → chunk-WDXNBYGD.js} +1 -1
  68. package/dist/{chunk-NRXWOMK7.js → chunk-XT3NAHRX.js} +1 -1
  69. package/dist/{chunk-ZYACRPLN.js → chunk-ZCXZGYO5.js} +6 -3
  70. package/dist/{chunk-65VNCAF6.js → chunk-ZNNFEKDZ.js} +2 -2
  71. package/dist/{chunk-CDY4D5QK.js → chunk-ZTSTMFYW.js} +2 -2
  72. package/dist/{chunk-YTEOAWOJ.js → chunk-ZXX3MJRL.js} +1 -1
  73. package/dist/{cli-context-II57EHD2.js → cli-context-V6NKFU2X.js} +166 -100
  74. package/dist/{cli-main-YR2WJCPL.js → cli-main-LHQTVOYW.js} +963 -246
  75. package/dist/{config-transfer-VOIFY7U4.js → config-transfer-Y7XJMJRN.js} +8 -5
  76. package/dist/{diag-doctor-BIZAFIAT.js → diag-doctor-5SVYK2DR.js} +5 -4
  77. package/dist/execute-deps.d.ts +8 -0
  78. package/dist/{execution-IBAZ2EIU.js → execution-BAP566QC.js} +103 -33
  79. package/dist/{export-VVRIOWFV.js → export-W27PTU6Y.js} +3 -2
  80. package/dist/fleet/host-director-setup.d.ts +2 -0
  81. package/dist/fleet/host-skill-companion.d.ts +73 -0
  82. package/dist/fleet/host.d.ts +1 -0
  83. package/dist/fleet/skill-companion-policy.d.ts +33 -0
  84. package/dist/{governance-RYSHV675.js → governance-A32M4ILK.js} +2 -1
  85. package/dist/{hq-5OIEKB4V.js → hq-JD5AZVMG.js} +8 -7
  86. package/dist/hq-server/snapshot.d.ts +1 -1
  87. package/dist/hq-server/socket-credentials.d.ts +1 -1
  88. package/dist/hq-server/ws.d.ts +1 -1
  89. package/dist/{hq-server-DU3ZH3X7.js → hq-server-BI23EPM7.js} +7 -5
  90. package/dist/{hq-service-LYZV7EK7.js → hq-service-TQNPIRHL.js} +8 -7
  91. package/dist/hq-ttl-RKRF7AQX.js +8 -0
  92. package/dist/{hq-tunnel-NIJ5EP2Y.js → hq-tunnel-6VU4IWV4.js} +2 -1
  93. package/dist/{import-claude-code-AYG24RG2.js → import-claude-code-D4F6ZE7I.js} +6 -5
  94. package/dist/index.js +9 -8
  95. package/dist/{init-DRMMFG2G.js → init-5PLABNLR.js} +2 -1
  96. package/dist/ip-allowlist-YDOFO7XJ.js +10 -0
  97. package/dist/{kanban-run-mirror-22HQ5FNG.js → kanban-run-mirror-SZ3S3S3Z.js} +3 -2
  98. package/dist/kanban-supervisor-55XPUHAM.js +8 -0
  99. package/dist/live-settings-input.d.ts +8 -0
  100. package/dist/{mailbox-serve-S536N66F.js → mailbox-serve-MMQCHOHI.js} +5 -3
  101. package/dist/{mcp-LBS45HWZ.js → mcp-2XWBJEQN.js} +4 -3
  102. package/dist/{modeldiag-NEPTLFZW.js → modeldiag-ERXYJODJ.js} +8 -7
  103. package/dist/{per-subcommand-help-VKPV3OEY.js → per-subcommand-help-D6J4ZXW2.js} +4 -3
  104. package/dist/{permissions-PL27UHYD.js → permissions-6YJ64W65.js} +3 -2
  105. package/dist/plugin-config.d.ts +6 -0
  106. package/dist/{plugin-usage-3TZGROK7.js → plugin-usage-TYF5HY4K.js} +6 -5
  107. package/dist/{plugins-ITH4SLO6.js → plugins-XGAXDLPT.js} +6 -5
  108. package/dist/pre-launch/launch-prompts.d.ts +21 -2
  109. package/dist/pre-launch.d.ts +1 -1
  110. package/dist/{project-AOQI5XTK.js → project-V5KNTLV4.js} +2 -1
  111. package/dist/{project-manifest-FTFDCCTZ.js → project-manifest-HXCID644.js} +3 -2
  112. package/dist/{project-picker-NZYJKQQC.js → project-picker-FUSLXKSA.js} +4 -3
  113. package/dist/{projects-T4CZCA25.js → projects-FWRJHW3S.js} +2 -1
  114. package/dist/{providers-models-37DUV2GW.js → providers-models-CDI5GVBX.js} +7 -6
  115. package/dist/{proxy-wiring-K2DORFFL.js → proxy-wiring-FIW6HFJV.js} +4 -3
  116. package/dist/{quick-CNB4Z3HS.js → quick-NPC3N3ZX.js} +2 -1
  117. package/dist/{remote-C74BCNND.js → remote-AKKRJEHK.js} +5 -4
  118. package/dist/{replay-DEI566CW.js → replay-5FOPERB2.js} +2 -1
  119. package/dist/{replay-JJ2NOWD6.js → replay-URJFMQCU.js} +3 -2
  120. package/dist/{rewind-7AULJS7F.js → rewind-GAUXWSTU.js} +3 -2
  121. package/dist/{sage-FFKUOCQL.js → sage-6KKXK2ZS.js} +11 -6
  122. package/dist/{sage-sync-ZMTHB477.js → sage-sync-IN3WKEBN.js} +5 -3
  123. package/dist/{sandbox-TYGD6FI2.js → sandbox-EZQ76MNY.js} +2 -1
  124. package/dist/{sdd-runtime-PF72WHLO.js → sdd-runtime-6MFUXWJK.js} +4 -3
  125. package/dist/{session-move-P2EC2COA.js → session-move-F3N45UQQ.js} +2 -1
  126. package/dist/{sessions-config-VE26SB56.js → sessions-config-SJVQXCIE.js} +7 -6
  127. package/dist/{sessions-doctor-QUL37U32.js → sessions-doctor-DZQTDQRY.js} +2 -1
  128. package/dist/short-circuit-flags-647S5WBL.js +11 -0
  129. package/dist/{simpleui-dist-7BQISSEP.js → simpleui-dist-EE3TJRBG.js} +2 -1
  130. package/dist/{skill-suggest-THANK3LV.js → skill-suggest-LZV2TIPQ.js} +22 -6
  131. package/dist/slash-commands/browser.d.ts +3 -0
  132. package/dist/slash-commands/command-context.d.ts +3 -0
  133. package/dist/slash-commands/doctor.d.ts +0 -9
  134. package/dist/{standalone-auto-update-VQC4GYCM.js → standalone-auto-update-X5SK4M5B.js} +17 -5
  135. package/dist/{standalone-update-HZHDZZOR.js → standalone-update-6U4NP5MN.js} +4 -3
  136. package/dist/subcommands-EGZPBQOO.js +10 -0
  137. package/dist/{tools-skills-33AI6K6S.js → tools-skills-55QVTMSK.js} +2 -1
  138. package/dist/{typesafe-NHC322W5.js → typesafe-YBEADNAH.js} +8 -7
  139. package/dist/{typesafe-brain-replay-C5276FVR.js → typesafe-brain-replay-XBU5RZDY.js} +2 -1
  140. package/dist/{typesafe-judgment-check-GGYYV5UF.js → typesafe-judgment-check-XRLBF5JV.js} +2 -1
  141. package/dist/{typesafe-topic-replay-DB2AYL7V.js → typesafe-topic-replay-L6NKFYPM.js} +4 -3
  142. package/dist/{typesafe-triage-replay-27NDAZ3V.js → typesafe-triage-replay-IRV2HHLN.js} +3 -2
  143. package/dist/{update-6OEPAEUV.js → update-54W7GUS5.js} +6 -5
  144. package/dist/{update-check-VLVT4IV2.js → update-check-JBGP4ZFI.js} +4 -3
  145. package/dist/utils/win32-cmd.d.ts +1 -1
  146. package/dist/{version-JB2UAV2A.js → version-Q6KJ23GB.js} +3 -2
  147. package/dist/version-help-RBZC5GZZ.js +11 -0
  148. package/dist/webui-server/credential-watcher.d.ts +3 -1
  149. package/dist/webui-server/provider-config.d.ts +12 -5
  150. package/dist/{webui-server-6IC3SLZG.js → webui-server-HIUY3RHD.js} +59 -49
  151. package/dist/wiring/management-tools.d.ts +9 -1
  152. package/dist/wiring/slash-commands.d.ts +3 -0
  153. package/dist/{wrongtrace-gate-counters-7C2EAAZL.js → wrongtrace-gate-counters-K44XG3H3.js} +3 -2
  154. package/dist/{wrongtrace-telemetry-3ASFKOZO.js → wrongtrace-telemetry-YS6SUBXK.js} +3 -2
  155. package/dist/ws-runtime.d.ts +6 -0
  156. package/package.json +39 -39
  157. package/LICENSE +0 -21
  158. package/dist/ascii-mode-SG4PRNLP.js +0 -7
  159. package/dist/auto-discover-providers-JX346GOM.js +0 -7
  160. package/dist/chunk-BHXAKTBE.js +0 -10
  161. package/dist/chunk-LDXXMPMS.js +0 -61
  162. package/dist/chunk-TGSPCFBT.js +0 -1
  163. package/dist/hq-ttl-N4DAIAVX.js +0 -7
  164. package/dist/ip-allowlist-NHXO6AKJ.js +0 -9
  165. package/dist/kanban-supervisor-67ECABTD.js +0 -7
  166. package/dist/short-circuit-flags-EXJBJ5GT.js +0 -10
  167. package/dist/subcommands-DTKBXLPU.js +0 -9
  168. package/dist/version-help-JQGRPDJW.js +0 -10
@@ -50,11 +50,18 @@ export interface ProviderConfigStore {
50
50
  *
51
51
  * @param configProvidersRef Optional callback that returns the in-memory
52
52
  * merged `config.providers` map (from the boot config loader which merges
53
- * global + project-local configs). When provided, `load()` returns from
54
- * this ref instead of re-reading the single global config file on disk.
55
- * This prevents a mismatch where providers stored in the project-local
56
- * config (`config.local.json`) are visible to the agent but invisible
57
- * to the WebUI's saved-providers panel.
53
+ * the profile config with `config.local.json`, extra sources and flags).
54
+ * Rows another layer contributes are shown read-only next to the profile's
55
+ * own rows, so a provider the agent can see is never invisible in the
56
+ * WebUI's saved-providers panel.
57
+ *
58
+ * The ref is a BOOT snapshot: `ConfigLoader.load()` returns a frozen Config,
59
+ * so the credential watcher can never refresh it. Owned rows therefore always
60
+ * come from disk on every `load()`. Serving them from the ref made the store
61
+ * compare a stale view against fresh disk: after the first save every edit of
62
+ * that provider was refused as "comes from another config file", a provider
63
+ * added (or OAuth account signed in) after boot never appeared, and removing
64
+ * it silently left it on disk.
58
65
  */
59
66
  export declare function createProviderConfigStore(globalConfigPath: string | undefined, configProvidersRef?: () => Record<string, ProviderConfig>): ProviderConfigStore;
60
67
  //# sourceMappingURL=provider-config.d.ts.map
@@ -1,27 +1,31 @@
1
1
  import {
2
2
  createKanbanRunMirror
3
- } from "./chunk-VCYZ3WZV.js";
3
+ } from "./chunk-UOQPDZ5H.js";
4
4
  import {
5
5
  createKanbanSupervisor
6
- } from "./chunk-R4QGL6GB.js";
6
+ } from "./chunk-2MV474XR.js";
7
7
  import {
8
8
  WEBUI_SESSION_CHILD_CAPABILITIES
9
- } from "./chunk-P3Q3KMFH.js";
9
+ } from "./chunk-FUJHWQV4.js";
10
10
  import {
11
11
  loadConfigProviders,
12
12
  mutateConfigProviders
13
- } from "./chunk-ZYACRPLN.js";
13
+ } from "./chunk-ZCXZGYO5.js";
14
14
  import {
15
15
  createHqCommandDispatcher,
16
16
  createProjectKanbanAssignHandler,
17
17
  createProjectKanbanTransitionHandler
18
- } from "./chunk-NRXWOMK7.js";
18
+ } from "./chunk-XT3NAHRX.js";
19
19
  import {
20
20
  startCliHqConnection
21
- } from "./chunk-4UWCMBPG.js";
21
+ } from "./chunk-76JE54WD.js";
22
+ import {
23
+ WebSocketServer
24
+ } from "./chunk-OZCYZYN2.js";
22
25
  import {
23
26
  CLI_VERSION
24
- } from "./chunk-F5DCFAKI.js";
27
+ } from "./chunk-HKMOIIPQ.js";
28
+ import "./chunk-W23PY4IJ.js";
25
29
 
26
30
  // src/webui-server.ts
27
31
  import * as path8 from "node:path";
@@ -403,7 +407,6 @@ import {
403
407
  findInstalledPackageJson
404
408
  } from "@wrongstack/webui-server";
405
409
  import { verifyClient as verifyWsClient } from "@wrongstack/webui-server/server/ws-auth";
406
- import { WebSocketServer } from "ws";
407
410
 
408
411
  // src/webui-server/lifecycle.ts
409
412
  import {
@@ -860,11 +863,26 @@ function createProviderConfigStore(globalConfigPath, configProvidersRef) {
860
863
  if (configProvidersRef && globalConfigPath) {
861
864
  const views = /* @__PURE__ */ new WeakMap();
862
865
  const equal = (a, b) => JSON.stringify(a) === JSON.stringify(b);
866
+ let inherited;
867
+ const inheritedRows = () => {
868
+ inherited ??= loadSavedProviders(globalConfigPath).then((bootDisk) => rowsFromOtherLayers(configProvidersRef(), bootDisk)).catch((err) => {
869
+ inherited = void 0;
870
+ throw err;
871
+ });
872
+ return inherited;
873
+ };
874
+ void inheritedRows().catch(() => void 0);
875
+ const compose = (disk, layered) => {
876
+ const providers = structuredClone(disk);
877
+ for (const [id, row] of Object.entries(layered)) providers[id] = structuredClone(row);
878
+ return providers;
879
+ };
863
880
  return {
864
881
  load: async () => {
882
+ const layered = await inheritedRows();
865
883
  const disk = await loadSavedProviders(globalConfigPath);
866
- const providers = structuredClone(configProvidersRef());
867
- views.set(providers, { view: structuredClone(providers), disk });
884
+ const providers = compose(disk, layered);
885
+ views.set(providers, { view: structuredClone(providers), disk, inherited: layered });
868
886
  return providers;
869
887
  },
870
888
  save: async (providers) => {
@@ -876,7 +894,7 @@ function createProviderConfigStore(globalConfigPath, configProvidersRef) {
876
894
  snapshots.track(pending);
877
895
  for (const id of /* @__PURE__ */ new Set([...Object.keys(baseline.view), ...Object.keys(providers)])) {
878
896
  if (equal(baseline.view[id], providers[id])) continue;
879
- if (!equal(baseline.view[id], baseline.disk[id])) {
897
+ if (Object.hasOwn(baseline.inherited, id)) {
880
898
  throw new Error(
881
899
  `Provider "${id}" comes from another config file. Edit its source config or create a new auth profile alias.`
882
900
  );
@@ -885,13 +903,14 @@ function createProviderConfigStore(globalConfigPath, configProvidersRef) {
885
903
  else delete pending[id];
886
904
  }
887
905
  await saveProviders(globalConfigPath, pending);
888
- for (const id of Object.keys(providers)) {
889
- if (equal(baseline.view[id], baseline.disk[id])) delete providers[id];
890
- }
891
- for (const [id, record] of Object.entries(pending)) {
892
- if (equal(baseline.view[id], baseline.disk[id])) providers[id] = record;
893
- }
894
- views.set(providers, { view: structuredClone(providers), disk: structuredClone(pending) });
906
+ const next = compose(pending, baseline.inherited);
907
+ for (const id of Object.keys(providers)) delete providers[id];
908
+ Object.assign(providers, next);
909
+ views.set(providers, {
910
+ view: structuredClone(providers),
911
+ disk: structuredClone(pending),
912
+ inherited: baseline.inherited
913
+ });
895
914
  }
896
915
  };
897
916
  }
@@ -900,6 +919,25 @@ function createProviderConfigStore(globalConfigPath, configProvidersRef) {
900
919
  save: (providers) => saveProviders(globalConfigPath, providers)
901
920
  };
902
921
  }
922
+ function resolvedApiKey(cfg) {
923
+ if (cfg.apiKey) return cfg.apiKey;
924
+ const keys = (Array.isArray(cfg.apiKeys) ? cfg.apiKeys : []).filter(
925
+ (k) => !!k && typeof k.label === "string" && typeof k.apiKey === "string"
926
+ );
927
+ const chosen = cfg.activeKey ? keys.find((k) => k.label === cfg.activeKey) ?? keys[0] : keys[0];
928
+ return chosen?.apiKey;
929
+ }
930
+ function rowsFromOtherLayers(merged, bootDisk) {
931
+ const rows = {};
932
+ for (const [id, row] of Object.entries(merged)) {
933
+ if (!row || typeof row !== "object") continue;
934
+ const owned = bootDisk[id];
935
+ if (!owned || row.type !== owned.type || row.family !== owned.family || row.baseUrl !== owned.baseUrl || resolvedApiKey(row) !== resolvedApiKey(owned)) {
936
+ rows[id] = structuredClone(row);
937
+ }
938
+ }
939
+ return rows;
940
+ }
903
941
 
904
942
  // src/webui-server/message-router.ts
905
943
  function createCliEmbeddedMessageRouter(input) {
@@ -1057,8 +1095,6 @@ import {
1057
1095
  // src/webui-server/credential-watcher.ts
1058
1096
  import { TOKENS } from "@wrongstack/core/kernel";
1059
1097
  import { watchProviderConfig } from "@wrongstack/core/storage";
1060
- import { toErrorMessage } from "@wrongstack/core/utils/error";
1061
- import { makeProviderFromConfig } from "@wrongstack/providers";
1062
1098
  function startWebuiCredentialWatcher({
1063
1099
  opts,
1064
1100
  profileConfigPath,
@@ -1069,9 +1105,6 @@ function startWebuiCredentialWatcher({
1069
1105
  if (!watchConfigPath || process.env["WRONGSTACK_DISABLE_CONFIG_WATCH"] === "1") {
1070
1106
  return void 0;
1071
1107
  }
1072
- let lastActiveCfg = JSON.stringify(
1073
- opts.appConfig?.providers?.[opts.agent.ctx.provider.id] ?? null
1074
- );
1075
1108
  let lastUiLocale = opts.appConfig?.uiLocale;
1076
1109
  const watcher = watchProviderConfig(
1077
1110
  watchConfigPath,
@@ -1115,29 +1148,6 @@ function startWebuiCredentialWatcher({
1115
1148
  broadcast({ type: "prefs.updated", payload: { uiLocale: snapshot.uiLocale } });
1116
1149
  }
1117
1150
  }
1118
- const activeId = opts.agent.ctx.provider.id;
1119
- const newCfgStr = JSON.stringify(snapshot.providers[activeId] ?? null);
1120
- if (newCfgStr === lastActiveCfg) return;
1121
- lastActiveCfg = newCfgStr;
1122
- try {
1123
- const newCfg = snapshot.providers[activeId] ?? {
1124
- type: activeId,
1125
- ...snapshot.apiKey !== void 0 ? { apiKey: snapshot.apiKey } : {},
1126
- ...snapshot.baseUrl !== void 0 ? { baseUrl: snapshot.baseUrl } : {}
1127
- };
1128
- const oldMax = opts.agent.ctx.provider.capabilities?.maxContext;
1129
- const prov = makeProviderFromConfig(activeId, {
1130
- ...newCfg,
1131
- type: newCfg.type ?? activeId
1132
- });
1133
- if (oldMax != null && prov.capabilities) prov.capabilities.maxContext = oldMax;
1134
- opts.agent.ctx.provider = prov;
1135
- console.log(`[WebUI] Provider credentials reloaded from config.json (${activeId})`);
1136
- } catch (err) {
1137
- console.warn(
1138
- `[WebUI] Credential hot-reload failed for ${activeId}: ${toErrorMessage(err)}`
1139
- );
1140
- }
1141
1151
  },
1142
1152
  {
1143
1153
  warn: (m) => console.warn(
@@ -1747,7 +1757,7 @@ function createWebuiTransport(clients) {
1747
1757
  }
1748
1758
 
1749
1759
  // src/webui-server-lifecycle.ts
1750
- import { toErrorMessage as toErrorMessage2 } from "@wrongstack/core/utils/error";
1760
+ import { toErrorMessage } from "@wrongstack/core/utils/error";
1751
1761
 
1752
1762
  // src/webui-server/connection-handler.ts
1753
1763
  import { deriveSessionAgents } from "@wrongstack/core/storage";
@@ -1939,7 +1949,7 @@ function runWebuiServerLifecycle({
1939
1949
  webuiInstanceRegistered
1940
1950
  });
1941
1951
  } catch (err) {
1942
- consoleLogger.error("setup_events_failed", { message: toErrorMessage2(err) });
1952
+ consoleLogger.error("setup_events_failed", { message: toErrorMessage(err) });
1943
1953
  }
1944
1954
  };
1945
1955
  wss.on("listening", announceListening);
@@ -2448,4 +2458,4 @@ async function runWebUI(opts) {
2448
2458
  export {
2449
2459
  runWebUI
2450
2460
  };
2451
- //# sourceMappingURL=webui-server-6IC3SLZG.js.map
2461
+ //# sourceMappingURL=webui-server-HIUY3RHD.js.map
@@ -1,6 +1,6 @@
1
1
  import type { ToolRegistry } from '@wrongstack/core/registry';
2
2
  import { type PluginManagerHookRunner } from '@wrongstack/core/tools';
3
- import type { Config } from '@wrongstack/core/types';
3
+ import type { Config, ReasoningConfig, ReasoningEffort } from '@wrongstack/core/types';
4
4
  type ConfigStoreLike = {
5
5
  get(): Config;
6
6
  update(patch: Partial<Config>): void;
@@ -10,6 +10,7 @@ type ModelsRegistryLike = {
10
10
  getModel(providerId: string, modelId: string): Promise<{
11
11
  capabilities?: {
12
12
  maxContext?: number | undefined;
13
+ reasoningConfig?: ReasoningConfig | undefined;
13
14
  } | undefined;
14
15
  cost?: {
15
16
  input?: number | undefined;
@@ -19,9 +20,16 @@ type ModelsRegistryLike = {
19
20
  } | undefined;
20
21
  } | undefined>;
21
22
  };
23
+ type LeaderEffortChange = {
24
+ sessionId?: string | undefined;
25
+ effort?: ReasoningEffort | undefined;
26
+ reason?: string | undefined;
27
+ };
22
28
  /** Minimal event-bus shape: enough to observe context size and turn boundaries. */
23
29
  type EventsLike = {
24
30
  on(event: string, handler: (...args: unknown[]) => void): unknown;
31
+ /** Used to announce `leader.effort_changed` so the UIs can show it. */
32
+ emit?(event: 'leader.effort_changed', payload: LeaderEffortChange): unknown;
25
33
  };
26
34
  interface RegisterCliManagementToolsDeps {
27
35
  toolRegistry: ToolRegistry;
@@ -14,6 +14,9 @@ interface SlashCommandsDeps {
14
14
  toolRegistry: ToolRegistry;
15
15
  paths: WstackPaths;
16
16
  sessionStore: SessionStore;
17
+ sessionRef?: {
18
+ current?: import('@wrongstack/core/types').SessionWriter | undefined;
19
+ } | undefined;
17
20
  skillLoader: SkillLoader | undefined;
18
21
  tokenCounter: TokenCounter;
19
22
  renderer: Renderer;
@@ -7,7 +7,8 @@ import {
7
7
  recordGateDecision,
8
8
  resetGateDecisions,
9
9
  snapshotGateDecisions
10
- } from "./chunk-D3K4NYQL.js";
10
+ } from "./chunk-DXHQFV5V.js";
11
+ import "./chunk-W23PY4IJ.js";
11
12
  export {
12
13
  countersFilePath,
13
14
  createWrongTraceGateCounter,
@@ -18,4 +19,4 @@ export {
18
19
  resetGateDecisions,
19
20
  snapshotGateDecisions
20
21
  };
21
- //# sourceMappingURL=wrongtrace-gate-counters-7C2EAAZL.js.map
22
+ //# sourceMappingURL=wrongtrace-gate-counters-K44XG3H3.js.map
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  getWrongTrace
3
- } from "./chunk-ERX4BLKP.js";
3
+ } from "./chunk-GFQH77OH.js";
4
+ import "./chunk-W23PY4IJ.js";
4
5
 
5
6
  // src/wiring/wrongtrace-telemetry.ts
6
7
  function buildWrongTraceTelemetryReport(input) {
@@ -30,4 +31,4 @@ export {
30
31
  buildWrongTraceTelemetryReport,
31
32
  reportWrongTraceSessionTelemetry
32
33
  };
33
- //# sourceMappingURL=wrongtrace-telemetry-3ASFKOZO.js.map
34
+ //# sourceMappingURL=wrongtrace-telemetry-YS6SUBXK.js.map
@@ -0,0 +1,6 @@
1
+ import type { WebSocketServer as Server, WebSocket as Socket } from 'ws';
2
+ export declare const WebSocket: typeof Socket;
3
+ export type WebSocket = Socket;
4
+ export declare const WebSocketServer: typeof Server;
5
+ export type WebSocketServer = Server;
6
+ //# sourceMappingURL=ws-runtime.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrongstack/cli",
3
- "version": "1.0.35",
3
+ "version": "1.0.37",
4
4
  "license": "MIT",
5
5
  "description": "WrongStack CLI — terminal AI coding agent with provider catalog from models.dev. Provides `wrongstack` and `wstack` binaries.",
6
6
  "keywords": [
@@ -40,54 +40,54 @@
40
40
  "!dist/**/*.map",
41
41
  "data"
42
42
  ],
43
+ "scripts": {
44
+ "build": "bun ../../scripts/build-package.mjs",
45
+ "typecheck": "bun run --filter @wrongstack/tools build && bun run --filter @wrongstack/tui build && bun run --filter @wrongstack/webui-server build && bun ../../scripts/bun-typecheck.mjs --noEmit && bun ../../scripts/bun-typecheck.mjs --noEmit -p tsconfig.test.json",
46
+ "test": "bun --bun run vitest run",
47
+ "test:hqdash": "bun --bun run vitest run --config vitest.hqdash.config.ts",
48
+ "clean": "bun -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
49
+ },
43
50
  "dependencies": {
44
- "@wrongstack/acp": "1.0.35",
45
- "@wrongstack/bench": "1.0.35",
46
- "@wrongstack/core": "1.0.35",
47
- "@wrongstack/kanban": "1.0.35",
48
- "@wrongstack/mcp": "1.0.35",
49
- "@wrongstack/persistence": "1.0.35",
50
- "@wrongstack/plug-lsp": "1.0.35",
51
- "@wrongstack/plugins": "1.0.35",
52
- "@wrongstack/primitives": "1.0.35",
53
- "@wrongstack/providers": "1.0.35",
54
- "@wrongstack/requirement-intake": "1.0.35",
55
- "@wrongstack/runtime": "1.0.35",
56
- "@wrongstack/sage": "1.0.35",
57
- "@wrongstack/sage-mcp": "1.0.35",
58
- "@wrongstack/sdd": "1.0.35",
59
- "@wrongstack/security-scanner": "1.0.35",
60
- "@wrongstack/simpleui": "1.0.35",
61
- "@wrongstack/techstack": "1.0.35",
62
- "@wrongstack/telegram": "1.0.35",
63
- "@wrongstack/tools": "1.0.35",
64
- "@wrongstack/tui": "1.0.35",
65
- "@wrongstack/vector-memory": "1.0.35",
66
- "@wrongstack/webui": "1.0.35",
67
- "@wrongstack/webui-hq": "1.0.35",
68
- "@wrongstack/webui-protocol": "1.0.35",
69
- "@wrongstack/webui-server": "1.0.35",
70
- "@wrongstack/wrongtrace": "1.0.35",
71
- "ws": "^8.21.3"
51
+ "@wrongstack/acp": "1.0.37",
52
+ "@wrongstack/bench": "1.0.37",
53
+ "@wrongstack/core": "1.0.37",
54
+ "@wrongstack/kanban": "1.0.37",
55
+ "@wrongstack/mcp": "1.0.37",
56
+ "@wrongstack/persistence": "1.0.37",
57
+ "@wrongstack/plug-lsp": "1.0.37",
58
+ "@wrongstack/plugins": "1.0.37",
59
+ "@wrongstack/primitives": "1.0.37",
60
+ "@wrongstack/providers": "1.0.37",
61
+ "@wrongstack/requirement-intake": "1.0.37",
62
+ "@wrongstack/runtime": "1.0.37",
63
+ "@wrongstack/sage": "1.0.37",
64
+ "@wrongstack/sage-mcp": "1.0.37",
65
+ "@wrongstack/sdd": "1.0.37",
66
+ "@wrongstack/security-scanner": "1.0.37",
67
+ "@wrongstack/simpleui": "1.0.37",
68
+ "@wrongstack/techstack": "1.0.37",
69
+ "@wrongstack/telegram": "1.0.37",
70
+ "@wrongstack/tools": "1.0.37",
71
+ "@wrongstack/tui": "1.0.37",
72
+ "@wrongstack/vector-memory": "1.0.37",
73
+ "@wrongstack/webui": "1.0.37",
74
+ "@wrongstack/webui-hq": "1.0.37",
75
+ "@wrongstack/webui-protocol": "1.0.37",
76
+ "@wrongstack/webui-server": "1.0.37",
77
+ "@wrongstack/wrongtrace": "1.0.37",
78
+ "ws": "^8.22.0"
72
79
  },
73
80
  "optionalDependencies": {
74
- "@wrongstack/desktop": "1.0.35"
81
+ "@wrongstack/desktop": "1.0.37"
75
82
  },
76
83
  "devDependencies": {
77
84
  "@types/node": "^26.5.1",
78
85
  "@types/ws": "^8.18.1",
79
- "@wrongstack/governance": "1.0.35",
86
+ "@wrongstack/governance": "1.0.37",
80
87
  "jsdom": "^30.0.1",
81
88
  "typescript": "^7.0.2"
82
89
  },
83
90
  "publishConfig": {
84
91
  "access": "public"
85
- },
86
- "scripts": {
87
- "build": "node ../../scripts/build-package.mjs",
88
- "typecheck": "pnpm --filter @wrongstack/tools run build && pnpm --filter @wrongstack/tui run build && pnpm --filter @wrongstack/webui-server run build && tsc --noEmit && tsc --noEmit -p tsconfig.test.json",
89
- "test": "vitest run",
90
- "test:hqdash": "vitest run --config vitest.hqdash.config.ts",
91
- "clean": "node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\""
92
92
  }
93
- }
93
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 ECOSTACK TECHNOLOGY OÜ
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,7 +0,0 @@
1
- import {
2
- applyAsciiMode
3
- } from "./chunk-PZQBGUVZ.js";
4
- export {
5
- applyAsciiMode
6
- };
7
- //# sourceMappingURL=ascii-mode-SG4PRNLP.js.map
@@ -1,7 +0,0 @@
1
- import {
2
- discoverAndMergeProviders
3
- } from "./chunk-PA4VBCXS.js";
4
- export {
5
- discoverAndMergeProviders
6
- };
7
- //# sourceMappingURL=auto-discover-providers-JX346GOM.js.map
@@ -1,10 +0,0 @@
1
-
2
- // src/utils/win32-cmd.ts
3
- import {
4
- buildWin32CmdShimInvocation
5
- } from "@wrongstack/core/utils";
6
-
7
- export {
8
- buildWin32CmdShimInvocation
9
- };
10
- //# sourceMappingURL=chunk-BHXAKTBE.js.map
@@ -1,61 +0,0 @@
1
-
2
- // src/subcommands/index.ts
3
- var loaders = {
4
- automation: async () => (await import("./automation-MCDFCIMV.js")).automationCmd,
5
- sandbox: async () => (await import("./sandbox-TYGD6FI2.js")).sandboxCmd,
6
- acp: async () => (await import("./acp-T77EAEDB.js")).acpCmd,
7
- init: async () => (await import("./init-DRMMFG2G.js")).initCmd,
8
- auth: async () => (await import("./auth-M6LXZTDA.js")).authCmd,
9
- update: async () => (await import("./update-6OEPAEUV.js")).updateCmd,
10
- remote: async () => (await import("./remote-C74BCNND.js")).remoteCmd,
11
- sessions: async () => (await import("./sessions-config-VE26SB56.js")).sessionsCmd,
12
- config: async () => (await import("./sessions-config-VE26SB56.js")).configCmd,
13
- "config-export": async () => (await import("./config-transfer-VOIFY7U4.js")).configExportCmd,
14
- "config-import": async () => (await import("./config-transfer-VOIFY7U4.js")).configImportCmd,
15
- rewind: async () => (await import("./rewind-7AULJS7F.js")).rewindCmd,
16
- replay: async () => (await import("./replay-JJ2NOWD6.js")).replayCmd,
17
- audit: async () => (await import("./audit-KCBTHUQI.js")).auditCmd,
18
- tools: async () => (await import("./tools-skills-33AI6K6S.js")).toolsCmd,
19
- skills: async () => (await import("./tools-skills-33AI6K6S.js")).skillsCmd,
20
- "skill-suggest": async () => (await import("./skill-suggest-THANK3LV.js")).skillSuggestCmd,
21
- typesafe: async () => (await import("./typesafe-NHC322W5.js")).typesafeCmd,
22
- providers: async () => (await import("./providers-models-37DUV2GW.js")).providersCmd,
23
- models: async () => (await import("./providers-models-37DUV2GW.js")).modelsCmd,
24
- mcp: async () => (await import("./mcp-LBS45HWZ.js")).mcpCmd,
25
- plugin: async () => (await import("./plugin-usage-3TZGROK7.js")).pluginCmd,
26
- plugins: async () => (await import("./plugin-usage-3TZGROK7.js")).pluginCmd,
27
- diag: async () => (await import("./diag-doctor-BIZAFIAT.js")).diagCmd,
28
- doctor: async () => (await import("./diag-doctor-BIZAFIAT.js")).doctorCmd,
29
- "proxy-status": async () => (await import("./diag-doctor-BIZAFIAT.js")).proxyCmd,
30
- export: async () => (await import("./export-VVRIOWFV.js")).exportCmd,
31
- usage: async () => (await import("./plugin-usage-3TZGROK7.js")).usageCmd,
32
- version: async () => (await import("./version-help-JQGRPDJW.js")).versionCmd,
33
- help: async () => (await import("./version-help-JQGRPDJW.js")).helpCmd,
34
- projects: async () => (await import("./projects-T4CZCA25.js")).projectsCmd,
35
- modeldiag: async () => (await import("./modeldiag-NEPTLFZW.js")).modeldiagCmd,
36
- quick: async () => (await import("./quick-CNB4Z3HS.js")).quickCmd,
37
- bench: async () => (await import("./bench-MMZHFHDL.js")).benchCmd,
38
- chronicle: async () => (await import("./chronicle-PBJS7BN6.js")).chronicleCmd,
39
- hq: async () => (await import("./hq-5OIEKB4V.js")).hqCmd,
40
- mailbox: async () => (await import("./mailbox-serve-S536N66F.js")).mailboxServeCmd,
41
- permissions: async () => (await import("./permissions-PL27UHYD.js")).permissionsCmd,
42
- project: async () => (await import("./project-AOQI5XTK.js")).projectCmd,
43
- sage: async () => (await import("./sage-FFKUOCQL.js")).sageCmd,
44
- governance: async () => (await import("./governance-RYSHV675.js")).governanceCmd,
45
- "import-claude-code": async () => (await import("./import-claude-code-AYG24RG2.js")).importClaudeCodeCmd
46
- };
47
- var subcommands = Object.fromEntries(
48
- Object.entries(loaders).map(
49
- ([name, load]) => [
50
- name,
51
- async (args, deps) => (await load())(args, deps)
52
- ]
53
- )
54
- );
55
- var subcommandNames = Object.keys(loaders);
56
-
57
- export {
58
- subcommands,
59
- subcommandNames
60
- };
61
- //# sourceMappingURL=chunk-LDXXMPMS.js.map
@@ -1 +0,0 @@
1
- //# sourceMappingURL=chunk-TGSPCFBT.js.map
@@ -1,7 +0,0 @@
1
- import {
2
- parseTokenTtlValue
3
- } from "./chunk-UKP7H2U4.js";
4
- export {
5
- parseTokenTtlValue
6
- };
7
- //# sourceMappingURL=hq-ttl-N4DAIAVX.js.map
@@ -1,9 +0,0 @@
1
- import {
2
- createHqIpAllowlist,
3
- parseHqIpAllowlist
4
- } from "./chunk-Q7E3BPDU.js";
5
- export {
6
- createHqIpAllowlist,
7
- parseHqIpAllowlist
8
- };
9
- //# sourceMappingURL=ip-allowlist-NHXO6AKJ.js.map
@@ -1,7 +0,0 @@
1
- import {
2
- createKanbanSupervisor
3
- } from "./chunk-R4QGL6GB.js";
4
- export {
5
- createKanbanSupervisor
6
- };
7
- //# sourceMappingURL=kanban-supervisor-67ECABTD.js.map
@@ -1,10 +0,0 @@
1
- import {
2
- handleHelpVersionShortCircuit
3
- } from "./chunk-LDV4ERNV.js";
4
- import "./chunk-CJSHS2K7.js";
5
- import "./chunk-AKESWZH5.js";
6
- import "./chunk-F5DCFAKI.js";
7
- export {
8
- handleHelpVersionShortCircuit
9
- };
10
- //# sourceMappingURL=short-circuit-flags-EXJBJ5GT.js.map
@@ -1,9 +0,0 @@
1
- import {
2
- subcommandNames,
3
- subcommands
4
- } from "./chunk-LDXXMPMS.js";
5
- export {
6
- subcommandNames,
7
- subcommands
8
- };
9
- //# sourceMappingURL=subcommands-DTKBXLPU.js.map
@@ -1,10 +0,0 @@
1
- import {
2
- helpCmd,
3
- versionCmd
4
- } from "./chunk-AKESWZH5.js";
5
- import "./chunk-F5DCFAKI.js";
6
- export {
7
- helpCmd,
8
- versionCmd
9
- };
10
- //# sourceMappingURL=version-help-JQGRPDJW.js.map