@wrongstack/cli 1.0.36 → 1.1.0

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 (165) hide show
  1. package/dist/{acp-QLU7T5WX.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-AED7RW7D.js → auth-ANOVZVHE.js} +12 -11
  5. package/dist/auto-discover-providers-V75ICIBG.js +8 -0
  6. package/dist/{automation-3E3AUPBF.js → automation-O7ZRZSFS.js} +2 -1
  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-AGJ6TAWY.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-ZWBI7ORM.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-BJH44J7G.js → chunk-76JE54WD.js} +5 -3
  23. package/dist/{chunk-7BNBD4PE.js → chunk-7IY2UTBE.js} +2 -2
  24. package/dist/{chunk-GF7LUWQS.js → chunk-AWRZWPJ3.js} +18 -18
  25. package/dist/{chunk-L5NWFP5R.js → chunk-BAWRRA6O.js} +2 -2
  26. package/dist/{chunk-DAKVBMD4.js → chunk-BCKVNORU.js} +1 -1
  27. package/dist/{chunk-4JMAWKLA.js → chunk-BIGSVBPI.js} +1 -1
  28. package/dist/{chunk-CZTXF6HY.js → chunk-BJ4LDJ4H.js} +1 -1
  29. package/dist/{chunk-RE73FP2X.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-RYTSPBNM.js → chunk-CIGEY7NU.js} +5 -5
  33. package/dist/{chunk-T5KR6SNO.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-NOZJIN46.js → chunk-IJLIAPCW.js} +1 -1
  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-WY74MMDB.js → chunk-NL2ABOAS.js} +1 -1
  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-NEWXDNF2.js → chunk-RAWHRRUJ.js} +5 -5
  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-4R6TVMYA.js → chunk-T4TGMTH2.js} +3 -3
  58. package/dist/{chunk-B6EHK772.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-ACW64W4M.js → chunk-VAQXOZKP.js} +2 -2
  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-ULYAI7CP.js → chunk-ZCXZGYO5.js} +1 -1
  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-I6HJCVCV.js → cli-context-V6NKFU2X.js} +104 -46
  74. package/dist/{cli-main-X7KD7IOC.js → cli-main-KSQYIMDN.js} +2545 -1769
  75. package/dist/{config-transfer-YPD7HYXH.js → config-transfer-Y7XJMJRN.js} +4 -3
  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-M7D4KNBB.js → execution-BAP566QC.js} +74 -29
  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-BBLGEEUH.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-5TR6NBGS.js → hq-server-BI23EPM7.js} +7 -5
  90. package/dist/{hq-service-4Q64WFNT.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-GHIS2F7Y.js → import-claude-code-D4F6ZE7I.js} +5 -4
  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-DRWJVMYU.js → mailbox-serve-MMQCHOHI.js} +5 -3
  101. package/dist/{mcp-LBS45HWZ.js → mcp-2XWBJEQN.js} +4 -3
  102. package/dist/{modeldiag-F3LUF4VJ.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-usage-EM752WHG.js → plugin-usage-TYF5HY4K.js} +6 -5
  106. package/dist/{plugins-U6HQFJ7N.js → plugins-XGAXDLPT.js} +6 -5
  107. package/dist/pre-launch/launch-prompts.d.ts +21 -2
  108. package/dist/pre-launch.d.ts +1 -1
  109. package/dist/{project-AOQI5XTK.js → project-V5KNTLV4.js} +2 -1
  110. package/dist/{project-manifest-FTFDCCTZ.js → project-manifest-HXCID644.js} +3 -2
  111. package/dist/{project-picker-NZYJKQQC.js → project-picker-FUSLXKSA.js} +4 -3
  112. package/dist/{projects-T4CZCA25.js → projects-FWRJHW3S.js} +2 -1
  113. package/dist/{providers-models-S3S6VXME.js → providers-models-CDI5GVBX.js} +6 -5
  114. package/dist/{proxy-wiring-K2DORFFL.js → proxy-wiring-FIW6HFJV.js} +4 -3
  115. package/dist/{quick-CNB4Z3HS.js → quick-NPC3N3ZX.js} +2 -1
  116. package/dist/{remote-C74BCNND.js → remote-AKKRJEHK.js} +5 -4
  117. package/dist/{replay-DEI566CW.js → replay-5FOPERB2.js} +2 -1
  118. package/dist/{replay-JJ2NOWD6.js → replay-URJFMQCU.js} +3 -2
  119. package/dist/{rewind-7AULJS7F.js → rewind-GAUXWSTU.js} +3 -2
  120. package/dist/{sage-BMRDJCDI.js → sage-6KKXK2ZS.js} +4 -3
  121. package/dist/{sage-sync-PCWCNEUK.js → sage-sync-IN3WKEBN.js} +5 -3
  122. package/dist/{sandbox-TYGD6FI2.js → sandbox-EZQ76MNY.js} +2 -1
  123. package/dist/{sdd-runtime-PF72WHLO.js → sdd-runtime-6MFUXWJK.js} +4 -3
  124. package/dist/{session-move-P2EC2COA.js → session-move-F3N45UQQ.js} +2 -1
  125. package/dist/{sessions-config-RQRQDW5Q.js → sessions-config-SJVQXCIE.js} +7 -6
  126. package/dist/{sessions-doctor-QUL37U32.js → sessions-doctor-DZQTDQRY.js} +2 -1
  127. package/dist/short-circuit-flags-647S5WBL.js +11 -0
  128. package/dist/{simpleui-dist-7BQISSEP.js → simpleui-dist-EE3TJRBG.js} +2 -1
  129. package/dist/{skill-suggest-THANK3LV.js → skill-suggest-LZV2TIPQ.js} +22 -6
  130. package/dist/slash-commands/browser.d.ts +3 -0
  131. package/dist/slash-commands/command-context.d.ts +3 -0
  132. package/dist/slash-commands/context-residency.d.ts +6 -0
  133. package/dist/{standalone-auto-update-QUXOZ4B5.js → standalone-auto-update-X5SK4M5B.js} +5 -4
  134. package/dist/{standalone-update-HZHDZZOR.js → standalone-update-6U4NP5MN.js} +4 -3
  135. package/dist/subcommands-EGZPBQOO.js +10 -0
  136. package/dist/{tools-skills-33AI6K6S.js → tools-skills-55QVTMSK.js} +2 -1
  137. package/dist/{typesafe-KW2XHOG3.js → typesafe-YBEADNAH.js} +8 -7
  138. package/dist/{typesafe-brain-replay-C5276FVR.js → typesafe-brain-replay-XBU5RZDY.js} +2 -1
  139. package/dist/{typesafe-judgment-check-GGYYV5UF.js → typesafe-judgment-check-XRLBF5JV.js} +2 -1
  140. package/dist/{typesafe-topic-replay-DB2AYL7V.js → typesafe-topic-replay-L6NKFYPM.js} +4 -3
  141. package/dist/{typesafe-triage-replay-27NDAZ3V.js → typesafe-triage-replay-IRV2HHLN.js} +3 -2
  142. package/dist/{update-LHCWAWEZ.js → update-54W7GUS5.js} +6 -5
  143. package/dist/{update-check-VLVT4IV2.js → update-check-JBGP4ZFI.js} +4 -3
  144. package/dist/utils/win32-cmd.d.ts +1 -1
  145. package/dist/{version-JB2UAV2A.js → version-Q6KJ23GB.js} +3 -2
  146. package/dist/version-help-RBZC5GZZ.js +11 -0
  147. package/dist/webui-server/provider-config.d.ts +12 -5
  148. package/dist/{webui-server-CUIFA25W.js → webui-server-HIUY3RHD.js} +57 -19
  149. package/dist/wiring/slash-commands.d.ts +3 -0
  150. package/dist/{wrongtrace-gate-counters-7C2EAAZL.js → wrongtrace-gate-counters-K44XG3H3.js} +3 -2
  151. package/dist/{wrongtrace-telemetry-3ASFKOZO.js → wrongtrace-telemetry-YS6SUBXK.js} +3 -2
  152. package/dist/ws-runtime.d.ts +6 -0
  153. package/package.json +39 -39
  154. package/LICENSE +0 -21
  155. package/dist/ascii-mode-SG4PRNLP.js +0 -7
  156. package/dist/auto-discover-providers-JX346GOM.js +0 -7
  157. package/dist/chunk-BHXAKTBE.js +0 -10
  158. package/dist/chunk-LPGZ3NUF.js +0 -61
  159. package/dist/chunk-TGSPCFBT.js +0 -1
  160. package/dist/hq-ttl-N4DAIAVX.js +0 -7
  161. package/dist/ip-allowlist-NHXO6AKJ.js +0 -9
  162. package/dist/kanban-supervisor-67ECABTD.js +0 -7
  163. package/dist/short-circuit-flags-IEV3FEOT.js +0 -10
  164. package/dist/subcommands-75IB23LS.js +0 -9
  165. package/dist/version-help-JQGRPDJW.js +0 -10
@@ -1,16 +1,17 @@
1
1
  import {
2
2
  activeProfileConfigPath
3
- } from "./chunk-YMXXOOFN.js";
3
+ } from "./chunk-SPSHEZ46.js";
4
4
  import {
5
5
  backupCurrent,
6
6
  getHistoryEntry,
7
7
  listHistory,
8
8
  restoreFromHistory,
9
9
  restoreLast
10
- } from "./chunk-4JMAWKLA.js";
10
+ } from "./chunk-BIGSVBPI.js";
11
11
  import {
12
12
  restoreFlags
13
- } from "./chunk-CSAPOCBP.js";
13
+ } from "./chunk-QC6CLAK7.js";
14
+ import "./chunk-W23PY4IJ.js";
14
15
 
15
16
  // src/subcommands/handlers/sessions-config.ts
16
17
  import * as path2 from "node:path";
@@ -325,7 +326,7 @@ var sessionsCmd = async (args, deps) => {
325
326
  return sessionsFleetCmd(args.slice(1), deps);
326
327
  }
327
328
  if (sub === "doctor") {
328
- const { sessionsDoctorCmd } = await import("./sessions-doctor-QUL37U32.js");
329
+ const { sessionsDoctorCmd } = await import("./sessions-doctor-DZQTDQRY.js");
329
330
  return sessionsDoctorCmd(args.slice(1), deps);
330
331
  }
331
332
  if (!deps.sessionStore) {
@@ -393,7 +394,7 @@ var sessionsCmd = async (args, deps) => {
393
394
  return 1;
394
395
  }
395
396
  try {
396
- const { moveSessionTo, describeSessionMove } = await import("./session-move-P2EC2COA.js");
397
+ const { moveSessionTo, describeSessionMove } = await import("./session-move-F3N45UQQ.js");
397
398
  const result = await moveSessionTo({
398
399
  store: deps.sessionStore,
399
400
  sessionId,
@@ -536,4 +537,4 @@ export {
536
537
  configCmd,
537
538
  sessionsCmd
538
539
  };
539
- //# sourceMappingURL=sessions-config-RQRQDW5Q.js.map
540
+ //# sourceMappingURL=sessions-config-SJVQXCIE.js.map
@@ -1,3 +1,4 @@
1
+ import "./chunk-W23PY4IJ.js";
1
2
 
2
3
  // src/subcommands/handlers/sessions-doctor.ts
3
4
  import {
@@ -142,4 +143,4 @@ var sessionsDoctorCmd = async (args, deps) => {
142
143
  export {
143
144
  sessionsDoctorCmd
144
145
  };
145
- //# sourceMappingURL=sessions-doctor-QUL37U32.js.map
146
+ //# sourceMappingURL=sessions-doctor-DZQTDQRY.js.map
@@ -0,0 +1,11 @@
1
+ import {
2
+ handleHelpVersionShortCircuit
3
+ } from "./chunk-CIGEY7NU.js";
4
+ import "./chunk-75OLD563.js";
5
+ import "./chunk-6VPWQ4TG.js";
6
+ import "./chunk-HKMOIIPQ.js";
7
+ import "./chunk-W23PY4IJ.js";
8
+ export {
9
+ handleHelpVersionShortCircuit
10
+ };
11
+ //# sourceMappingURL=short-circuit-flags-647S5WBL.js.map
@@ -1,3 +1,4 @@
1
+ import "./chunk-W23PY4IJ.js";
1
2
 
2
3
  // src/simpleui-dist.ts
3
4
  import { spawn } from "node:child_process";
@@ -100,4 +101,4 @@ export {
100
101
  ensureSimpleUiDistDir,
101
102
  resolveSimpleUiDistDir
102
103
  };
103
- //# sourceMappingURL=simpleui-dist-7BQISSEP.js.map
104
+ //# sourceMappingURL=simpleui-dist-EE3TJRBG.js.map
@@ -1,3 +1,4 @@
1
+ import "./chunk-W23PY4IJ.js";
1
2
 
2
3
  // src/subcommands/handlers/skill-suggest.ts
3
4
  import * as fs from "node:fs/promises";
@@ -6,6 +7,7 @@ import {
6
7
  buildSuggesterFromConfig,
7
8
  parseEvalJsonl,
8
9
  scoreSuggestions,
10
+ skillPromptExclusionReasons,
9
11
  sweepThresholds,
10
12
  unknownGoldLabels
11
13
  } from "@wrongstack/core/skills";
@@ -41,9 +43,11 @@ var skillSuggestCmd = async (args, deps) => {
41
43
  write(USAGE);
42
44
  return 1;
43
45
  }
46
+ const availableToolNames = deps.toolRegistry?.list().map((tool) => tool.name);
44
47
  const built = buildSuggesterFromConfig({
45
48
  config: deps.config,
46
- skillLoader: deps.skillLoader
49
+ skillLoader: deps.skillLoader,
50
+ availableToolNames
47
51
  });
48
52
  if ("error" in built) {
49
53
  write(color.red(`skill-suggest: ${built.error}`));
@@ -55,7 +59,7 @@ var skillSuggestCmd = async (args, deps) => {
55
59
  file: path.resolve(deps.cwd, evalFile),
56
60
  sweep,
57
61
  suggester,
58
- rosterNames: (await deps.skillLoader?.list())?.map((s) => s.name) ?? [],
62
+ rosterNames: (await deps.skillLoader?.list())?.filter((skill) => skillPromptExclusionReasons(skill, availableToolNames).length === 0).map((skill) => skill.name) ?? [],
59
63
  write
60
64
  });
61
65
  }
@@ -157,6 +161,7 @@ async function runEval(input) {
157
161
  for (const error of errors) {
158
162
  write(color.yellow(` line ${error.line}: ${error.reason}`));
159
163
  }
164
+ if (errors.length > 0) return 1;
160
165
  if (requests.length === 0) {
161
166
  write(color.red("skill-suggest: no usable cases in that file"));
162
167
  return 1;
@@ -166,6 +171,11 @@ async function runEval(input) {
166
171
  write(color.yellow(` gold labels not in this roster: ${unknown.join(", ")}`));
167
172
  write(color.yellow(" those cases can never be scored correct \u2014 fix or remove them"));
168
173
  write("");
174
+ return 1;
175
+ }
176
+ if (new Set(requests.map((request) => request.text)).size !== requests.length) {
177
+ write(color.red("skill-suggest: duplicate request text \u2014 remove duplicates before evaluation"));
178
+ return 1;
169
179
  }
170
180
  const covered = requests.filter((r) => r.gold).length;
171
181
  write(
@@ -195,10 +205,16 @@ async function runEval(input) {
195
205
  );
196
206
  }
197
207
  write("");
198
- const failed = traces.filter((row) => row.trace.stop === "error").length;
208
+ const failed = traces.filter(
209
+ (row) => !["suggested", "gate", "fits"].includes(row.trace.stop)
210
+ ).length;
199
211
  if (failed > 0) {
200
- write(color.yellow(` ${failed} case(s) failed outright and count as "suggested nothing"`));
201
- write("");
212
+ write(
213
+ color.yellow(
214
+ ` ${failed} case(s) were not evaluated \u2014 no accuracy score or threshold sweep produced`
215
+ )
216
+ );
217
+ return 1;
202
218
  }
203
219
  const byText = new Map(traces.map((row) => [row.request.text, row.trace]));
204
220
  const { score, cases } = scoreSuggestions(
@@ -287,4 +303,4 @@ function truncate(text, max) {
287
303
  export {
288
304
  skillSuggestCmd
289
305
  };
290
- //# sourceMappingURL=skill-suggest-THANK3LV.js.map
306
+ //# sourceMappingURL=skill-suggest-LZV2TIPQ.js.map
@@ -0,0 +1,3 @@
1
+ import type { SlashCommand } from '@wrongstack/core/types';
2
+ export declare function buildBrowserCommand(): SlashCommand;
3
+ //# sourceMappingURL=browser.d.ts.map
@@ -28,6 +28,9 @@ export interface SlashCommandContext {
28
28
  compact(ctx: Context, opts?: CompactOptions): Promise<CompactReport>;
29
29
  };
30
30
  sessionStore?: SessionStore | undefined;
31
+ sessionRef?: {
32
+ current?: import('@wrongstack/core/types').SessionWriter | undefined;
33
+ } | undefined;
31
34
  skillLoader?: SkillLoader | undefined;
32
35
  tokenCounter: TokenCounter;
33
36
  renderer: Renderer;
@@ -0,0 +1,6 @@
1
+ import type { Context } from '@wrongstack/core/agent';
2
+ /** Two-line summary for the default `/context` output. */
3
+ export declare function renderResidencySummary(ctx: Context): string[];
4
+ /** Full `/context residency` report. */
5
+ export declare function renderResidencyReport(ctx: Context): string;
6
+ //# sourceMappingURL=context-residency.d.ts.map
@@ -4,14 +4,15 @@ import {
4
4
  findStandaloneRelease,
5
5
  installExecutableFrom,
6
6
  verifyStandaloneDigest
7
- } from "./chunk-SUDNPYWD.js";
7
+ } from "./chunk-FM7DPSYA.js";
8
8
  import {
9
9
  isNewer
10
- } from "./chunk-DIOODAYM.js";
10
+ } from "./chunk-H53EXXAU.js";
11
11
  import {
12
12
  CLI_VERSION,
13
13
  STANDALONE_TARGET
14
- } from "./chunk-F5DCFAKI.js";
14
+ } from "./chunk-HKMOIIPQ.js";
15
+ import "./chunk-W23PY4IJ.js";
15
16
 
16
17
  // src/standalone-auto-update.ts
17
18
  import { randomBytes } from "node:crypto";
@@ -257,4 +258,4 @@ export {
257
258
  startStandaloneAutoUpdate,
258
259
  takeAppliedUpdate
259
260
  };
260
- //# sourceMappingURL=standalone-auto-update-QUXOZ4B5.js.map
261
+ //# sourceMappingURL=standalone-auto-update-X5SK4M5B.js.map
@@ -8,8 +8,9 @@ import {
8
8
  standaloneAssetName,
9
9
  updateStandaloneBinary,
10
10
  verifyStandaloneDigest
11
- } from "./chunk-SUDNPYWD.js";
12
- import "./chunk-F5DCFAKI.js";
11
+ } from "./chunk-FM7DPSYA.js";
12
+ import "./chunk-HKMOIIPQ.js";
13
+ import "./chunk-W23PY4IJ.js";
13
14
  export {
14
15
  MAX_BINARY_BYTES,
15
16
  fetchLatestStandaloneVersion,
@@ -21,4 +22,4 @@ export {
21
22
  updateStandaloneBinary,
22
23
  verifyStandaloneDigest
23
24
  };
24
- //# sourceMappingURL=standalone-update-HZHDZZOR.js.map
25
+ //# sourceMappingURL=standalone-update-6U4NP5MN.js.map
@@ -0,0 +1,10 @@
1
+ import {
2
+ subcommandNames,
3
+ subcommands
4
+ } from "./chunk-ML3US333.js";
5
+ import "./chunk-W23PY4IJ.js";
6
+ export {
7
+ subcommandNames,
8
+ subcommands
9
+ };
10
+ //# sourceMappingURL=subcommands-EGZPBQOO.js.map
@@ -1,3 +1,4 @@
1
+ import "./chunk-W23PY4IJ.js";
1
2
 
2
3
  // src/subcommands/handlers/tools-skills.ts
3
4
  import { color } from "@wrongstack/core/utils";
@@ -25,4 +26,4 @@ export {
25
26
  skillsCmd,
26
27
  toolsCmd
27
28
  };
28
- //# sourceMappingURL=tools-skills-33AI6K6S.js.map
29
+ //# sourceMappingURL=tools-skills-55QVTMSK.js.map
@@ -1,10 +1,11 @@
1
1
  import {
2
2
  maskedKey,
3
3
  mutateConfigProviders
4
- } from "./chunk-ULYAI7CP.js";
4
+ } from "./chunk-ZCXZGYO5.js";
5
5
  import {
6
6
  activeProfileConfigPath
7
- } from "./chunk-YMXXOOFN.js";
7
+ } from "./chunk-SPSHEZ46.js";
8
+ import "./chunk-W23PY4IJ.js";
8
9
 
9
10
  // src/subcommands/handlers/typesafe.ts
10
11
  import { execFile } from "node:child_process";
@@ -80,13 +81,13 @@ var typesafeCmd = async (args, deps) => {
80
81
  case "lint-conventions":
81
82
  return await lintConventions(deps, write);
82
83
  case "replay-topic-shift":
83
- return await (await import("./typesafe-topic-replay-DB2AYL7V.js")).replayTopicShift(deps, write);
84
+ return await (await import("./typesafe-topic-replay-L6NKFYPM.js")).replayTopicShift(deps, write);
84
85
  case "replay-memory-triage":
85
- return await (await import("./typesafe-triage-replay-27NDAZ3V.js")).replayMemoryTriage(deps, write);
86
+ return await (await import("./typesafe-triage-replay-IRV2HHLN.js")).replayMemoryTriage(deps, write);
86
87
  case "replay-brain-ledger":
87
- return await (await import("./typesafe-brain-replay-C5276FVR.js")).replayBrainLedger(deps, write);
88
+ return await (await import("./typesafe-brain-replay-XBU5RZDY.js")).replayBrainLedger(deps, write);
88
89
  case "check-judgments":
89
- return await (await import("./typesafe-judgment-check-GGYYV5UF.js")).checkJudgments(deps, write);
90
+ return await (await import("./typesafe-judgment-check-XRLBF5JV.js")).checkJudgments(deps, write);
90
91
  default:
91
92
  write(`Unknown subcommand: ${sub}
92
93
  `);
@@ -340,4 +341,4 @@ async function lintConventions(deps, write) {
340
341
  export {
341
342
  typesafeCmd
342
343
  };
343
- //# sourceMappingURL=typesafe-KW2XHOG3.js.map
344
+ //# sourceMappingURL=typesafe-YBEADNAH.js.map
@@ -1,3 +1,4 @@
1
+ import "./chunk-W23PY4IJ.js";
1
2
 
2
3
  // src/subcommands/handlers/typesafe-brain-replay.ts
3
4
  import { readFile } from "node:fs/promises";
@@ -219,4 +220,4 @@ function summarize(cases) {
219
220
  export {
220
221
  replayBrainLedger
221
222
  };
222
- //# sourceMappingURL=typesafe-brain-replay-C5276FVR.js.map
223
+ //# sourceMappingURL=typesafe-brain-replay-XBU5RZDY.js.map
@@ -1,3 +1,4 @@
1
+ import "./chunk-W23PY4IJ.js";
1
2
 
2
3
  // src/subcommands/handlers/typesafe-judgment-check.ts
3
4
  import { checkJevJudgments } from "@wrongstack/runtime/jev-checks";
@@ -26,4 +27,4 @@ async function checkJudgments(deps, write) {
26
27
  export {
27
28
  checkJudgments
28
29
  };
29
- //# sourceMappingURL=typesafe-judgment-check-GGYYV5UF.js.map
30
+ //# sourceMappingURL=typesafe-judgment-check-XRLBF5JV.js.map
@@ -1,9 +1,10 @@
1
1
  import {
2
2
  resolveRuntimeMaxContext
3
- } from "./chunk-CZTXF6HY.js";
3
+ } from "./chunk-BJ4LDJ4H.js";
4
4
  import {
5
5
  createProviderForId
6
- } from "./chunk-YL4KCHZG.js";
6
+ } from "./chunk-FPUB5WWP.js";
7
+ import "./chunk-W23PY4IJ.js";
7
8
 
8
9
  // src/subcommands/handlers/typesafe-topic-replay.ts
9
10
  import { readdir, readFile } from "node:fs/promises";
@@ -231,4 +232,4 @@ async function replayTopicShift(deps, write) {
231
232
  export {
232
233
  replayTopicShift
233
234
  };
234
- //# sourceMappingURL=typesafe-topic-replay-DB2AYL7V.js.map
235
+ //# sourceMappingURL=typesafe-topic-replay-L6NKFYPM.js.map
@@ -1,6 +1,7 @@
1
1
  import {
2
2
  createProviderForId
3
- } from "./chunk-YL4KCHZG.js";
3
+ } from "./chunk-FPUB5WWP.js";
4
+ import "./chunk-W23PY4IJ.js";
4
5
 
5
6
  // src/subcommands/handlers/typesafe-triage-replay.ts
6
7
  import * as path from "node:path";
@@ -212,4 +213,4 @@ async function replayMemoryTriage(deps, write) {
212
213
  export {
213
214
  replayMemoryTriage
214
215
  };
215
- //# sourceMappingURL=typesafe-triage-replay-27NDAZ3V.js.map
216
+ //# sourceMappingURL=typesafe-triage-replay-IRV2HHLN.js.map
@@ -3,14 +3,15 @@ import {
3
3
  detectUpdatePackageName,
4
4
  runUpdateCommand,
5
5
  updateCmd
6
- } from "./chunk-ZWBI7ORM.js";
7
- import "./chunk-BHXAKTBE.js";
8
- import "./chunk-DIOODAYM.js";
9
- import "./chunk-F5DCFAKI.js";
6
+ } from "./chunk-6KJU6POA.js";
7
+ import "./chunk-C4654QI2.js";
8
+ import "./chunk-H53EXXAU.js";
9
+ import "./chunk-HKMOIIPQ.js";
10
+ import "./chunk-W23PY4IJ.js";
10
11
  export {
11
12
  detectUpdatePackageManager,
12
13
  detectUpdatePackageName,
13
14
  runUpdateCommand,
14
15
  updateCmd
15
16
  };
16
- //# sourceMappingURL=update-LHCWAWEZ.js.map
17
+ //# sourceMappingURL=update-54W7GUS5.js.map
@@ -5,8 +5,9 @@ import {
5
5
  fetchLatestFromNpm,
6
6
  getUpdateNotification,
7
7
  isNewer
8
- } from "./chunk-DIOODAYM.js";
9
- import "./chunk-F5DCFAKI.js";
8
+ } from "./chunk-H53EXXAU.js";
9
+ import "./chunk-HKMOIIPQ.js";
10
+ import "./chunk-W23PY4IJ.js";
10
11
  export {
11
12
  cachePath,
12
13
  checkForUpdate,
@@ -15,4 +16,4 @@ export {
15
16
  getUpdateNotification,
16
17
  isNewer
17
18
  };
18
- //# sourceMappingURL=update-check-VLVT4IV2.js.map
19
+ //# sourceMappingURL=update-check-JBGP4ZFI.js.map
@@ -6,5 +6,5 @@
6
6
  * left metacharacter-bearing arguments unquoted under `shell: true`. Keeping one
7
7
  * implementation in core removes the divergence risk (WS-004 / CMDI-005).
8
8
  */
9
- export { buildWin32CmdShimInvocation, } from '@wrongstack/core/utils';
9
+ export { buildWin32CmdShimInvocation } from '@wrongstack/core/utils';
10
10
  //# sourceMappingURL=win32-cmd.d.ts.map
@@ -2,10 +2,11 @@ import {
2
2
  API_VERSION,
3
3
  CLI_VERSION,
4
4
  STANDALONE_TARGET
5
- } from "./chunk-F5DCFAKI.js";
5
+ } from "./chunk-HKMOIIPQ.js";
6
+ import "./chunk-W23PY4IJ.js";
6
7
  export {
7
8
  API_VERSION,
8
9
  CLI_VERSION,
9
10
  STANDALONE_TARGET
10
11
  };
11
- //# sourceMappingURL=version-JB2UAV2A.js.map
12
+ //# sourceMappingURL=version-Q6KJ23GB.js.map
@@ -0,0 +1,11 @@
1
+ import {
2
+ helpCmd,
3
+ versionCmd
4
+ } from "./chunk-6VPWQ4TG.js";
5
+ import "./chunk-HKMOIIPQ.js";
6
+ import "./chunk-W23PY4IJ.js";
7
+ export {
8
+ helpCmd,
9
+ versionCmd
10
+ };
11
+ //# sourceMappingURL=version-help-RBZC5GZZ.js.map
@@ -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-ULYAI7CP.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-BJH44J7G.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) {
@@ -2420,4 +2458,4 @@ async function runWebUI(opts) {
2420
2458
  export {
2421
2459
  runWebUI
2422
2460
  };
2423
- //# sourceMappingURL=webui-server-CUIFA25W.js.map
2461
+ //# sourceMappingURL=webui-server-HIUY3RHD.js.map
@@ -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