@wrongstack/cli 0.296.4 → 0.298.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 (523) hide show
  1. package/dist/{acp-A5OSIU2P.js → acp-S4LZQB66.js} +91 -23
  2. package/dist/{auth-CJWQJVRH.js → auth-NLLGEYQR.js} +3 -3
  3. package/dist/boot/dispatch-webui.d.ts +7 -0
  4. package/dist/boot/governance-evidence-candidate.d.ts +3 -0
  5. package/dist/boot/governance-shadow-bridge.d.ts +19 -0
  6. package/dist/boot/governance-trace-context.d.ts +64 -0
  7. package/dist/boot/launch-banner.d.ts +22 -0
  8. package/dist/boot/tui-session-resume.d.ts +10 -1
  9. package/dist/chimera-leader-wake.d.ts +57 -0
  10. package/dist/chimera-reviewer-policy.d.ts +89 -1
  11. package/dist/chimera-subagent-ladder.d.ts +72 -0
  12. package/dist/{chunk-AZESNNIC.js → chunk-4HH3YGG4.js} +3 -3
  13. package/dist/{chunk-IHBYBYGA.js → chunk-A6Q5KGLV.js} +51 -18
  14. package/dist/{chunk-ABXK4VVY.js → chunk-ARWGQUB3.js} +2 -1
  15. package/dist/{chunk-OI7GWJDS.js → chunk-C5GH4YBL.js} +1389 -184
  16. package/dist/{chunk-TADVX644.js → chunk-GO3TJICK.js} +11 -2
  17. package/dist/{chunk-JBTFWWKV.js → chunk-I2BM6FK6.js} +9 -4
  18. package/dist/{chunk-AXVZMEWG.js → chunk-I5MEUFDI.js} +2 -2
  19. package/dist/{chunk-WY7KKOUK.js → chunk-JW75HY4F.js} +31 -10
  20. package/dist/chunk-U3SS4NRH.js +10 -0
  21. package/dist/{chunk-Z7YGASQP.js → chunk-V3XH6XBJ.js} +30 -26
  22. package/dist/{chunk-BQCAJ7FI.js → chunk-XTIXVJXP.js} +16 -3
  23. package/dist/{cli-main-TOAWVJDY.js → cli-main-TJEU4OUY.js} +25912 -25134
  24. package/dist/cli-main-helpers.d.ts +42 -2
  25. package/dist/{execution-O7I5DYE6.js → execution-INOV5P7N.js} +1264 -650
  26. package/dist/execution-chimera-cascade.d.ts +7 -1
  27. package/dist/execution-chimera-review.d.ts +35 -0
  28. package/dist/fleet/host-types.d.ts +6 -1
  29. package/dist/fleet-statusline.d.ts +1 -0
  30. package/dist/goal-host.d.ts +1 -1
  31. package/dist/governance-V2Z42RBE.js +65 -0
  32. package/dist/governance-hq-telemetry.d.ts +17 -0
  33. package/dist/{hq-JUYKUNJX.js → hq-WO6CLUSI.js} +2 -2
  34. package/dist/hq-publisher.d.ts +3 -2
  35. package/dist/hq-server/auth.d.ts +33 -2
  36. package/dist/hq-server/login-attempt-store.d.ts +73 -0
  37. package/dist/hq-server/routes/auth-handlers.d.ts +73 -5
  38. package/dist/hq-server/routes.d.ts +5 -5
  39. package/dist/hq-server/types.d.ts +44 -2
  40. package/dist/hq-server/utils.d.ts +51 -6
  41. package/dist/hq-server/ws.d.ts +61 -2
  42. package/dist/{hq-server-6AQ3BXZA.js → hq-server-6TSAORAC.js} +2 -2
  43. package/dist/hq-server.d.ts +10 -0
  44. package/dist/index.js +337 -42
  45. package/dist/kanban-hq-sync.d.ts +13 -1
  46. package/dist/live-settings-input.d.ts +10 -1
  47. package/dist/{mailbox-serve-2UWHEN3M.js → mailbox-serve-DBOOOOWZ.js} +50 -8
  48. package/dist/{sdd-runtime-JG4EEKL6.js → sdd-runtime-AIJCJGWC.js} +2 -2
  49. package/dist/services/sdd/state.d.ts +3 -3
  50. package/dist/settings-menu.d.ts +1 -1
  51. package/dist/slash-commands/command-context.d.ts +2 -0
  52. package/dist/slash-commands/fallback.d.ts +2 -0
  53. package/dist/slash-commands/goal-refiner.d.ts +1 -1
  54. package/dist/slash-commands/goal.d.ts +1 -1
  55. package/dist/subcommands/handlers/acp-connection-gate.d.ts +20 -0
  56. package/dist/subcommands/handlers/governance.d.ts +8 -0
  57. package/dist/{update-YC4TYW2Y.js → update-MV6TUACD.js} +3 -3
  58. package/dist/utils/win32-cmd.d.ts +9 -6
  59. package/dist/{version-help-DROHZRW6.js → version-help-ASKQYXDJ.js} +2 -2
  60. package/dist/webui-server/kanban-host-adapter.d.ts +1 -1
  61. package/dist/webui-server/session-start-payload.d.ts +4 -0
  62. package/dist/{webui-server-ZF5KVGC5.js → webui-server-PCLSXX6L.js} +164 -134
  63. package/dist/webui-server-options.d.ts +7 -0
  64. package/dist/wiring/brain-and-orchestration.d.ts +2 -0
  65. package/dist/wiring/hq-telemetry.d.ts +4 -3
  66. package/dist/wiring/lifecycle-plugins.d.ts +5 -8
  67. package/dist/wiring/metrics.d.ts +1 -1
  68. package/dist/wiring/provider-runtime-setup.d.ts +2 -2
  69. package/package.json +23 -22
  70. package/dist/acp-A5OSIU2P.js.map +0 -7
  71. package/dist/acp-registry-cache.d.ts.map +0 -1
  72. package/dist/acp-server-agent.d.ts.map +0 -1
  73. package/dist/arg-parser.d.ts.map +0 -1
  74. package/dist/audit-2ZSFGNIF.js.map +0 -7
  75. package/dist/auth-CJWQJVRH.js.map +0 -7
  76. package/dist/auth-menu/add-provider.d.ts.map +0 -1
  77. package/dist/auth-menu/anthropic-oauth.d.ts.map +0 -1
  78. package/dist/auth-menu/auth-menu-audit.d.ts.map +0 -1
  79. package/dist/auth-menu/direct.d.ts.map +0 -1
  80. package/dist/auth-menu/github-copilot-oauth.d.ts.map +0 -1
  81. package/dist/auth-menu/helpers.d.ts.map +0 -1
  82. package/dist/auth-menu/index.d.ts.map +0 -1
  83. package/dist/auth-menu/local-presets.d.ts.map +0 -1
  84. package/dist/auth-menu/local.d.ts.map +0 -1
  85. package/dist/auth-menu/loopback-server.d.ts.map +0 -1
  86. package/dist/auth-menu/oauth-menu.d.ts.map +0 -1
  87. package/dist/auth-menu/openai-codex-oauth.d.ts.map +0 -1
  88. package/dist/auth-menu/panel-service.d.ts.map +0 -1
  89. package/dist/auth-menu/provider-menu.d.ts.map +0 -1
  90. package/dist/auth-menu/shared.d.ts.map +0 -1
  91. package/dist/auth-menu/top-menu.d.ts.map +0 -1
  92. package/dist/auth-menu/types.d.ts.map +0 -1
  93. package/dist/auth-menu.d.ts.map +0 -1
  94. package/dist/bench-7ZDWSNEF.js.map +0 -7
  95. package/dist/boot/auto-discover-providers.d.ts.map +0 -1
  96. package/dist/boot/brain-decision-log.d.ts.map +0 -1
  97. package/dist/boot/config-backup-recovery.d.ts.map +0 -1
  98. package/dist/boot/container-wiring.d.ts.map +0 -1
  99. package/dist/boot/dispatch-singleshot.d.ts.map +0 -1
  100. package/dist/boot/dispatch-tui.d.ts.map +0 -1
  101. package/dist/boot/dispatch-webui.d.ts.map +0 -1
  102. package/dist/boot/event-wiring.d.ts.map +0 -1
  103. package/dist/boot/execution-mode.d.ts.map +0 -1
  104. package/dist/boot/launch-menu.d.ts.map +0 -1
  105. package/dist/boot/short-circuit-desktop.d.ts.map +0 -1
  106. package/dist/boot/short-circuit-flags.d.ts.map +0 -1
  107. package/dist/boot/short-circuit-hq.d.ts.map +0 -1
  108. package/dist/boot/simpleui-full-auto.d.ts.map +0 -1
  109. package/dist/boot/system-prompt-builder.d.ts.map +0 -1
  110. package/dist/boot/system-prompt.d.ts.map +0 -1
  111. package/dist/boot/tool-registry.d.ts.map +0 -1
  112. package/dist/boot/tui-coordinator-callbacks.d.ts.map +0 -1
  113. package/dist/boot/tui-coordinator-setup.d.ts.map +0 -1
  114. package/dist/boot/tui-debug-stream.d.ts.map +0 -1
  115. package/dist/boot/tui-goal-wiring.d.ts.map +0 -1
  116. package/dist/boot/tui-live-sessions.d.ts.map +0 -1
  117. package/dist/boot/tui-project-picker-callback.d.ts.map +0 -1
  118. package/dist/boot/tui-project-spawn.d.ts.map +0 -1
  119. package/dist/boot/tui-project-switch.d.ts.map +0 -1
  120. package/dist/boot/tui-runtime-state.d.ts.map +0 -1
  121. package/dist/boot/tui-sdd-callback.d.ts.map +0 -1
  122. package/dist/boot/tui-session-resume.d.ts.map +0 -1
  123. package/dist/boot/tui-settings-adapter.d.ts.map +0 -1
  124. package/dist/boot-config.d.ts.map +0 -1
  125. package/dist/boot.d.ts.map +0 -1
  126. package/dist/brain-menu/panel-service.d.ts.map +0 -1
  127. package/dist/chimera-review-task.d.ts.map +0 -1
  128. package/dist/chimera-reviewer-policy.d.ts.map +0 -1
  129. package/dist/chronicle-QQEQFSSE.js.map +0 -7
  130. package/dist/chunk-5N34EWJR.js.map +0 -7
  131. package/dist/chunk-66T43Q4Y.js.map +0 -7
  132. package/dist/chunk-7OCVIDC7.js.map +0 -7
  133. package/dist/chunk-ABXK4VVY.js.map +0 -7
  134. package/dist/chunk-AXVZMEWG.js.map +0 -7
  135. package/dist/chunk-AZESNNIC.js.map +0 -7
  136. package/dist/chunk-BGFM3PD7.js.map +0 -7
  137. package/dist/chunk-BQCAJ7FI.js.map +0 -7
  138. package/dist/chunk-DPJZQCVP.js.map +0 -7
  139. package/dist/chunk-F4PEGAJZ.js.map +0 -7
  140. package/dist/chunk-IHBYBYGA.js.map +0 -7
  141. package/dist/chunk-JBSQ7ONN.js.map +0 -7
  142. package/dist/chunk-JBTFWWKV.js.map +0 -7
  143. package/dist/chunk-JUHRI6OV.js.map +0 -7
  144. package/dist/chunk-OI7GWJDS.js.map +0 -7
  145. package/dist/chunk-OP47B3IX.js.map +0 -7
  146. package/dist/chunk-PJHET45A.js.map +0 -7
  147. package/dist/chunk-Q5GTM25S.js.map +0 -7
  148. package/dist/chunk-QD544J2B.js.map +0 -7
  149. package/dist/chunk-QUNHS6O3.js.map +0 -7
  150. package/dist/chunk-TADVX644.js.map +0 -7
  151. package/dist/chunk-TGDHN4LM.js.map +0 -7
  152. package/dist/chunk-TYO2OVAD.js.map +0 -7
  153. package/dist/chunk-VCYZ3WZV.js.map +0 -7
  154. package/dist/chunk-VJUEZZYB.js +0 -29
  155. package/dist/chunk-VJUEZZYB.js.map +0 -7
  156. package/dist/chunk-WHOIR577.js.map +0 -7
  157. package/dist/chunk-WY7KKOUK.js.map +0 -7
  158. package/dist/chunk-XJXDOF63.js.map +0 -7
  159. package/dist/chunk-XWEGWYDU.js.map +0 -7
  160. package/dist/chunk-YWUPHRGB.js.map +0 -7
  161. package/dist/chunk-Z7YGASQP.js.map +0 -7
  162. package/dist/cli-bundled-prompts.d.ts.map +0 -1
  163. package/dist/cli-bundled-skills.d.ts.map +0 -1
  164. package/dist/cli-context.d.ts.map +0 -1
  165. package/dist/cli-entry-main.d.ts.map +0 -1
  166. package/dist/cli-entry-point.d.ts.map +0 -1
  167. package/dist/cli-eternal-flag.d.ts.map +0 -1
  168. package/dist/cli-main-TOAWVJDY.js.map +0 -7
  169. package/dist/cli-main-helpers.d.ts.map +0 -1
  170. package/dist/cli-main.d.ts.map +0 -1
  171. package/dist/cli-update-notice.d.ts.map +0 -1
  172. package/dist/config-doctor.d.ts.map +0 -1
  173. package/dist/config-history.d.ts.map +0 -1
  174. package/dist/context-limit.d.ts.map +0 -1
  175. package/dist/context-overflow-diagnostic.d.ts.map +0 -1
  176. package/dist/diag-doctor-OQ3AA63O.js.map +0 -7
  177. package/dist/diff-renderer.d.ts.map +0 -1
  178. package/dist/execute-deps.d.ts.map +0 -1
  179. package/dist/execution-O7I5DYE6.js.map +0 -7
  180. package/dist/execution-chimera-ask.d.ts.map +0 -1
  181. package/dist/execution-chimera-cascade.d.ts.map +0 -1
  182. package/dist/execution-cleanup.d.ts.map +0 -1
  183. package/dist/execution-kanban-dispatch.d.ts.map +0 -1
  184. package/dist/execution-repl-fleet-callbacks.d.ts.map +0 -1
  185. package/dist/execution-storage-observability.d.ts.map +0 -1
  186. package/dist/execution-tui-next-step-callbacks.d.ts.map +0 -1
  187. package/dist/execution.d.ts.map +0 -1
  188. package/dist/export-TPORYVRZ.js.map +0 -7
  189. package/dist/fleet/host-acp-runner-cache.d.ts.map +0 -1
  190. package/dist/fleet/host-acp.d.ts.map +0 -1
  191. package/dist/fleet/host-concurrency.d.ts.map +0 -1
  192. package/dist/fleet/host-context.d.ts.map +0 -1
  193. package/dist/fleet/host-director-builder.d.ts.map +0 -1
  194. package/dist/fleet/host-director-event-bridges.d.ts.map +0 -1
  195. package/dist/fleet/host-director-services.d.ts.map +0 -1
  196. package/dist/fleet/host-event-bridge.d.ts.map +0 -1
  197. package/dist/fleet/host-helpers.d.ts.map +0 -1
  198. package/dist/fleet/host-learning-tracker.d.ts.map +0 -1
  199. package/dist/fleet/host-learning.d.ts.map +0 -1
  200. package/dist/fleet/host-lifecycle-events.d.ts.map +0 -1
  201. package/dist/fleet/host-paths.d.ts.map +0 -1
  202. package/dist/fleet/host-provider.d.ts.map +0 -1
  203. package/dist/fleet/host-session-writer.d.ts.map +0 -1
  204. package/dist/fleet/host-shadow-pass.d.ts.map +0 -1
  205. package/dist/fleet/host-spawn-types.d.ts.map +0 -1
  206. package/dist/fleet/host-status.d.ts.map +0 -1
  207. package/dist/fleet/host-subagent-factory.d.ts.map +0 -1
  208. package/dist/fleet/host-supervisor.d.ts.map +0 -1
  209. package/dist/fleet/host-task-result-report.d.ts.map +0 -1
  210. package/dist/fleet/host-types.d.ts.map +0 -1
  211. package/dist/fleet/host.d.ts.map +0 -1
  212. package/dist/fleet/routing.d.ts.map +0 -1
  213. package/dist/fleet/status-broadcast.d.ts.map +0 -1
  214. package/dist/fleet/supervisor-registry.d.ts.map +0 -1
  215. package/dist/fleet-statusline.d.ts.map +0 -1
  216. package/dist/goal-host.d.ts.map +0 -1
  217. package/dist/hooks-wiring.d.ts.map +0 -1
  218. package/dist/hq-JUYKUNJX.js.map +0 -7
  219. package/dist/hq-command-controller.d.ts.map +0 -1
  220. package/dist/hq-publisher.d.ts.map +0 -1
  221. package/dist/hq-recovery-html.d.ts.map +0 -1
  222. package/dist/hq-server/audit-actor.d.ts.map +0 -1
  223. package/dist/hq-server/auth-state.d.ts.map +0 -1
  224. package/dist/hq-server/auth.d.ts.map +0 -1
  225. package/dist/hq-server/preflight.d.ts.map +0 -1
  226. package/dist/hq-server/project-root.d.ts.map +0 -1
  227. package/dist/hq-server/routes/auth-handlers.d.ts.map +0 -1
  228. package/dist/hq-server/routes/session-handlers.d.ts.map +0 -1
  229. package/dist/hq-server/routes/system-handlers.d.ts.map +0 -1
  230. package/dist/hq-server/routes.d.ts.map +0 -1
  231. package/dist/hq-server/snapshot.d.ts.map +0 -1
  232. package/dist/hq-server/startup.d.ts.map +0 -1
  233. package/dist/hq-server/trust-boundary.d.ts.map +0 -1
  234. package/dist/hq-server/types.d.ts.map +0 -1
  235. package/dist/hq-server/utils.d.ts.map +0 -1
  236. package/dist/hq-server/ws.d.ts.map +0 -1
  237. package/dist/hq-server-6AQ3BXZA.js.map +0 -7
  238. package/dist/hq-server.d.ts.map +0 -1
  239. package/dist/hq-static-serve.d.ts.map +0 -1
  240. package/dist/hq-ttl-U2FAYFAT.js.map +0 -7
  241. package/dist/hq-tunnel-RFKGC4HI.js.map +0 -7
  242. package/dist/hq-tunnel.d.ts.map +0 -1
  243. package/dist/index.d.ts.map +0 -1
  244. package/dist/index.js.map +0 -7
  245. package/dist/init-E2NDDOHI.js.map +0 -7
  246. package/dist/input-reader.d.ts.map +0 -1
  247. package/dist/kanban-dispatch-route.d.ts.map +0 -1
  248. package/dist/kanban-hq-sync.d.ts.map +0 -1
  249. package/dist/kanban-run-mirror-EKVNGXWW.js.map +0 -7
  250. package/dist/launch-hints.d.ts.map +0 -1
  251. package/dist/live-settings-input.d.ts.map +0 -1
  252. package/dist/mailbox-bridge-bootstrap.d.ts.map +0 -1
  253. package/dist/mailbox-serve-2UWHEN3M.js.map +0 -7
  254. package/dist/mcp-CYLPUEHC.js.map +0 -7
  255. package/dist/mcp-serve.d.ts.map +0 -1
  256. package/dist/modeldiag-HENYJ4N7.js.map +0 -7
  257. package/dist/multi-agent.d.ts.map +0 -1
  258. package/dist/next-task-predictor.d.ts.map +0 -1
  259. package/dist/permission-prompt.d.ts.map +0 -1
  260. package/dist/permissions-FNYLZIL4.js.map +0 -7
  261. package/dist/picker-key-state.d.ts.map +0 -1
  262. package/dist/picker-model-picker.d.ts.map +0 -1
  263. package/dist/picker-ui.d.ts.map +0 -1
  264. package/dist/picker.d.ts.map +0 -1
  265. package/dist/plugin-api-factory.d.ts.map +0 -1
  266. package/dist/plugin-management.d.ts.map +0 -1
  267. package/dist/plugin-usage-OU6X6LM3.js.map +0 -7
  268. package/dist/plugins-4LJ5IUBI.js.map +0 -7
  269. package/dist/pre-launch/launch-prompts.d.ts.map +0 -1
  270. package/dist/pre-launch/project-check.d.ts.map +0 -1
  271. package/dist/pre-launch.d.ts.map +0 -1
  272. package/dist/preflight.d.ts.map +0 -1
  273. package/dist/profile-config-path.d.ts.map +0 -1
  274. package/dist/project-BLQ3ALVL.js.map +0 -7
  275. package/dist/project-manifest-GE25PW4S.js.map +0 -7
  276. package/dist/project-picker-BOCWHBXP.js.map +0 -7
  277. package/dist/project-picker.d.ts.map +0 -1
  278. package/dist/projects-XE76NFNZ.js.map +0 -7
  279. package/dist/provider-config-utils.d.ts.map +0 -1
  280. package/dist/provider-helpers.d.ts.map +0 -1
  281. package/dist/provider-id.d.ts.map +0 -1
  282. package/dist/providers-models-GDELBHZK.js.map +0 -7
  283. package/dist/quick-VIO2BEHS.js.map +0 -7
  284. package/dist/renderer.d.ts.map +0 -1
  285. package/dist/repl-auto-proceed.d.ts.map +0 -1
  286. package/dist/repl-client-registration.d.ts.map +0 -1
  287. package/dist/repl-input.d.ts.map +0 -1
  288. package/dist/repl-options.d.ts.map +0 -1
  289. package/dist/repl-rendering.d.ts.map +0 -1
  290. package/dist/repl-suggestions.d.ts.map +0 -1
  291. package/dist/repl.d.ts.map +0 -1
  292. package/dist/replay-KCTXNMZQ.js.map +0 -7
  293. package/dist/rewind-EJMVFVLS.js.map +0 -7
  294. package/dist/sdd-runtime-JG4EEKL6.js.map +0 -7
  295. package/dist/services/autonomy-mode.d.ts.map +0 -1
  296. package/dist/services/commit-message.d.ts.map +0 -1
  297. package/dist/services/dispatch-classifier.d.ts.map +0 -1
  298. package/dist/services/mcp-management.d.ts.map +0 -1
  299. package/dist/services/project-facts.d.ts.map +0 -1
  300. package/dist/services/project-manifest.d.ts.map +0 -1
  301. package/dist/services/sdd/project-context.d.ts.map +0 -1
  302. package/dist/services/sdd/spec-detection.d.ts.map +0 -1
  303. package/dist/services/sdd/state.d.ts.map +0 -1
  304. package/dist/services/sdd/task-manager.d.ts.map +0 -1
  305. package/dist/services/sdd-runtime.d.ts.map +0 -1
  306. package/dist/services/statusline-config.d.ts.map +0 -1
  307. package/dist/services/suggestion-store.d.ts.map +0 -1
  308. package/dist/session-event-wiring.d.ts.map +0 -1
  309. package/dist/session-stats.d.ts.map +0 -1
  310. package/dist/sessions-config-NLCMK3BY.js.map +0 -7
  311. package/dist/settings-menu.d.ts.map +0 -1
  312. package/dist/shutdown-cleanup.d.ts.map +0 -1
  313. package/dist/simpleui-dist-JIFGUJO7.js.map +0 -7
  314. package/dist/simpleui-dist.d.ts.map +0 -1
  315. package/dist/slash-commands/acp.d.ts.map +0 -1
  316. package/dist/slash-commands/agent-improve.d.ts.map +0 -1
  317. package/dist/slash-commands/agents.d.ts.map +0 -1
  318. package/dist/slash-commands/audit.d.ts.map +0 -1
  319. package/dist/slash-commands/auth.d.ts.map +0 -1
  320. package/dist/slash-commands/autonomy.d.ts.map +0 -1
  321. package/dist/slash-commands/brain.d.ts.map +0 -1
  322. package/dist/slash-commands/btw.d.ts.map +0 -1
  323. package/dist/slash-commands/clear.d.ts.map +0 -1
  324. package/dist/slash-commands/codebase-reindex.d.ts.map +0 -1
  325. package/dist/slash-commands/collab.d.ts.map +0 -1
  326. package/dist/slash-commands/command-context.d.ts.map +0 -1
  327. package/dist/slash-commands/commit-llm.d.ts.map +0 -1
  328. package/dist/slash-commands/compact.d.ts.map +0 -1
  329. package/dist/slash-commands/context.d.ts.map +0 -1
  330. package/dist/slash-commands/coordinator.d.ts.map +0 -1
  331. package/dist/slash-commands/delegate.d.ts.map +0 -1
  332. package/dist/slash-commands/design.d.ts.map +0 -1
  333. package/dist/slash-commands/dev.d.ts.map +0 -1
  334. package/dist/slash-commands/diag-stats.d.ts.map +0 -1
  335. package/dist/slash-commands/dispatch-llm.d.ts.map +0 -1
  336. package/dist/slash-commands/doctor.d.ts.map +0 -1
  337. package/dist/slash-commands/enhance.d.ts.map +0 -1
  338. package/dist/slash-commands/ensemble.d.ts.map +0 -1
  339. package/dist/slash-commands/f-keys.d.ts.map +0 -1
  340. package/dist/slash-commands/fallback.d.ts.map +0 -1
  341. package/dist/slash-commands/fix-classifier.d.ts.map +0 -1
  342. package/dist/slash-commands/fix.d.ts.map +0 -1
  343. package/dist/slash-commands/fleet.d.ts.map +0 -1
  344. package/dist/slash-commands/git.d.ts.map +0 -1
  345. package/dist/slash-commands/gitid.d.ts.map +0 -1
  346. package/dist/slash-commands/goal-refiner.d.ts.map +0 -1
  347. package/dist/slash-commands/goal.d.ts.map +0 -1
  348. package/dist/slash-commands/health.d.ts.map +0 -1
  349. package/dist/slash-commands/help.d.ts.map +0 -1
  350. package/dist/slash-commands/helpers.d.ts.map +0 -1
  351. package/dist/slash-commands/hq.d.ts.map +0 -1
  352. package/dist/slash-commands/index.d.ts.map +0 -1
  353. package/dist/slash-commands/init.d.ts.map +0 -1
  354. package/dist/slash-commands/interrupt.d.ts.map +0 -1
  355. package/dist/slash-commands/kanban-agent-helpers.d.ts.map +0 -1
  356. package/dist/slash-commands/kanban-format.d.ts.map +0 -1
  357. package/dist/slash-commands/kanban-help.d.ts.map +0 -1
  358. package/dist/slash-commands/kanban.d.ts.map +0 -1
  359. package/dist/slash-commands/mailbox-demo.d.ts.map +0 -1
  360. package/dist/slash-commands/mailbox-serve.d.ts.map +0 -1
  361. package/dist/slash-commands/mailbox.d.ts.map +0 -1
  362. package/dist/slash-commands/mcp-utils.d.ts.map +0 -1
  363. package/dist/slash-commands/mcp.d.ts.map +0 -1
  364. package/dist/slash-commands/memory-compact.d.ts.map +0 -1
  365. package/dist/slash-commands/memory-flags.d.ts.map +0 -1
  366. package/dist/slash-commands/memory-formatters.d.ts.map +0 -1
  367. package/dist/slash-commands/memory.d.ts.map +0 -1
  368. package/dist/slash-commands/metrics.d.ts.map +0 -1
  369. package/dist/slash-commands/mode.d.ts.map +0 -1
  370. package/dist/slash-commands/modelcaps.d.ts.map +0 -1
  371. package/dist/slash-commands/models.d.ts.map +0 -1
  372. package/dist/slash-commands/mouse.d.ts.map +0 -1
  373. package/dist/slash-commands/next.d.ts.map +0 -1
  374. package/dist/slash-commands/plan.d.ts.map +0 -1
  375. package/dist/slash-commands/plugin.d.ts.map +0 -1
  376. package/dist/slash-commands/profile.d.ts.map +0 -1
  377. package/dist/slash-commands/project-utils.d.ts.map +0 -1
  378. package/dist/slash-commands/project.d.ts.map +0 -1
  379. package/dist/slash-commands/provider-status.d.ts.map +0 -1
  380. package/dist/slash-commands/prune.d.ts.map +0 -1
  381. package/dist/slash-commands/refiner.d.ts.map +0 -1
  382. package/dist/slash-commands/review.d.ts.map +0 -1
  383. package/dist/slash-commands/sdd/rendering.d.ts.map +0 -1
  384. package/dist/slash-commands/sdd-command-helpers.d.ts.map +0 -1
  385. package/dist/slash-commands/sdd-format.d.ts.map +0 -1
  386. package/dist/slash-commands/sdd.d.ts.map +0 -1
  387. package/dist/slash-commands/security.d.ts.map +0 -1
  388. package/dist/slash-commands/session.d.ts.map +0 -1
  389. package/dist/slash-commands/setmodel.d.ts.map +0 -1
  390. package/dist/slash-commands/settings.d.ts.map +0 -1
  391. package/dist/slash-commands/shadow.d.ts.map +0 -1
  392. package/dist/slash-commands/slash-deep-help.d.ts.map +0 -1
  393. package/dist/slash-commands/spawn-agents.d.ts.map +0 -1
  394. package/dist/slash-commands/statusline.d.ts.map +0 -1
  395. package/dist/slash-commands/suggest.d.ts.map +0 -1
  396. package/dist/slash-commands/suggestion-store.d.ts.map +0 -1
  397. package/dist/slash-commands/supervisor.d.ts.map +0 -1
  398. package/dist/slash-commands/surfaces.d.ts.map +0 -1
  399. package/dist/slash-commands/tasks.d.ts.map +0 -1
  400. package/dist/slash-commands/techstack.d.ts.map +0 -1
  401. package/dist/slash-commands/telegram-pairing.d.ts.map +0 -1
  402. package/dist/slash-commands/telegram-settings.d.ts.map +0 -1
  403. package/dist/slash-commands/telegram-setup.d.ts.map +0 -1
  404. package/dist/slash-commands/todos.d.ts.map +0 -1
  405. package/dist/slash-commands/tool.d.ts.map +0 -1
  406. package/dist/slash-commands/tools.d.ts.map +0 -1
  407. package/dist/slash-commands/tuneup.d.ts.map +0 -1
  408. package/dist/slash-commands/working-dir.d.ts.map +0 -1
  409. package/dist/slash-commands/worktree.d.ts.map +0 -1
  410. package/dist/slash-commands/yolo.d.ts.map +0 -1
  411. package/dist/spinner.d.ts.map +0 -1
  412. package/dist/subcommands/contracts.d.ts.map +0 -1
  413. package/dist/subcommands/handlers/acp.d.ts.map +0 -1
  414. package/dist/subcommands/handlers/audit.d.ts.map +0 -1
  415. package/dist/subcommands/handlers/auth-local-help.d.ts.map +0 -1
  416. package/dist/subcommands/handlers/auth.d.ts.map +0 -1
  417. package/dist/subcommands/handlers/bench-run-help.d.ts.map +0 -1
  418. package/dist/subcommands/handlers/bench.d.ts.map +0 -1
  419. package/dist/subcommands/handlers/chronicle.d.ts.map +0 -1
  420. package/dist/subcommands/handlers/config-history.d.ts.map +0 -1
  421. package/dist/subcommands/handlers/diag-doctor.d.ts.map +0 -1
  422. package/dist/subcommands/handlers/export.d.ts.map +0 -1
  423. package/dist/subcommands/handlers/helpers.d.ts.map +0 -1
  424. package/dist/subcommands/handlers/hq.d.ts.map +0 -1
  425. package/dist/subcommands/handlers/init.d.ts.map +0 -1
  426. package/dist/subcommands/handlers/mailbox-serve.d.ts.map +0 -1
  427. package/dist/subcommands/handlers/mcp.d.ts.map +0 -1
  428. package/dist/subcommands/handlers/model-smoke-test.d.ts.map +0 -1
  429. package/dist/subcommands/handlers/modeldiag-profiles.d.ts.map +0 -1
  430. package/dist/subcommands/handlers/modeldiag.d.ts.map +0 -1
  431. package/dist/subcommands/handlers/models-add-help.d.ts.map +0 -1
  432. package/dist/subcommands/handlers/per-subcommand-deep-help-table.d.ts.map +0 -1
  433. package/dist/subcommands/handlers/per-subcommand-help-data.d.ts.map +0 -1
  434. package/dist/subcommands/handlers/per-subcommand-help-table.d.ts.map +0 -1
  435. package/dist/subcommands/handlers/per-subcommand-help-types.d.ts.map +0 -1
  436. package/dist/subcommands/handlers/per-subcommand-help.d.ts.map +0 -1
  437. package/dist/subcommands/handlers/permissions.d.ts.map +0 -1
  438. package/dist/subcommands/handlers/plugin-usage.d.ts.map +0 -1
  439. package/dist/subcommands/handlers/project.d.ts.map +0 -1
  440. package/dist/subcommands/handlers/projects.d.ts.map +0 -1
  441. package/dist/subcommands/handlers/providers-models.d.ts.map +0 -1
  442. package/dist/subcommands/handlers/quick.d.ts.map +0 -1
  443. package/dist/subcommands/handlers/replay.d.ts.map +0 -1
  444. package/dist/subcommands/handlers/rewind.d.ts.map +0 -1
  445. package/dist/subcommands/handlers/sessions-config.d.ts.map +0 -1
  446. package/dist/subcommands/handlers/sessions-fleet.d.ts.map +0 -1
  447. package/dist/subcommands/handlers/tools-skills.d.ts.map +0 -1
  448. package/dist/subcommands/handlers/update.d.ts.map +0 -1
  449. package/dist/subcommands/handlers/version-help.d.ts.map +0 -1
  450. package/dist/subcommands/index.d.ts.map +0 -1
  451. package/dist/theme.d.ts.map +0 -1
  452. package/dist/tools-skills-UNKLOB7M.js.map +0 -7
  453. package/dist/tui-thinking-word.d.ts.map +0 -1
  454. package/dist/tuneup.d.ts.map +0 -1
  455. package/dist/update-YC4TYW2Y.js.map +0 -7
  456. package/dist/update-check-UMYTOH7Z.js.map +0 -7
  457. package/dist/update-check.d.ts.map +0 -1
  458. package/dist/utils/delay-format.d.ts.map +0 -1
  459. package/dist/utils/hq-ttl.d.ts.map +0 -1
  460. package/dist/utils/win32-cmd.d.ts.map +0 -1
  461. package/dist/utils.d.ts.map +0 -1
  462. package/dist/version-help-DROHZRW6.js.map +0 -7
  463. package/dist/version.d.ts.map +0 -1
  464. package/dist/webui-server/client-registration.d.ts.map +0 -1
  465. package/dist/webui-server/connection-handler.d.ts.map +0 -1
  466. package/dist/webui-server/context-breakdown.d.ts.map +0 -1
  467. package/dist/webui-server/contracts.d.ts.map +0 -1
  468. package/dist/webui-server/cost-helpers.d.ts.map +0 -1
  469. package/dist/webui-server/kanban-host-adapter.d.ts.map +0 -1
  470. package/dist/webui-server/kanban-run-mirror.d.ts.map +0 -1
  471. package/dist/webui-server/kanban-supervisor.d.ts.map +0 -1
  472. package/dist/webui-server/lifecycle.d.ts.map +0 -1
  473. package/dist/webui-server/listen-helpers.d.ts.map +0 -1
  474. package/dist/webui-server/logger-shim.d.ts.map +0 -1
  475. package/dist/webui-server/node-pty-loader.d.ts.map +0 -1
  476. package/dist/webui-server/prefs-seeding.d.ts.map +0 -1
  477. package/dist/webui-server/privileged-actions.d.ts.map +0 -1
  478. package/dist/webui-server/provider-config.d.ts.map +0 -1
  479. package/dist/webui-server/session-start-payload.d.ts.map +0 -1
  480. package/dist/webui-server/setup-events.d.ts.map +0 -1
  481. package/dist/webui-server/static-serve.d.ts.map +0 -1
  482. package/dist/webui-server/stream-coalescer.d.ts.map +0 -1
  483. package/dist/webui-server/terminal-log-view.d.ts.map +0 -1
  484. package/dist/webui-server-ZF5KVGC5.js.map +0 -7
  485. package/dist/webui-server-options.d.ts.map +0 -1
  486. package/dist/webui-server.d.ts.map +0 -1
  487. package/dist/wiring/brain-and-orchestration.d.ts.map +0 -1
  488. package/dist/wiring/codebase-index.d.ts.map +0 -1
  489. package/dist/wiring/command-host-adapters.d.ts.map +0 -1
  490. package/dist/wiring/command-host-state.d.ts.map +0 -1
  491. package/dist/wiring/controllers.d.ts.map +0 -1
  492. package/dist/wiring/dep-watcher-bridge.d.ts.map +0 -1
  493. package/dist/wiring/dep-watcher.d.ts.map +0 -1
  494. package/dist/wiring/design-studio.d.ts.map +0 -1
  495. package/dist/wiring/director-setup.d.ts.map +0 -1
  496. package/dist/wiring/eternal-command-handlers.d.ts.map +0 -1
  497. package/dist/wiring/fleet-command-handlers.d.ts.map +0 -1
  498. package/dist/wiring/hq-telemetry.d.ts.map +0 -1
  499. package/dist/wiring/lifecycle-plugins.d.ts.map +0 -1
  500. package/dist/wiring/mailbox-bridge-bootstrap.d.ts.map +0 -1
  501. package/dist/wiring/management-tools.d.ts.map +0 -1
  502. package/dist/wiring/metrics.d.ts.map +0 -1
  503. package/dist/wiring/pipeline.d.ts.map +0 -1
  504. package/dist/wiring/plugins.d.ts.map +0 -1
  505. package/dist/wiring/provider-runtime-setup.d.ts.map +0 -1
  506. package/dist/wiring/provider-runtime.d.ts.map +0 -1
  507. package/dist/wiring/provider-status.d.ts.map +0 -1
  508. package/dist/wiring/provider-utility-tools.d.ts.map +0 -1
  509. package/dist/wiring/provider.d.ts.map +0 -1
  510. package/dist/wiring/replay.d.ts.map +0 -1
  511. package/dist/wiring/runtime-controller-deps.d.ts.map +0 -1
  512. package/dist/wiring/runtime-dispatch-state.d.ts.map +0 -1
  513. package/dist/wiring/runtime-lifecycle-deps.d.ts.map +0 -1
  514. package/dist/wiring/runtime-picker-deps.d.ts.map +0 -1
  515. package/dist/wiring/sage.d.ts.map +0 -1
  516. package/dist/wiring/sdd-handlers.d.ts.map +0 -1
  517. package/dist/wiring/security-command.d.ts.map +0 -1
  518. package/dist/wiring/session-command-handlers.d.ts.map +0 -1
  519. package/dist/wiring/session-registry.d.ts.map +0 -1
  520. package/dist/wiring/session.d.ts.map +0 -1
  521. package/dist/wiring/slash-commands.d.ts.map +0 -1
  522. package/dist/wiring/to-execute-deps.d.ts.map +0 -1
  523. package/dist/wiring/tools.d.ts.map +0 -1
@@ -3,12 +3,14 @@ import {
3
3
  loadCachedAcpRegistry,
4
4
  refreshAcpRegistry,
5
5
  setupProvider
6
- } from "./chunk-AZESNNIC.js";
7
- import "./chunk-TADVX644.js";
6
+ } from "./chunk-4HH3YGG4.js";
7
+ import "./chunk-GO3TJICK.js";
8
8
  import "./chunk-PJHET45A.js";
9
9
  import "./chunk-7OCVIDC7.js";
10
10
 
11
11
  // src/subcommands/handlers/acp.ts
12
+ import { randomBytes } from "node:crypto";
13
+ import * as path from "node:path";
12
14
  import {
13
15
  defaultPermissionPolicy,
14
16
  EnsembleRegistry,
@@ -26,7 +28,6 @@ import {
26
28
  WrongStackACPServer,
27
29
  WsBridgeTransport
28
30
  } from "@wrongstack/acp/agent";
29
- import * as path from "node:path";
30
31
  import { WebSocketServer } from "ws";
31
32
 
32
33
  // src/acp-server-agent.ts
@@ -270,6 +271,61 @@ function buildAcpServerAgentFactory(deps, options = {}) {
270
271
  };
271
272
  }
272
273
 
274
+ // src/subcommands/handlers/acp-connection-gate.ts
275
+ import { timingSafeEqual } from "node:crypto";
276
+ var OK = { ok: true };
277
+ function isLoopbackHostHeader(rawHost) {
278
+ const trimmed = rawHost.trim();
279
+ if (!trimmed) return false;
280
+ try {
281
+ const hostname = new URL(`http://${trimmed}`).hostname.toLowerCase();
282
+ const bare = hostname.startsWith("[") && hostname.endsWith("]") ? hostname.slice(1, -1) : hostname;
283
+ return bare === "127.0.0.1" || bare === "localhost" || bare === "::1";
284
+ } catch {
285
+ return false;
286
+ }
287
+ }
288
+ function createAcpConnectionGate(opts) {
289
+ const { host, port, token } = opts;
290
+ const maxConnections = opts.maxConnections ?? 8;
291
+ const expected = Buffer.from(token);
292
+ const tokenFromRequest = (req) => {
293
+ const auth = req.headers.authorization;
294
+ if (typeof auth === "string" && auth.toLowerCase().startsWith("bearer ")) {
295
+ return auth.slice(7).trim();
296
+ }
297
+ try {
298
+ return new URL(req.url ?? "/", `http://${host}:${port}`).searchParams.get("token") ?? void 0;
299
+ } catch {
300
+ return void 0;
301
+ }
302
+ };
303
+ const tokenOk = (supplied) => {
304
+ if (!supplied) return false;
305
+ const a = Buffer.from(supplied);
306
+ if (a.length !== expected.length) return false;
307
+ return timingSafeEqual(a, expected);
308
+ };
309
+ return {
310
+ check(req, liveConnections) {
311
+ const origin = req.headers.origin;
312
+ if (origin && origin !== `http://${host}:${port}` && origin !== `ws://${host}:${port}`) {
313
+ return { ok: false, code: 1008, reason: "cross-origin forbidden" };
314
+ }
315
+ if (!isLoopbackHostHeader(req.headers.host ?? "")) {
316
+ return { ok: false, code: 1008, reason: "untrusted host header" };
317
+ }
318
+ if (!tokenOk(tokenFromRequest(req))) {
319
+ return { ok: false, code: 1008, reason: "unauthorized" };
320
+ }
321
+ if (liveConnections >= maxConnections) {
322
+ return { ok: false, code: 1013, reason: "too many connections" };
323
+ }
324
+ return OK;
325
+ }
326
+ };
327
+ }
328
+
273
329
  // src/subcommands/handlers/acp.ts
274
330
  function acpOverrides(deps) {
275
331
  return deps.config.acp?.agents;
@@ -383,13 +439,20 @@ async function runACPWebSocketServer(deps, port) {
383
439
  turnFactory = () => makeACPServerAgentTurn({ agentFor });
384
440
  store = deps.paths?.projectDir ? new ACPSessionStore({ dir: path.join(deps.paths.projectDir, "acp-sessions") }) : void 0;
385
441
  }
442
+ const acpToken = process.env["WRONGSTACK_ACP_TOKEN"]?.trim() || randomBytes(32).toString("hex");
443
+ const gate = createAcpConnectionGate({ host, port, token: acpToken });
444
+ let liveConnections = 0;
386
445
  const wss = new WebSocketServer({ host, port, maxPayload: 20 * 1024 * 1024 });
387
446
  wss.on("connection", (socket, req) => {
388
- const origin = req.headers.origin;
389
- if (origin && origin !== `http://${host}:${port}` && origin !== `ws://${host}:${port}`) {
390
- socket.close(1008, "cross-origin forbidden");
447
+ const verdict = gate.check(req, liveConnections);
448
+ if (!verdict.ok) {
449
+ socket.close(verdict.code ?? 1008, verdict.reason ?? "forbidden");
391
450
  return;
392
451
  }
452
+ liveConnections++;
453
+ socket.once("close", () => {
454
+ liveConnections--;
455
+ });
393
456
  const connectionTurn = turnFactory?.();
394
457
  const transport = new WsBridgeTransport((m) => {
395
458
  const data = JSON.stringify(m);
@@ -427,9 +490,10 @@ async function runACPWebSocketServer(deps, port) {
427
490
  socket.on("close", teardown);
428
491
  socket.on("error", teardown);
429
492
  });
493
+ const acpUrl = `ws://${host}:${port}/?token=${acpToken}`;
430
494
  deps.renderer.writeInfo(
431
- echo ? `ACP server (echo, no provider) listening on ws://${host}:${port}. Press Ctrl+C to stop.
432
- ` : `WrongStack ACP server listening on ws://${host}:${port} (${deps.config.provider}/${deps.config.model}). Press Ctrl+C to stop.
495
+ echo ? `ACP server (echo, no provider) listening on ${acpUrl}. Press Ctrl+C to stop.
496
+ ` : `WrongStack ACP server listening on ${acpUrl} (${deps.config.provider}/${deps.config.model}). Press Ctrl+C to stop.
433
497
  `
434
498
  );
435
499
  await new Promise((resolve) => {
@@ -474,13 +538,17 @@ async function runACPServer(deps) {
474
538
  })()
475
539
  );
476
540
  if (echo) {
477
- deps.renderer.writeInfo("ACP server starting in --echo mode (no-op turn; no provider needed).\n");
541
+ deps.renderer.writeInfo(
542
+ "ACP server starting in --echo mode (no-op turn; no provider needed).\n"
543
+ );
478
544
  } else {
479
545
  deps.renderer.writeInfo(
480
546
  `Starting WrongStack ACP server (${deps.config.provider}/${deps.config.model})\u2026
481
547
  `
482
548
  );
483
- deps.renderer.writeInfo("Waiting for an ACP client connection on stdin/stdout. Press Ctrl+C to stop.\n");
549
+ deps.renderer.writeInfo(
550
+ "Waiting for an ACP client connection on stdin/stdout. Press Ctrl+C to stop.\n"
551
+ );
484
552
  }
485
553
  createGracefulShutdown({
486
554
  run: async () => {
@@ -517,8 +585,10 @@ async function listACPAgents(deps) {
517
585
  `);
518
586
  }
519
587
  for (const a of missing) {
520
- deps.renderer.write(` \u2717 ${a.id.padEnd(16)} ${a.displayName} (${a.reason ?? "not installed"})
521
- `);
588
+ deps.renderer.write(
589
+ ` \u2717 ${a.id.padEnd(16)} ${a.displayName} (${a.reason ?? "not installed"})
590
+ `
591
+ );
522
592
  }
523
593
  deps.renderer.write(`
524
594
  ${installed.length} of ${detected.length} agents available.
@@ -549,8 +619,10 @@ async function syncACPRegistry(deps) {
549
619
  `);
550
620
  return 0;
551
621
  } catch (err) {
552
- deps.renderer.writeError(`ACP registry sync failed: ${err instanceof Error ? err.message : String(err)}
553
- `);
622
+ deps.renderer.writeError(
623
+ `ACP registry sync failed: ${err instanceof Error ? err.message : String(err)}
624
+ `
625
+ );
554
626
  deps.renderer.write("The bundled offline catalog is still available via `wstack acp list`.\n");
555
627
  return 1;
556
628
  }
@@ -700,19 +772,15 @@ async function parallelACPAgents(args, deps) {
700
772
  `[${r.error?.kind ?? "unknown"}] ${r.error?.message ?? "failed"}
701
773
  `
702
774
  );
703
- deps.renderer.write(
704
- `[${r.agentId}] failed ${r.durationMs}ms
705
- `
706
- );
775
+ deps.renderer.write(`[${r.agentId}] failed ${r.durationMs}ms
776
+ `);
707
777
  } else {
708
778
  deps.renderer.writeError(
709
779
  `[${r.error?.kind ?? "aborted"}] ${r.error?.message ?? "cancelled"}
710
780
  `
711
781
  );
712
- deps.renderer.write(
713
- `[${r.agentId}] cancelled ${r.durationMs}ms
714
- `
715
- );
782
+ deps.renderer.write(`[${r.agentId}] cancelled ${r.durationMs}ms
783
+ `);
716
784
  }
717
785
  }
718
786
  const { succeeded, failed, cancelled, skipped: skip } = result.summary;
@@ -821,4 +889,4 @@ ${renderAcpBenchText(result)}
821
889
  export {
822
890
  acpCmd
823
891
  };
824
- //# sourceMappingURL=acp-A5OSIU2P.js.map
892
+ //# sourceMappingURL=acp-S4LZQB66.js.map
@@ -13,12 +13,12 @@ import {
13
13
  runOAuthLoginKind,
14
14
  runOAuthLoginMenu,
15
15
  validateFamily
16
- } from "./chunk-JBTFWWKV.js";
16
+ } from "./chunk-I2BM6FK6.js";
17
17
  import {
18
18
  parseAuthFlags
19
19
  } from "./chunk-JBSQ7ONN.js";
20
20
  import "./chunk-66T43Q4Y.js";
21
- import "./chunk-TADVX644.js";
21
+ import "./chunk-GO3TJICK.js";
22
22
  import {
23
23
  loadConfigProviders,
24
24
  maskedKey,
@@ -501,4 +501,4 @@ async function runAuthRemove(deps, providerId) {
501
501
  export {
502
502
  authCmd
503
503
  };
504
- //# sourceMappingURL=auth-CJWQJVRH.js.map
504
+ //# sourceMappingURL=auth-NLLGEYQR.js.map
@@ -72,6 +72,13 @@ export interface WebUIDispatchContext {
72
72
  getAllSessions(): import('@wrongstack/core/coordination').AgentVirtualSession[];
73
73
  loadSessionsFromDisk(): Promise<import('@wrongstack/core/coordination').AgentVirtualSession[]>;
74
74
  } | undefined;
75
+ /**
76
+ * Pre-computed update info from the CLI's preflight version check.
77
+ * When present, surfaces (WebUI, SimpleUI) receive appVersion,
78
+ * latestVersion, and updateAvailable fields in their session.start
79
+ * payload to display an "update available" warning.
80
+ */
81
+ updateInfo?: import('../webui-server/session-start-payload.js').BootUpdateInfo | undefined;
75
82
  /** Per-task agent factory for the SDD wizard's multi-agent run. */
76
83
  sddSubagentFactory?: import('@wrongstack/core/coordination').AgentFactory | undefined;
77
84
  onKanbanDispatch?: ((description: string, opts?: {
@@ -0,0 +1,3 @@
1
+ export type { GovernanceEvidenceCandidate, GovernanceEvidenceCandidateMissingBinding, GovernanceEvidenceTraceSnapshot, GovernanceToolOutcomeMetadata, } from '@wrongstack/runtime/governance-bootstrap';
2
+ export { createGovernanceEvidenceCandidate, GOVERNANCE_EVIDENCE_CANDIDATE_SCHEMA_VERSION, } from '@wrongstack/runtime/governance-bootstrap';
3
+ //# sourceMappingURL=governance-evidence-candidate.d.ts.map
@@ -0,0 +1,19 @@
1
+ import type { EventBus } from '@wrongstack/core/kernel';
2
+ import type { GovernanceRuntimeObservationInput, GovernanceRuntimeObservationResult } from '@wrongstack/runtime/governance-bootstrap';
3
+ import type { GovernanceTraceContext } from './governance-trace-context.js';
4
+ export interface GovernanceObservationSink {
5
+ observe(input: GovernanceRuntimeObservationInput): Promise<GovernanceRuntimeObservationResult>;
6
+ }
7
+ export interface GovernanceShadowLogger {
8
+ warn(message: string, context?: unknown): void;
9
+ }
10
+ export interface GovernanceShadowBridge {
11
+ close(): void;
12
+ }
13
+ export declare function createGovernanceShadowBridge(input: {
14
+ readonly events: EventBus;
15
+ readonly sink: GovernanceObservationSink;
16
+ readonly logger: GovernanceShadowLogger;
17
+ readonly trace: GovernanceTraceContext;
18
+ }): GovernanceShadowBridge;
19
+ //# sourceMappingURL=governance-shadow-bridge.d.ts.map
@@ -0,0 +1,64 @@
1
+ import type { WorkspaceCheckpointRef } from '@wrongstack/core/types';
2
+ export declare const MAX_GOVERNANCE_PLAN_BYTES: number;
3
+ export declare const MAX_GOVERNANCE_ACTIVE_STEP_IDS = 128;
4
+ export type GovernancePlanTrace = {
5
+ readonly state: 'missing' | 'invalid' | 'unreadable';
6
+ } | {
7
+ readonly state: 'refreshing';
8
+ readonly observedAt: string;
9
+ } | {
10
+ readonly state: 'available';
11
+ readonly schemaVersion: 1;
12
+ readonly fingerprint: string;
13
+ readonly updatedAt?: string | undefined;
14
+ readonly observedAt: string;
15
+ readonly itemCount: number;
16
+ readonly openCount: number;
17
+ readonly inProgressCount: number;
18
+ readonly doneCount: number;
19
+ readonly activeStepIds: readonly string[];
20
+ readonly activeStepIdsTruncated: boolean;
21
+ };
22
+ export type GovernanceWorkspaceTrace = {
23
+ readonly state: 'not_captured';
24
+ } | {
25
+ readonly state: 'unavailable';
26
+ readonly promptIndex: number;
27
+ readonly observedAt: string;
28
+ } | {
29
+ readonly state: 'captured';
30
+ readonly promptIndex: number;
31
+ readonly manifestHash: string;
32
+ readonly baseHead: string;
33
+ readonly entryCount: number;
34
+ readonly unresolvedCount: number;
35
+ readonly capturedAt: string;
36
+ readonly coverage: WorkspaceCheckpointRef['coverage'];
37
+ };
38
+ export interface GovernanceTraceContextSnapshot {
39
+ readonly sessionId: string;
40
+ readonly task: {
41
+ readonly scope: 'session';
42
+ } | {
43
+ readonly scope: 'kanban_task';
44
+ readonly taskId: string;
45
+ readonly boardId: string | null;
46
+ };
47
+ readonly plan: GovernancePlanTrace;
48
+ readonly workspace: GovernanceWorkspaceTrace;
49
+ }
50
+ export interface GovernanceTraceContext {
51
+ matchesPlanPath(candidate: string): boolean;
52
+ refreshPlan(): Promise<GovernancePlanTrace>;
53
+ updateWorkspaceCheckpoint(promptIndex: number, observedAt: string, checkpoint: WorkspaceCheckpointRef | undefined): void;
54
+ snapshot(taskId: string | null, boardId?: string | undefined): GovernanceTraceContextSnapshot;
55
+ }
56
+ export interface GovernanceTraceContextDependencies {
57
+ readonly readFile: (filePath: string) => Promise<string>;
58
+ readonly now: () => string;
59
+ }
60
+ export declare function createGovernanceTraceContext(input: {
61
+ readonly sessionId: string;
62
+ readonly planPath: string;
63
+ }, dependencies?: GovernanceTraceContextDependencies): Promise<GovernanceTraceContext>;
64
+ //# sourceMappingURL=governance-trace-context.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Pre-boot launch banner — the WRONGSTACK brand mark + wordmark rendered
3
+ * as raw ANSI strings for the plain-terminal launch menu.
4
+ *
5
+ * This is a deliberate plain-string twin of the TUI banner
6
+ * (packages/tui/src/components/history/banner.tsx). Importing the TUI
7
+ * component here would drag ink+react into the pre-boot path — which may
8
+ * end up launching WebUI/HQ and never need them. When the TUI glyph
9
+ * tables or palette change, update these in the same commit.
10
+ */
11
+ /** Exported so the menu can decide full vs compact by terminal width. */
12
+ export declare const WORDMARK_WIDTH: number;
13
+ /**
14
+ * Build the launch-screen banner as an array of pre-colored lines
15
+ * (no trailing newlines, no indent — the caller owns placement).
16
+ *
17
+ * Full art (mark + wordmark + tagline) when the terminal is wide enough;
18
+ * a one-line gradient fallback otherwise. Honors NO_COLOR / non-TTY by
19
+ * emitting plain text.
20
+ */
21
+ export declare function launchBannerLines(columns: number, version?: string): string[];
22
+ //# sourceMappingURL=launch-banner.d.ts.map
@@ -1,6 +1,6 @@
1
1
  import type { Agent } from '@wrongstack/core/agent';
2
2
  import type { EventBus } from '@wrongstack/core/kernel';
3
- import type { TokenCounter } from '@wrongstack/core/types';
3
+ import type { ContextSnapshot, TokenCounter } from '@wrongstack/core/types';
4
4
  import type { TuiRuntimeState } from './tui-runtime-state.js';
5
5
  export interface SessionResumeContext {
6
6
  state: TuiRuntimeState;
@@ -14,6 +14,15 @@ export interface SessionResumeResult {
14
14
  entries: unknown[];
15
15
  nextId: number;
16
16
  sessionId: string;
17
+ /**
18
+ * Optional context-window snapshot for the resumed session. `tokens` is a
19
+ * flat `number` (sum of `tokenCounter.currentRequestTokens()?.`'s
20
+ * `{ input, cacheRead, cacheWrite }` fields) — the TUI consumer
21
+ * (`packages/tui/src/reducers/composer.ts:561-577`) reads `tokens` as a
22
+ * flat number and gates on `snap.tokens > 0`. Forwarding the raw object
23
+ * would coerce to NaN and silently drop the snapshot at runtime.
24
+ */
25
+ contextSnapshot?: ContextSnapshot | undefined;
17
26
  }
18
27
  /**
19
28
  * Resume a past session by id.
@@ -0,0 +1,57 @@
1
+ import type { RunResult } from '@wrongstack/core/agent';
2
+ import type { ContentBlock } from '@wrongstack/core/types';
3
+ export interface ChimeraLeaderWakeAgent {
4
+ readonly ctx: {
5
+ activeRunSessionId?: string | undefined;
6
+ session?: {
7
+ id: string;
8
+ } | undefined;
9
+ };
10
+ run(input: string | ContentBlock[], options?: {
11
+ signal?: AbortSignal | undefined;
12
+ }): Promise<RunResult>;
13
+ }
14
+ export interface ChimeraLeaderWakeEvents {
15
+ emitCustom(event: string, payload: unknown): void;
16
+ }
17
+ export interface ChimeraLeaderWakeRequest {
18
+ sessionId: string;
19
+ cwd: string;
20
+ changedFiles: readonly string[];
21
+ structuredReport: string;
22
+ /** Optional stable key supplied by a durable report store. */
23
+ reportId?: string | undefined;
24
+ }
25
+ export interface ChimeraLeaderWakeResult {
26
+ key: string;
27
+ status: RunResult['status'];
28
+ iterations: number;
29
+ finalText?: string | undefined;
30
+ }
31
+ export declare function shouldWakeChimeraLeader(input: {
32
+ autoFix: 'off' | 'ask' | 'auto';
33
+ hasActionableFindings: boolean;
34
+ leaderApproved: boolean;
35
+ reviewLength: number;
36
+ }): boolean;
37
+ export interface ChimeraLeaderWakeQueue {
38
+ enqueue(request: ChimeraLeaderWakeRequest): Promise<ChimeraLeaderWakeResult>;
39
+ }
40
+ export interface CreateChimeraLeaderWakeQueueOptions {
41
+ agent: ChimeraLeaderWakeAgent;
42
+ events: ChimeraLeaderWakeEvents;
43
+ idlePollMs?: number | undefined;
44
+ wakeTimeoutMs?: number | undefined;
45
+ }
46
+ /**
47
+ * Serialize system-originated Chimera follow-ups through the session leader.
48
+ *
49
+ * A Chimera review can finish after the user's turn has returned. Calling
50
+ * `Agent.run()` immediately is unsafe when that turn is still draining, so
51
+ * the queue waits for the agent's pinned run marker to clear and then starts
52
+ * exactly one synthetic follow-up for a report/content key.
53
+ */
54
+ export declare function createChimeraLeaderWakeQueue(options: CreateChimeraLeaderWakeQueueOptions): ChimeraLeaderWakeQueue;
55
+ export declare function chimeraLeaderWakeKey(request: ChimeraLeaderWakeRequest): string;
56
+ export declare function buildChimeraLeaderWakePrompt(request: ChimeraLeaderWakeRequest): string;
57
+ //# sourceMappingURL=chimera-leader-wake.d.ts.map
@@ -1,4 +1,4 @@
1
- import type { SubagentConfig } from '@wrongstack/core/types';
1
+ import type { SubagentConfig, SubagentError, TaskResult } from '@wrongstack/core/types';
2
2
  /**
3
3
  * Resolve the fallback-model chain used when spawning the chimera-review
4
4
  * reviewer subagent.
@@ -25,6 +25,94 @@ export declare function assignReviewerModelsRoundRobin(provider: string, model:
25
25
  model: string;
26
26
  fallbackModels: string[];
27
27
  };
28
+ /** One rung of the Chimera reviewer retry ladder. */
29
+ export interface ReviewerAttempt {
30
+ provider: string;
31
+ model: string;
32
+ /** In-request fallback chain handled inside the subagent for this rung. */
33
+ fallbackModels: string[];
34
+ /**
35
+ * Where the rung came from — an inherited (unpinned) spawn, the round-robin
36
+ * pick, an entry of the active fallback profile, or the session model kept as
37
+ * the guaranteed last resort.
38
+ */
39
+ tier: 'inherit' | 'primary' | 'fallback' | 'session';
40
+ }
41
+ /**
42
+ * Hard cap on reviewer spawns for a single review bundle. Every rung costs a
43
+ * full subagent run, so the ladder is bounded — but the session rung is always
44
+ * kept as the final entry no matter where the cap lands.
45
+ */
46
+ export declare const MAX_REVIEWER_ATTEMPTS = 4;
47
+ /** Per-attempt wall-clock budget for a reviewer spawn. */
48
+ export declare const REVIEWER_ATTEMPT_TIMEOUT_MS = 900000;
49
+ /**
50
+ * Wall-clock budget for the whole ladder. Session shutdown awaits the pending
51
+ * Chimera work, so retries must not turn a 15-minute worst case into an
52
+ * unbounded one — later rungs draw down whatever is left of this budget.
53
+ */
54
+ export declare const REVIEWER_LADDER_BUDGET_MS = 1200000;
55
+ /** Below this the ladder stops: too little left for a rung to say anything. */
56
+ export declare const REVIEWER_MIN_ATTEMPT_MS = 120000;
57
+ /**
58
+ * Build the ordered list of reviewer spawns to try for one review bundle.
59
+ *
60
+ * The first rung reproduces today's assignment exactly, so the happy path is
61
+ * unchanged. The rest exist only for the failure path: the assigned chain, then
62
+ * the session's fallback profile, then the session model itself. A review is
63
+ * never abandoned just because one model was unavailable.
64
+ */
65
+ export declare function buildReviewerAttemptLadder(input: {
66
+ assigned: {
67
+ provider: string;
68
+ model: string;
69
+ fallbackModels?: readonly string[] | undefined;
70
+ };
71
+ /** Active fallback profile chain, appended after the assigned chain. */
72
+ profileChain?: readonly string[] | undefined;
73
+ /** Session provider/model — the guaranteed last resort. */
74
+ session: {
75
+ provider: string;
76
+ model: string;
77
+ };
78
+ maxAttempts?: number | undefined;
79
+ }): ReviewerAttempt[];
80
+ /**
81
+ * Cap for the mutating Chimera agents (fix, cascade). Deliberately tighter than
82
+ * the reviewer's: those agents edit files, so every extra rung re-enters a tree
83
+ * a dead attempt may already have touched. One retry recovers the common case
84
+ * (primary model down or rate-limited) without compounding that risk.
85
+ */
86
+ export declare const MAX_MUTATING_ATTEMPTS = 2;
87
+ /**
88
+ * Ladder for a mutating Chimera agent (fix / cascade).
89
+ *
90
+ * Rung 0 deliberately carries no provider/model: those spawns inherit the role
91
+ * model matrix, and pinning a model here would silently override it. Later
92
+ * rungs name a model precisely because the inherited one just failed.
93
+ */
94
+ export declare function buildMutatingAgentLadder(input: {
95
+ profileChain?: readonly string[] | undefined;
96
+ session: {
97
+ provider: string;
98
+ model: string;
99
+ };
100
+ maxAttempts?: number | undefined;
101
+ }): ReviewerAttempt[];
102
+ /**
103
+ * Should the ladder move to the next rung after this outcome?
104
+ *
105
+ * Anything short of success is worth another model — that is the whole point
106
+ * of the ladder. The exceptions are deliberate stops: a terminated subagent
107
+ * (`stopped`) and a parent abort (Ctrl+C, session teardown), where spawning a
108
+ * replacement would fight the thing that asked us to stop.
109
+ */
110
+ export declare function shouldAdvanceReviewerLadder(status: TaskResult['status'] | undefined, error?: Pick<SubagentError, 'kind'> | undefined): boolean;
111
+ /**
112
+ * Timeout for the next rung: the per-attempt budget, clamped to whatever is
113
+ * left of the ladder budget. Returns 0 when the ladder should stop.
114
+ */
115
+ export declare function reviewerAttemptTimeoutMs(remainingMs: number, attemptTimeoutMs?: number, minAttemptMs?: number): number;
28
116
  /**
29
117
  * Chimera reviewers only inspect code and return a report. They never repair
30
118
  * files themselves; bug-hunter/security-scanner/fix agents own all mutations.
@@ -0,0 +1,72 @@
1
+ import type { SubagentConfig, TaskResult } from '@wrongstack/core/types';
2
+ import { type ReviewerAttempt } from './chimera-reviewer-policy.js';
3
+ import type { ExecuteDeps } from './execute-deps.js';
4
+ type Director = NonNullable<ExecuteDeps['fleet']['director']>;
5
+ /** Display form of a rung — `inherit` rungs have no model of their own. */
6
+ export declare function attemptLabel(attempt: ReviewerAttempt): string;
7
+ /** What went wrong on one rung of a Chimera subagent ladder. */
8
+ export interface LadderAttemptFailure {
9
+ /** `provider/model`, or `inherited model` for an unpinned rung. */
10
+ model: string;
11
+ tier: ReviewerAttempt['tier'];
12
+ /** 1-based rung index. */
13
+ attempt: number;
14
+ /** Human-readable failure summary. */
15
+ reason: string;
16
+ /** True when the rung threw instead of returning a result. */
17
+ threw: boolean;
18
+ /** Tool calls the rung made before dying — non-zero means it may have acted. */
19
+ toolCalls: number;
20
+ }
21
+ export interface LadderRunOutcome {
22
+ /** Terminal result, when a rung produced one. */
23
+ result?: TaskResult | undefined;
24
+ /** Winning subagent, left alive only when `keepWinnerAlive` is set. */
25
+ subagentId?: string | undefined;
26
+ /** 1-based index of the rung that succeeded. */
27
+ wonAt?: number | undefined;
28
+ attemptsUsed: number;
29
+ failures: LadderAttemptFailure[];
30
+ /** Exception from the final rung, when it threw rather than returned. */
31
+ lastError?: unknown;
32
+ }
33
+ export interface LadderRunOptions {
34
+ director: Director;
35
+ ladder: readonly ReviewerAttempt[];
36
+ /** Build the spawn config for a rung. Must apply the rung's model itself. */
37
+ buildConfig: (attempt: ReviewerAttempt, timeoutMs: number) => SubagentConfig;
38
+ /**
39
+ * Build the task text. Receives the failures so far so a mutating agent can
40
+ * be warned that the tree may already hold a dead attempt's partial edits.
41
+ */
42
+ buildTask: (attempt: ReviewerAttempt, failures: readonly LadderAttemptFailure[]) => string;
43
+ /** Per-rung wall-clock budget. */
44
+ attemptTimeoutMs?: number | undefined;
45
+ /** Wall-clock budget for the whole ladder — bounds session shutdown. */
46
+ budgetMs?: number | undefined;
47
+ /**
48
+ * Leave the winning subagent alive for the caller to retire. Failed rungs are
49
+ * always terminated immediately regardless.
50
+ */
51
+ keepWinnerAlive?: boolean | undefined;
52
+ onAttemptFailed?: (failure: LadderAttemptFailure, next: ReviewerAttempt | undefined) => void | Promise<void>;
53
+ onRecovered?: (attempt: ReviewerAttempt, failures: readonly LadderAttemptFailure[]) => void | Promise<void>;
54
+ /** Injectable clock — tests drive the budget without real waiting. */
55
+ now?: () => number;
56
+ }
57
+ /**
58
+ * Run one task down a ladder of models until it succeeds.
59
+ *
60
+ * A Chimera agent must never be abandoned because a single model was
61
+ * unavailable: every rung short of a deliberate stop (`stopped` status, parent
62
+ * abort) advances to the next model, ending on the session model. The ladder is
63
+ * bounded by both rung count and wall clock — session shutdown awaits this work.
64
+ */
65
+ export declare function runSubagentModelLadder(opts: LadderRunOptions): Promise<LadderRunOutcome>;
66
+ /**
67
+ * Preamble for a mutating agent's retry: the tree may already hold a dead
68
+ * attempt's edits, so the successor must re-read before it writes.
69
+ */
70
+ export declare function buildRetryPreamble(failures: readonly LadderAttemptFailure[]): string;
71
+ export {};
72
+ //# sourceMappingURL=chimera-subagent-ladder.d.ts.map
@@ -2,7 +2,7 @@ import {
2
2
  fallbackCodexProviderModels,
3
3
  filterCurrentCodexModelIds,
4
4
  isCodexCatalogModel
5
- } from "./chunk-TADVX644.js";
5
+ } from "./chunk-GO3TJICK.js";
6
6
 
7
7
  // src/acp-registry-cache.ts
8
8
  import {
@@ -208,9 +208,9 @@ Try \`wstack models refresh\` once you have network access, or run with --no-fea
208
208
  }
209
209
 
210
210
  export {
211
- setupProvider,
212
211
  loadCachedAcpRegistry,
213
212
  refreshAcpRegistry,
213
+ setupProvider,
214
214
  createGracefulShutdown
215
215
  };
216
- //# sourceMappingURL=chunk-AZESNNIC.js.map
216
+ //# sourceMappingURL=chunk-4HH3YGG4.js.map