@wrongstack/cli 0.284.1 → 0.285.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 (546) hide show
  1. package/README.md +4 -4
  2. package/dist/acp-registry-cache.d.ts +33 -0
  3. package/dist/acp-registry-cache.d.ts.map +1 -0
  4. package/dist/acp-server-agent.d.ts +66 -0
  5. package/dist/acp-server-agent.d.ts.map +1 -0
  6. package/dist/arg-parser.d.ts +41 -0
  7. package/dist/arg-parser.d.ts.map +1 -0
  8. package/dist/auth-menu/add-provider.d.ts +15 -0
  9. package/dist/auth-menu/add-provider.d.ts.map +1 -0
  10. package/dist/auth-menu/anthropic-oauth.d.ts +43 -0
  11. package/dist/auth-menu/anthropic-oauth.d.ts.map +1 -0
  12. package/dist/auth-menu/auth-menu-audit.d.ts +175 -0
  13. package/dist/auth-menu/auth-menu-audit.d.ts.map +1 -0
  14. package/dist/auth-menu/direct.d.ts +15 -0
  15. package/dist/auth-menu/direct.d.ts.map +1 -0
  16. package/dist/auth-menu/github-copilot-oauth.d.ts +73 -0
  17. package/dist/auth-menu/github-copilot-oauth.d.ts.map +1 -0
  18. package/dist/auth-menu/helpers.d.ts +7 -0
  19. package/dist/auth-menu/helpers.d.ts.map +1 -0
  20. package/dist/auth-menu/index.d.ts +8 -0
  21. package/dist/auth-menu/index.d.ts.map +1 -0
  22. package/dist/auth-menu/local-presets.d.ts +36 -0
  23. package/dist/auth-menu/local-presets.d.ts.map +1 -0
  24. package/dist/auth-menu/local.d.ts +138 -0
  25. package/dist/auth-menu/local.d.ts.map +1 -0
  26. package/dist/auth-menu/oauth-menu.d.ts +10 -0
  27. package/dist/auth-menu/oauth-menu.d.ts.map +1 -0
  28. package/dist/auth-menu/openai-codex-oauth.d.ts +167 -0
  29. package/dist/auth-menu/openai-codex-oauth.d.ts.map +1 -0
  30. package/dist/auth-menu/panel-service.d.ts +32 -0
  31. package/dist/auth-menu/panel-service.d.ts.map +1 -0
  32. package/dist/auth-menu/provider-menu.d.ts +7 -0
  33. package/dist/auth-menu/provider-menu.d.ts.map +1 -0
  34. package/dist/auth-menu/shared.d.ts +32 -0
  35. package/dist/auth-menu/shared.d.ts.map +1 -0
  36. package/dist/auth-menu/top-menu.d.ts +11 -0
  37. package/dist/auth-menu/top-menu.d.ts.map +1 -0
  38. package/dist/auth-menu/types.d.ts +42 -0
  39. package/dist/auth-menu/types.d.ts.map +1 -0
  40. package/dist/auth-menu.d.ts +7 -0
  41. package/dist/auth-menu.d.ts.map +1 -0
  42. package/dist/autophase-host.d.ts +103 -0
  43. package/dist/autophase-host.d.ts.map +1 -0
  44. package/dist/boot/auto-discover-providers.d.ts +20 -0
  45. package/dist/boot/auto-discover-providers.d.ts.map +1 -0
  46. package/dist/boot/brain-decision-log.d.ts +38 -0
  47. package/dist/boot/brain-decision-log.d.ts.map +1 -0
  48. package/dist/boot/container-wiring.d.ts +34 -0
  49. package/dist/boot/container-wiring.d.ts.map +1 -0
  50. package/dist/boot/dispatch-singleshot.d.ts +35 -0
  51. package/dist/boot/dispatch-singleshot.d.ts.map +1 -0
  52. package/dist/boot/dispatch-webui.d.ts +82 -0
  53. package/dist/boot/dispatch-webui.d.ts.map +1 -0
  54. package/dist/boot/event-wiring.d.ts +22 -0
  55. package/dist/boot/event-wiring.d.ts.map +1 -0
  56. package/dist/boot/short-circuit-desktop.d.ts +3 -0
  57. package/dist/boot/short-circuit-desktop.d.ts.map +1 -0
  58. package/dist/boot/short-circuit-flags.d.ts +9 -0
  59. package/dist/boot/short-circuit-flags.d.ts.map +1 -0
  60. package/dist/boot/short-circuit-hq.d.ts +16 -0
  61. package/dist/boot/short-circuit-hq.d.ts.map +1 -0
  62. package/dist/boot/system-prompt-builder.d.ts +91 -0
  63. package/dist/boot/system-prompt-builder.d.ts.map +1 -0
  64. package/dist/boot/system-prompt.d.ts +66 -0
  65. package/dist/boot/system-prompt.d.ts.map +1 -0
  66. package/dist/boot/tool-registry.d.ts +42 -0
  67. package/dist/boot/tool-registry.d.ts.map +1 -0
  68. package/dist/boot/tui-autophase-wiring.d.ts +23 -0
  69. package/dist/boot/tui-autophase-wiring.d.ts.map +1 -0
  70. package/dist/boot/tui-coordinator-setup.d.ts +38 -0
  71. package/dist/boot/tui-coordinator-setup.d.ts.map +1 -0
  72. package/dist/boot/tui-debug-stream.d.ts +18 -0
  73. package/dist/boot/tui-debug-stream.d.ts.map +1 -0
  74. package/dist/boot/tui-live-sessions.d.ts +39 -0
  75. package/dist/boot/tui-live-sessions.d.ts.map +1 -0
  76. package/dist/boot/tui-project-picker-callback.d.ts +30 -0
  77. package/dist/boot/tui-project-picker-callback.d.ts.map +1 -0
  78. package/dist/boot/tui-project-spawn.d.ts +19 -0
  79. package/dist/boot/tui-project-spawn.d.ts.map +1 -0
  80. package/dist/boot/tui-project-switch.d.ts +26 -0
  81. package/dist/boot/tui-project-switch.d.ts.map +1 -0
  82. package/dist/boot/tui-runtime-state.d.ts +83 -0
  83. package/dist/boot/tui-runtime-state.d.ts.map +1 -0
  84. package/dist/boot/tui-sdd-callback.d.ts +20 -0
  85. package/dist/boot/tui-sdd-callback.d.ts.map +1 -0
  86. package/dist/boot/tui-session-resume.d.ts +21 -0
  87. package/dist/boot/tui-session-resume.d.ts.map +1 -0
  88. package/dist/boot/tui-settings-adapter.d.ts +23 -0
  89. package/dist/boot/tui-settings-adapter.d.ts.map +1 -0
  90. package/dist/boot-config.d.ts +26 -0
  91. package/dist/boot-config.d.ts.map +1 -0
  92. package/dist/boot.d.ts +30 -0
  93. package/dist/boot.d.ts.map +1 -0
  94. package/dist/cli-bundled-prompts.d.ts +12 -0
  95. package/dist/cli-bundled-prompts.d.ts.map +1 -0
  96. package/dist/cli-bundled-skills.d.ts +13 -0
  97. package/dist/cli-bundled-skills.d.ts.map +1 -0
  98. package/dist/cli-context.d.ts +30 -0
  99. package/dist/cli-context.d.ts.map +1 -0
  100. package/dist/cli-entry-point.d.ts +2 -0
  101. package/dist/cli-entry-point.d.ts.map +1 -0
  102. package/dist/cli-eternal-flag.d.ts +66 -0
  103. package/dist/cli-eternal-flag.d.ts.map +1 -0
  104. package/dist/cli-main.d.ts +13 -0
  105. package/dist/cli-main.d.ts.map +1 -0
  106. package/dist/cli-recovery-prompt.d.ts +19 -0
  107. package/dist/cli-recovery-prompt.d.ts.map +1 -0
  108. package/dist/cli-update-notice.d.ts +3 -0
  109. package/dist/cli-update-notice.d.ts.map +1 -0
  110. package/dist/config-doctor.d.ts +39 -0
  111. package/dist/config-doctor.d.ts.map +1 -0
  112. package/dist/config-history.d.ts +54 -0
  113. package/dist/config-history.d.ts.map +1 -0
  114. package/dist/context-limit.d.ts +51 -0
  115. package/dist/context-limit.d.ts.map +1 -0
  116. package/dist/context-overflow-diagnostic.d.ts +3 -0
  117. package/dist/context-overflow-diagnostic.d.ts.map +1 -0
  118. package/dist/diff-renderer.d.ts +2 -0
  119. package/dist/diff-renderer.d.ts.map +1 -0
  120. package/dist/execute-deps.d.ts +239 -0
  121. package/dist/execute-deps.d.ts.map +1 -0
  122. package/dist/execution.d.ts +99 -0
  123. package/dist/execution.d.ts.map +1 -0
  124. package/dist/first-run-auth-gate.d.ts +18 -0
  125. package/dist/first-run-auth-gate.d.ts.map +1 -0
  126. package/dist/fleet/host.d.ts +533 -0
  127. package/dist/fleet/host.d.ts.map +1 -0
  128. package/dist/fleet/routing.d.ts +8 -0
  129. package/dist/fleet/routing.d.ts.map +1 -0
  130. package/dist/fleet/status-broadcast.d.ts +42 -0
  131. package/dist/fleet/status-broadcast.d.ts.map +1 -0
  132. package/dist/fleet/supervisor-registry.d.ts +16 -0
  133. package/dist/fleet/supervisor-registry.d.ts.map +1 -0
  134. package/dist/fleet-statusline.d.ts +71 -0
  135. package/dist/fleet-statusline.d.ts.map +1 -0
  136. package/dist/hooks-wiring.d.ts +26 -0
  137. package/dist/hooks-wiring.d.ts.map +1 -0
  138. package/dist/hq-command-controller.d.ts +52 -0
  139. package/dist/hq-command-controller.d.ts.map +1 -0
  140. package/dist/hq-dashboard-html.d.ts +2 -0
  141. package/dist/hq-dashboard-html.d.ts.map +1 -0
  142. package/dist/hq-publisher.d.ts +16 -0
  143. package/dist/hq-publisher.d.ts.map +1 -0
  144. package/dist/hq-server.d.ts +56 -0
  145. package/dist/hq-server.d.ts.map +1 -0
  146. package/dist/hq-static-serve.d.ts +26 -0
  147. package/dist/hq-static-serve.d.ts.map +1 -0
  148. package/dist/index.d.ts +3 -5
  149. package/dist/index.d.ts.map +1 -0
  150. package/dist/index.js +6025 -3952
  151. package/dist/index.js.map +7 -1
  152. package/dist/input-reader.d.ts +45 -0
  153. package/dist/input-reader.d.ts.map +1 -0
  154. package/dist/launch-hints.d.ts +46 -0
  155. package/dist/launch-hints.d.ts.map +1 -0
  156. package/dist/mailbox-bridge-bootstrap.d.ts +85 -0
  157. package/dist/mailbox-bridge-bootstrap.d.ts.map +1 -0
  158. package/dist/mcp-serve.d.ts +23 -0
  159. package/dist/mcp-serve.d.ts.map +1 -0
  160. package/dist/multi-agent.d.ts +4 -0
  161. package/dist/multi-agent.d.ts.map +1 -0
  162. package/dist/next-task-predictor.d.ts +45 -0
  163. package/dist/next-task-predictor.d.ts.map +1 -0
  164. package/dist/permission-prompt.d.ts +11 -0
  165. package/dist/permission-prompt.d.ts.map +1 -0
  166. package/dist/picker.d.ts +86 -0
  167. package/dist/picker.d.ts.map +1 -0
  168. package/dist/plugin-api-factory.d.ts +3 -0
  169. package/dist/plugin-api-factory.d.ts.map +1 -0
  170. package/dist/plugin-management.d.ts +43 -0
  171. package/dist/plugin-management.d.ts.map +1 -0
  172. package/dist/pre-launch/indexing-question.d.ts +28 -0
  173. package/dist/pre-launch/indexing-question.d.ts.map +1 -0
  174. package/dist/pre-launch/launch-prompts.d.ts +52 -0
  175. package/dist/pre-launch/launch-prompts.d.ts.map +1 -0
  176. package/dist/pre-launch/project-check.d.ts +25 -0
  177. package/dist/pre-launch/project-check.d.ts.map +1 -0
  178. package/dist/pre-launch.d.ts +4 -0
  179. package/dist/pre-launch.d.ts.map +1 -0
  180. package/dist/preflight.d.ts +58 -0
  181. package/dist/preflight.d.ts.map +1 -0
  182. package/dist/project-picker.d.ts +56 -0
  183. package/dist/project-picker.d.ts.map +1 -0
  184. package/dist/provider-config-utils.d.ts +58 -0
  185. package/dist/provider-config-utils.d.ts.map +1 -0
  186. package/dist/provider-helpers.d.ts +53 -0
  187. package/dist/provider-helpers.d.ts.map +1 -0
  188. package/dist/renderer.d.ts +76 -0
  189. package/dist/renderer.d.ts.map +1 -0
  190. package/dist/repl.d.ts +162 -0
  191. package/dist/repl.d.ts.map +1 -0
  192. package/dist/services/project-facts.d.ts +17 -0
  193. package/dist/services/project-facts.d.ts.map +1 -0
  194. package/dist/session-event-wiring.d.ts +48 -0
  195. package/dist/session-event-wiring.d.ts.map +1 -0
  196. package/dist/session-stats.d.ts +38 -0
  197. package/dist/session-stats.d.ts.map +1 -0
  198. package/dist/settings-menu.d.ts +87 -0
  199. package/dist/settings-menu.d.ts.map +1 -0
  200. package/dist/shutdown-cleanup.d.ts +44 -0
  201. package/dist/shutdown-cleanup.d.ts.map +1 -0
  202. package/dist/slash-commands/acp.d.ts +23 -0
  203. package/dist/slash-commands/acp.d.ts.map +1 -0
  204. package/dist/slash-commands/agents.d.ts +16 -0
  205. package/dist/slash-commands/agents.d.ts.map +1 -0
  206. package/dist/slash-commands/audit.d.ts +11 -0
  207. package/dist/slash-commands/audit.d.ts.map +1 -0
  208. package/dist/slash-commands/auth.d.ts +20 -0
  209. package/dist/slash-commands/auth.d.ts.map +1 -0
  210. package/dist/slash-commands/autonomy.d.ts +5 -0
  211. package/dist/slash-commands/autonomy.d.ts.map +1 -0
  212. package/dist/slash-commands/autophase.d.ts +13 -0
  213. package/dist/slash-commands/autophase.d.ts.map +1 -0
  214. package/dist/slash-commands/brain.d.ts +4 -0
  215. package/dist/slash-commands/brain.d.ts.map +1 -0
  216. package/dist/slash-commands/btw.d.ts +13 -0
  217. package/dist/slash-commands/btw.d.ts.map +1 -0
  218. package/dist/slash-commands/clear.d.ts +4 -0
  219. package/dist/slash-commands/clear.d.ts.map +1 -0
  220. package/dist/slash-commands/codebase-reindex.d.ts +11 -0
  221. package/dist/slash-commands/codebase-reindex.d.ts.map +1 -0
  222. package/dist/slash-commands/collab.d.ts +26 -0
  223. package/dist/slash-commands/collab.d.ts.map +1 -0
  224. package/dist/slash-commands/commit-llm.d.ts +41 -0
  225. package/dist/slash-commands/commit-llm.d.ts.map +1 -0
  226. package/dist/slash-commands/compact.d.ts +4 -0
  227. package/dist/slash-commands/compact.d.ts.map +1 -0
  228. package/dist/slash-commands/context.d.ts +4 -0
  229. package/dist/slash-commands/context.d.ts.map +1 -0
  230. package/dist/slash-commands/coordinator.d.ts +4 -0
  231. package/dist/slash-commands/coordinator.d.ts.map +1 -0
  232. package/dist/slash-commands/delegate.d.ts +17 -0
  233. package/dist/slash-commands/delegate.d.ts.map +1 -0
  234. package/dist/slash-commands/design.d.ts +16 -0
  235. package/dist/slash-commands/design.d.ts.map +1 -0
  236. package/dist/slash-commands/dev.d.ts +9 -0
  237. package/dist/slash-commands/dev.d.ts.map +1 -0
  238. package/dist/slash-commands/diag-stats.d.ts +5 -0
  239. package/dist/slash-commands/diag-stats.d.ts.map +1 -0
  240. package/dist/slash-commands/dispatch-llm.d.ts +12 -0
  241. package/dist/slash-commands/dispatch-llm.d.ts.map +1 -0
  242. package/dist/slash-commands/doctor.d.ts +13 -0
  243. package/dist/slash-commands/doctor.d.ts.map +1 -0
  244. package/dist/slash-commands/enhance.d.ts +13 -0
  245. package/dist/slash-commands/enhance.d.ts.map +1 -0
  246. package/dist/slash-commands/ensemble.d.ts +17 -0
  247. package/dist/slash-commands/ensemble.d.ts.map +1 -0
  248. package/dist/slash-commands/f-keys.d.ts +18 -0
  249. package/dist/slash-commands/f-keys.d.ts.map +1 -0
  250. package/dist/slash-commands/fallback.d.ts +20 -0
  251. package/dist/slash-commands/fallback.d.ts.map +1 -0
  252. package/dist/slash-commands/fix-classifier.d.ts +28 -0
  253. package/dist/slash-commands/fix-classifier.d.ts.map +1 -0
  254. package/dist/slash-commands/fix.d.ts +4 -0
  255. package/dist/slash-commands/fix.d.ts.map +1 -0
  256. package/dist/slash-commands/fleet.d.ts +20 -0
  257. package/dist/slash-commands/fleet.d.ts.map +1 -0
  258. package/dist/slash-commands/gitid.d.ts +22 -0
  259. package/dist/slash-commands/gitid.d.ts.map +1 -0
  260. package/dist/slash-commands/goal-refiner.d.ts +22 -0
  261. package/dist/slash-commands/goal-refiner.d.ts.map +1 -0
  262. package/dist/slash-commands/goal.d.ts +4 -0
  263. package/dist/slash-commands/goal.d.ts.map +1 -0
  264. package/dist/slash-commands/help.d.ts +4 -0
  265. package/dist/slash-commands/help.d.ts.map +1 -0
  266. package/dist/slash-commands/helpers.d.ts +33 -0
  267. package/dist/slash-commands/helpers.d.ts.map +1 -0
  268. package/dist/slash-commands/hq.d.ts +4 -0
  269. package/dist/slash-commands/hq.d.ts.map +1 -0
  270. package/dist/slash-commands/index.d.ts +524 -0
  271. package/dist/slash-commands/index.d.ts.map +1 -0
  272. package/dist/slash-commands/init.d.ts +4 -0
  273. package/dist/slash-commands/init.d.ts.map +1 -0
  274. package/dist/slash-commands/interrupt.d.ts +15 -0
  275. package/dist/slash-commands/interrupt.d.ts.map +1 -0
  276. package/dist/slash-commands/kanban.d.ts +4 -0
  277. package/dist/slash-commands/kanban.d.ts.map +1 -0
  278. package/dist/slash-commands/mailbox-demo.d.ts +19 -0
  279. package/dist/slash-commands/mailbox-demo.d.ts.map +1 -0
  280. package/dist/slash-commands/mailbox-serve.d.ts +20 -0
  281. package/dist/slash-commands/mailbox-serve.d.ts.map +1 -0
  282. package/dist/slash-commands/mailbox.d.ts +28 -0
  283. package/dist/slash-commands/mailbox.d.ts.map +1 -0
  284. package/dist/slash-commands/mcp-utils.d.ts +24 -0
  285. package/dist/slash-commands/mcp-utils.d.ts.map +1 -0
  286. package/dist/slash-commands/mcp.d.ts +19 -0
  287. package/dist/slash-commands/mcp.d.ts.map +1 -0
  288. package/dist/slash-commands/memory.d.ts +4 -0
  289. package/dist/slash-commands/memory.d.ts.map +1 -0
  290. package/dist/slash-commands/mode.d.ts +6 -0
  291. package/dist/slash-commands/mode.d.ts.map +1 -0
  292. package/dist/slash-commands/modelcaps.d.ts +4 -0
  293. package/dist/slash-commands/modelcaps.d.ts.map +1 -0
  294. package/dist/slash-commands/models.d.ts +23 -0
  295. package/dist/slash-commands/models.d.ts.map +1 -0
  296. package/dist/slash-commands/mouse.d.ts +14 -0
  297. package/dist/slash-commands/mouse.d.ts.map +1 -0
  298. package/dist/slash-commands/next.d.ts +21 -0
  299. package/dist/slash-commands/next.d.ts.map +1 -0
  300. package/dist/slash-commands/plugin.d.ts +4 -0
  301. package/dist/slash-commands/plugin.d.ts.map +1 -0
  302. package/dist/slash-commands/project-utils.d.ts +51 -0
  303. package/dist/slash-commands/project-utils.d.ts.map +1 -0
  304. package/dist/slash-commands/project.d.ts +4 -0
  305. package/dist/slash-commands/project.d.ts.map +1 -0
  306. package/dist/slash-commands/prune.d.ts +4 -0
  307. package/dist/slash-commands/prune.d.ts.map +1 -0
  308. package/dist/slash-commands/review.d.ts +4 -0
  309. package/dist/slash-commands/review.d.ts.map +1 -0
  310. package/dist/slash-commands/sdd/project-context.d.ts +7 -0
  311. package/dist/slash-commands/sdd/project-context.d.ts.map +1 -0
  312. package/dist/slash-commands/sdd/rendering.d.ts +2 -0
  313. package/dist/slash-commands/sdd/rendering.d.ts.map +1 -0
  314. package/dist/slash-commands/sdd/spec-detection.d.ts +21 -0
  315. package/dist/slash-commands/sdd/spec-detection.d.ts.map +1 -0
  316. package/dist/slash-commands/sdd/state.d.ts +40 -0
  317. package/dist/slash-commands/sdd/state.d.ts.map +1 -0
  318. package/dist/slash-commands/sdd/task-manager.d.ts +37 -0
  319. package/dist/slash-commands/sdd/task-manager.d.ts.map +1 -0
  320. package/dist/slash-commands/sdd.d.ts +15 -0
  321. package/dist/slash-commands/sdd.d.ts.map +1 -0
  322. package/dist/slash-commands/security.d.ts +4 -0
  323. package/dist/slash-commands/security.d.ts.map +1 -0
  324. package/dist/slash-commands/session.d.ts +7 -0
  325. package/dist/slash-commands/session.d.ts.map +1 -0
  326. package/dist/slash-commands/setmodel.d.ts +20 -0
  327. package/dist/slash-commands/setmodel.d.ts.map +1 -0
  328. package/dist/slash-commands/settings.d.ts +12 -0
  329. package/dist/slash-commands/settings.d.ts.map +1 -0
  330. package/dist/slash-commands/shadow.d.ts +28 -0
  331. package/dist/slash-commands/shadow.d.ts.map +1 -0
  332. package/dist/slash-commands/slash-deep-help.d.ts +51 -0
  333. package/dist/slash-commands/slash-deep-help.d.ts.map +1 -0
  334. package/dist/slash-commands/spawn-agents.d.ts +6 -0
  335. package/dist/slash-commands/spawn-agents.d.ts.map +1 -0
  336. package/dist/slash-commands/statusline.d.ts +67 -0
  337. package/dist/slash-commands/statusline.d.ts.map +1 -0
  338. package/dist/slash-commands/suggest.d.ts +4 -0
  339. package/dist/slash-commands/suggest.d.ts.map +1 -0
  340. package/dist/slash-commands/suggestion-store.d.ts +29 -0
  341. package/dist/slash-commands/suggestion-store.d.ts.map +1 -0
  342. package/dist/slash-commands/supervisor.d.ts +18 -0
  343. package/dist/slash-commands/supervisor.d.ts.map +1 -0
  344. package/dist/slash-commands/surfaces.d.ts +4 -0
  345. package/dist/slash-commands/surfaces.d.ts.map +1 -0
  346. package/dist/slash-commands/tasks.d.ts +4 -0
  347. package/dist/slash-commands/tasks.d.ts.map +1 -0
  348. package/dist/slash-commands/techstack.d.ts +4 -0
  349. package/dist/slash-commands/techstack.d.ts.map +1 -0
  350. package/dist/slash-commands/telegram-settings.d.ts +4 -0
  351. package/dist/slash-commands/telegram-settings.d.ts.map +1 -0
  352. package/dist/slash-commands/telegram-setup.d.ts +11 -0
  353. package/dist/slash-commands/telegram-setup.d.ts.map +1 -0
  354. package/dist/slash-commands/todos.d.ts +4 -0
  355. package/dist/slash-commands/todos.d.ts.map +1 -0
  356. package/dist/slash-commands/tool.d.ts +4 -0
  357. package/dist/slash-commands/tool.d.ts.map +1 -0
  358. package/dist/slash-commands/tools.d.ts +4 -0
  359. package/dist/slash-commands/tools.d.ts.map +1 -0
  360. package/dist/slash-commands/tuneup.d.ts +15 -0
  361. package/dist/slash-commands/tuneup.d.ts.map +1 -0
  362. package/dist/slash-commands/working-dir.d.ts +14 -0
  363. package/dist/slash-commands/working-dir.d.ts.map +1 -0
  364. package/dist/slash-commands/worktree.d.ts +8 -0
  365. package/dist/slash-commands/worktree.d.ts.map +1 -0
  366. package/dist/slash-commands/yolo.d.ts +4 -0
  367. package/dist/slash-commands/yolo.d.ts.map +1 -0
  368. package/dist/spinner.d.ts +44 -0
  369. package/dist/spinner.d.ts.map +1 -0
  370. package/dist/subcommands/handlers/acp.d.ts +15 -0
  371. package/dist/subcommands/handlers/acp.d.ts.map +1 -0
  372. package/dist/subcommands/handlers/audit.d.ts +12 -0
  373. package/dist/subcommands/handlers/audit.d.ts.map +1 -0
  374. package/dist/subcommands/handlers/auth-local-help.d.ts +69 -0
  375. package/dist/subcommands/handlers/auth-local-help.d.ts.map +1 -0
  376. package/dist/subcommands/handlers/auth.d.ts +3 -0
  377. package/dist/subcommands/handlers/auth.d.ts.map +1 -0
  378. package/dist/subcommands/handlers/bench-run-help.d.ts +145 -0
  379. package/dist/subcommands/handlers/bench-run-help.d.ts.map +1 -0
  380. package/dist/subcommands/handlers/bench.d.ts +13 -0
  381. package/dist/subcommands/handlers/bench.d.ts.map +1 -0
  382. package/dist/subcommands/handlers/config-history.d.ts +10 -0
  383. package/dist/subcommands/handlers/config-history.d.ts.map +1 -0
  384. package/dist/subcommands/handlers/diag-doctor.d.ts +4 -0
  385. package/dist/subcommands/handlers/diag-doctor.d.ts.map +1 -0
  386. package/dist/subcommands/handlers/export.d.ts +3 -0
  387. package/dist/subcommands/handlers/export.d.ts.map +1 -0
  388. package/dist/subcommands/handlers/helpers.d.ts +2 -0
  389. package/dist/subcommands/handlers/helpers.d.ts.map +1 -0
  390. package/dist/subcommands/handlers/hq.d.ts +3 -0
  391. package/dist/subcommands/handlers/hq.d.ts.map +1 -0
  392. package/dist/subcommands/handlers/init.d.ts +7 -0
  393. package/dist/subcommands/handlers/init.d.ts.map +1 -0
  394. package/dist/subcommands/handlers/mailbox-serve.d.ts +3 -0
  395. package/dist/subcommands/handlers/mailbox-serve.d.ts.map +1 -0
  396. package/dist/subcommands/handlers/mcp.d.ts +3 -0
  397. package/dist/subcommands/handlers/mcp.d.ts.map +1 -0
  398. package/dist/subcommands/handlers/modeldiag.d.ts +3 -0
  399. package/dist/subcommands/handlers/modeldiag.d.ts.map +1 -0
  400. package/dist/subcommands/handlers/models-add-help.d.ts +142 -0
  401. package/dist/subcommands/handlers/models-add-help.d.ts.map +1 -0
  402. package/dist/subcommands/handlers/per-subcommand-help.d.ts +136 -0
  403. package/dist/subcommands/handlers/per-subcommand-help.d.ts.map +1 -0
  404. package/dist/subcommands/handlers/plugin-usage.d.ts +4 -0
  405. package/dist/subcommands/handlers/plugin-usage.d.ts.map +1 -0
  406. package/dist/subcommands/handlers/projects.d.ts +3 -0
  407. package/dist/subcommands/handlers/projects.d.ts.map +1 -0
  408. package/dist/subcommands/handlers/providers-models.d.ts +4 -0
  409. package/dist/subcommands/handlers/providers-models.d.ts.map +1 -0
  410. package/dist/subcommands/handlers/quick.d.ts +14 -0
  411. package/dist/subcommands/handlers/quick.d.ts.map +1 -0
  412. package/dist/subcommands/handlers/replay.d.ts +12 -0
  413. package/dist/subcommands/handlers/replay.d.ts.map +1 -0
  414. package/dist/subcommands/handlers/rewind.d.ts +3 -0
  415. package/dist/subcommands/handlers/rewind.d.ts.map +1 -0
  416. package/dist/subcommands/handlers/sessions-config.d.ts +4 -0
  417. package/dist/subcommands/handlers/sessions-config.d.ts.map +1 -0
  418. package/dist/subcommands/handlers/sessions-fleet.d.ts +15 -0
  419. package/dist/subcommands/handlers/sessions-fleet.d.ts.map +1 -0
  420. package/dist/subcommands/handlers/tools-skills.d.ts +4 -0
  421. package/dist/subcommands/handlers/tools-skills.d.ts.map +1 -0
  422. package/dist/subcommands/handlers/update.d.ts +7 -0
  423. package/dist/subcommands/handlers/update.d.ts.map +1 -0
  424. package/dist/subcommands/handlers/version-help.d.ts +4 -0
  425. package/dist/subcommands/handlers/version-help.d.ts.map +1 -0
  426. package/dist/subcommands/index.d.ts +26 -0
  427. package/dist/subcommands/index.d.ts.map +1 -0
  428. package/dist/theme.d.ts +12 -0
  429. package/dist/theme.d.ts.map +1 -0
  430. package/dist/tui-thinking-word.d.ts +5 -0
  431. package/dist/tui-thinking-word.d.ts.map +1 -0
  432. package/dist/tuneup.d.ts +162 -0
  433. package/dist/tuneup.d.ts.map +1 -0
  434. package/dist/update-check.d.ts +22 -0
  435. package/dist/update-check.d.ts.map +1 -0
  436. package/dist/utils/delay-format.d.ts +5 -0
  437. package/dist/utils/delay-format.d.ts.map +1 -0
  438. package/dist/utils/win32-cmd.d.ts +7 -0
  439. package/dist/utils/win32-cmd.d.ts.map +1 -0
  440. package/dist/utils.d.ts +58 -0
  441. package/dist/utils.d.ts.map +1 -0
  442. package/dist/version.d.ts +4 -0
  443. package/dist/version.d.ts.map +1 -0
  444. package/dist/webui-server/client-registration.d.ts +41 -0
  445. package/dist/webui-server/client-registration.d.ts.map +1 -0
  446. package/dist/webui-server/connection-handler.d.ts +59 -0
  447. package/dist/webui-server/connection-handler.d.ts.map +1 -0
  448. package/dist/webui-server/context-breakdown.d.ts +57 -0
  449. package/dist/webui-server/context-breakdown.d.ts.map +1 -0
  450. package/dist/webui-server/cost-helpers.d.ts +29 -0
  451. package/dist/webui-server/cost-helpers.d.ts.map +1 -0
  452. package/dist/webui-server/lifecycle.d.ts +108 -0
  453. package/dist/webui-server/lifecycle.d.ts.map +1 -0
  454. package/dist/webui-server/logger-shim.d.ts +10 -0
  455. package/dist/webui-server/logger-shim.d.ts.map +1 -0
  456. package/dist/webui-server/message-router.d.ts +39 -0
  457. package/dist/webui-server/message-router.d.ts.map +1 -0
  458. package/dist/webui-server/prefs-seeding.d.ts +57 -0
  459. package/dist/webui-server/prefs-seeding.d.ts.map +1 -0
  460. package/dist/webui-server/provider-config.d.ts +61 -0
  461. package/dist/webui-server/provider-config.d.ts.map +1 -0
  462. package/dist/webui-server/session-start-payload.d.ts +20 -0
  463. package/dist/webui-server/session-start-payload.d.ts.map +1 -0
  464. package/dist/webui-server/session-status-poll.d.ts +14 -0
  465. package/dist/webui-server/session-status-poll.d.ts.map +1 -0
  466. package/dist/webui-server/setup-events.d.ts +45 -0
  467. package/dist/webui-server/setup-events.d.ts.map +1 -0
  468. package/dist/webui-server/static-serve.d.ts +70 -0
  469. package/dist/webui-server/static-serve.d.ts.map +1 -0
  470. package/dist/webui-server/stream-coalescer.d.ts +41 -0
  471. package/dist/webui-server/stream-coalescer.d.ts.map +1 -0
  472. package/dist/webui-server/ws-handlers/agent-config.d.ts +47 -0
  473. package/dist/webui-server/ws-handlers/agent-config.d.ts.map +1 -0
  474. package/dist/webui-server/ws-handlers/brain.d.ts +36 -0
  475. package/dist/webui-server/ws-handlers/brain.d.ts.map +1 -0
  476. package/dist/webui-server/ws-handlers/connection.d.ts +50 -0
  477. package/dist/webui-server/ws-handlers/connection.d.ts.map +1 -0
  478. package/dist/webui-server/ws-handlers/context.d.ts +55 -0
  479. package/dist/webui-server/ws-handlers/context.d.ts.map +1 -0
  480. package/dist/webui-server/ws-handlers/index.d.ts +60 -0
  481. package/dist/webui-server/ws-handlers/index.d.ts.map +1 -0
  482. package/dist/webui-server/ws-handlers/introspection.d.ts +35 -0
  483. package/dist/webui-server/ws-handlers/introspection.d.ts.map +1 -0
  484. package/dist/webui-server/ws-handlers/kanban.d.ts +41 -0
  485. package/dist/webui-server/ws-handlers/kanban.d.ts.map +1 -0
  486. package/dist/webui-server/ws-handlers/mailbox.d.ts +51 -0
  487. package/dist/webui-server/ws-handlers/mailbox.d.ts.map +1 -0
  488. package/dist/webui-server/ws-handlers/oauth.d.ts +16 -0
  489. package/dist/webui-server/ws-handlers/oauth.d.ts.map +1 -0
  490. package/dist/webui-server/ws-handlers/prefs.d.ts +32 -0
  491. package/dist/webui-server/ws-handlers/prefs.d.ts.map +1 -0
  492. package/dist/webui-server/ws-handlers/process.d.ts +6 -0
  493. package/dist/webui-server/ws-handlers/process.d.ts.map +1 -0
  494. package/dist/webui-server/ws-handlers/projects.d.ts +44 -0
  495. package/dist/webui-server/ws-handlers/projects.d.ts.map +1 -0
  496. package/dist/webui-server/ws-handlers/providers.d.ts +36 -0
  497. package/dist/webui-server/ws-handlers/providers.d.ts.map +1 -0
  498. package/dist/webui-server/ws-handlers/sessions.d.ts +38 -0
  499. package/dist/webui-server/ws-handlers/sessions.d.ts.map +1 -0
  500. package/dist/webui-server/ws-handlers/worklist.d.ts +49 -0
  501. package/dist/webui-server/ws-handlers/worklist.d.ts.map +1 -0
  502. package/dist/webui-server.d.ts +160 -0
  503. package/dist/webui-server.d.ts.map +1 -0
  504. package/dist/wiring/brain-and-orchestration.d.ts +63 -0
  505. package/dist/wiring/brain-and-orchestration.d.ts.map +1 -0
  506. package/dist/wiring/codebase-index.d.ts +33 -0
  507. package/dist/wiring/codebase-index.d.ts.map +1 -0
  508. package/dist/wiring/controllers.d.ts +46 -0
  509. package/dist/wiring/controllers.d.ts.map +1 -0
  510. package/dist/wiring/dep-watcher.d.ts +23 -0
  511. package/dist/wiring/dep-watcher.d.ts.map +1 -0
  512. package/dist/wiring/design-studio.d.ts +17 -0
  513. package/dist/wiring/design-studio.d.ts.map +1 -0
  514. package/dist/wiring/director-setup.d.ts +51 -0
  515. package/dist/wiring/director-setup.d.ts.map +1 -0
  516. package/dist/wiring/hq-telemetry.d.ts +42 -0
  517. package/dist/wiring/hq-telemetry.d.ts.map +1 -0
  518. package/dist/wiring/lifecycle-plugins.d.ts +58 -0
  519. package/dist/wiring/lifecycle-plugins.d.ts.map +1 -0
  520. package/dist/wiring/mailbox-bridge-bootstrap.d.ts +53 -0
  521. package/dist/wiring/mailbox-bridge-bootstrap.d.ts.map +1 -0
  522. package/dist/wiring/metrics.d.ts +21 -0
  523. package/dist/wiring/metrics.d.ts.map +1 -0
  524. package/dist/wiring/pipeline.d.ts +96 -0
  525. package/dist/wiring/pipeline.d.ts.map +1 -0
  526. package/dist/wiring/plugins.d.ts +108 -0
  527. package/dist/wiring/plugins.d.ts.map +1 -0
  528. package/dist/wiring/provider-runtime-setup.d.ts +47 -0
  529. package/dist/wiring/provider-runtime-setup.d.ts.map +1 -0
  530. package/dist/wiring/provider-runtime.d.ts +57 -0
  531. package/dist/wiring/provider-runtime.d.ts.map +1 -0
  532. package/dist/wiring/provider.d.ts +13 -0
  533. package/dist/wiring/provider.d.ts.map +1 -0
  534. package/dist/wiring/replay.d.ts +32 -0
  535. package/dist/wiring/replay.d.ts.map +1 -0
  536. package/dist/wiring/session.d.ts +56 -0
  537. package/dist/wiring/session.d.ts.map +1 -0
  538. package/dist/wiring/slash-commands.d.ts +74 -0
  539. package/dist/wiring/slash-commands.d.ts.map +1 -0
  540. package/dist/wiring/super-memory.d.ts +9 -0
  541. package/dist/wiring/super-memory.d.ts.map +1 -0
  542. package/dist/wiring/to-execute-deps.d.ts +11 -0
  543. package/dist/wiring/to-execute-deps.d.ts.map +1 -0
  544. package/dist/wiring/tools.d.ts +41 -0
  545. package/dist/wiring/tools.d.ts.map +1 -0
  546. package/package.json +20 -20
@@ -0,0 +1,38 @@
1
+ /**
2
+ * brain-decision-log — last-N decision log subscription for /brain status.
3
+ *
4
+ * Pulled out of cli-main.ts as part of PR 8 (Stage 1 of the cli-main split
5
+ * refactor; see `next-1.md`). The Brain publishes four events
6
+ * (`brain.decision_answered`, `brain.decision_ask_human`, `brain.decision_denied`,
7
+ * `brain.intervention`); this module owns the rolling 20-entry buffer that
8
+ * `/brain` reads from to render a compact status line.
9
+ *
10
+ * The host wires this up once at boot and retains a reference to `brainLog`
11
+ * (and indirectly `pushBrainLog`) for the duration of the session.
12
+ */
13
+ export type BrainDecisionKind = 'answered' | 'ask_human' | 'denied' | 'intervention';
14
+ export interface BrainDecisionEntry {
15
+ at: number;
16
+ kind: BrainDecisionKind;
17
+ question: string;
18
+ outcome: string;
19
+ }
20
+ /**
21
+ * Subscribe to the four brain.* decision events and maintain a rolling
22
+ * 20-entry ring buffer. Caller retains the returned `brainLog` array; the
23
+ * returned `pushBrainLog` lets external code (e.g. slash-command handlers)
24
+ * append additional entries that should appear in /brain status.
25
+ *
26
+ * The returned `dispose` unregisters all four listeners — cli-main.ts wires
27
+ * it into its existing `teardownHandlers` so REPL/TUI re-entry doesn't leak.
28
+ *
29
+ * The events emitter uses EventBus's typed `.on(name, listener)` API; we
30
+ * cast at the call site because the EventBus generic constraint is
31
+ * narrower than the dynamic string event names we register here.
32
+ */
33
+ export declare function subscribeBrainDecisionLog(events: any): {
34
+ brainLog: BrainDecisionEntry[];
35
+ pushBrainLog: (entry: BrainDecisionEntry) => void;
36
+ dispose: () => void;
37
+ };
38
+ //# sourceMappingURL=brain-decision-log.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"brain-decision-log.d.ts","sourceRoot":"","sources":["../../src/boot/brain-decision-log.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,iBAAiB,GAAG,UAAU,GAAG,WAAW,GAAG,QAAQ,GAAG,cAAc,CAAC;AAErF,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,iBAAiB,CAAC;IACxB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAID;;;;;;;;;;;;GAYG;AACH,wBAAgB,yBAAyB,CAEvC,MAAM,EAAE,GAAG,GACV;IACD,QAAQ,EAAE,kBAAkB,EAAE,CAAC;IAC/B,YAAY,EAAE,CAAC,KAAK,EAAE,kBAAkB,KAAK,IAAI,CAAC;IAClD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAiFA"}
@@ -0,0 +1,34 @@
1
+ import type { Config, EventBus, Logger, Renderer, ModelsRegistry, WstackPaths } from '@wrongstack/core';
2
+ import { DefaultPathResolver } from '@wrongstack/core/infrastructure';
3
+ import { createDefaultContainer } from '@wrongstack/runtime';
4
+ import { makePromptDelegate } from '../permission-prompt.js';
5
+ export interface WireContainerDeps {
6
+ config: Config;
7
+ wpaths: WstackPaths;
8
+ cwd: string;
9
+ logger: Logger;
10
+ reader: Parameters<typeof makePromptDelegate>[0];
11
+ renderer: Renderer;
12
+ modelsRegistry: ModelsRegistry;
13
+ yoloDestructive: boolean;
14
+ confirmDestructive: boolean;
15
+ }
16
+ /**
17
+ * Build the PathResolver, create the EventBus, call
18
+ * `createDefaultContainer(...)`, then bind the bootstrap-level
19
+ * services (PathResolver, Renderer, InputReader) on top.
20
+ * Returns the new `events` bus alongside the container so main()
21
+ * can keep publishing to it without re-creating one.
22
+ *
23
+ * The function is intentionally synchronous: every input is a
24
+ * plain value or an already-constructed object, so the boot
25
+ * sequence doesn't fork on async here. Async work (e.g. loading
26
+ * the bundled skills dir) happens inside `createDefaultContainer`
27
+ * and is awaited by the caller.
28
+ */
29
+ export declare function wireContainer(deps: WireContainerDeps): {
30
+ pathResolver: InstanceType<typeof DefaultPathResolver>;
31
+ events: EventBus;
32
+ container: ReturnType<typeof createDefaultContainer>;
33
+ };
34
+ //# sourceMappingURL=container-wiring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"container-wiring.d.ts","sourceRoot":"","sources":["../../src/boot/container-wiring.ts"],"names":[],"mappings":"AAuCA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAExG,OAAO,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAI7D,MAAM,WAAW,iBAAiB;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC;IACnB,cAAc,EAAE,cAAc,CAAC;IAC/B,eAAe,EAAE,OAAO,CAAC;IACzB,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG;IACtD,YAAY,EAAE,YAAY,CAAC,OAAO,mBAAmB,CAAC,CAAC;IACvD,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC;CACtD,CAoCA"}
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Single-shot dispatch — extracted from the tail of `execute()`.
3
+ *
4
+ * Follow-up to PR 6 (partial). The single-shot branch runs one
5
+ * `agent.run()` turn from a positional/prompt argument, renders the
6
+ * result, and returns an exit code. It is the simplest of the four
7
+ * dispatch branches: no event loops, no server, no streaming UI —
8
+ * just run, render, exit.
9
+ *
10
+ * Returns the exit code (0 success, 1 failure/max-iterations, 130
11
+ * aborted) so the caller assigns it to its `code` variable without a
12
+ * closure mutation.
13
+ */
14
+ import type { Agent, TokenCounter } from '@wrongstack/core';
15
+ import type { TerminalRenderer } from '../renderer.js';
16
+ export interface SingleShotDispatchContext {
17
+ /** The agent to run. */
18
+ agent: Agent;
19
+ /** Joined positional args forming the query string. */
20
+ query: string;
21
+ /** Parsed top-level CLI flags (e.g. `--output-json`). */
22
+ flags: Record<string, string | boolean>;
23
+ /** Token counter for usage delta computation. */
24
+ tokenCounter: TokenCounter;
25
+ /** Terminal renderer for output. */
26
+ renderer: TerminalRenderer;
27
+ }
28
+ /**
29
+ * Run a single `agent.run()` turn and render the result.
30
+ *
31
+ * Returns the exit code: 0 success, 1 failure or max-iterations, 130
32
+ * aborted.
33
+ */
34
+ export declare function runSingleShotDispatch(ctx: SingleShotDispatchContext): Promise<number>;
35
+ //# sourceMappingURL=dispatch-singleshot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch-singleshot.d.ts","sourceRoot":"","sources":["../../src/boot/dispatch-singleshot.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAIvD,MAAM,WAAW,yBAAyB;IACxC,wBAAwB;IACxB,KAAK,EAAE,KAAK,CAAC;IACb,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,yDAAyD;IACzD,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,iDAAiD;IACjD,YAAY,EAAE,YAAY,CAAC;IAC3B,oCAAoC;IACpC,QAAQ,EAAE,gBAAgB,CAAC;CAC5B;AAED;;;;;GAKG;AACH,wBAAsB,qBAAqB,CACzC,GAAG,EAAE,yBAAyB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAiFjB"}
@@ -0,0 +1,82 @@
1
+ /**
2
+ * WebUI dispatch — extracted from the tail of `execute()`.
3
+ *
4
+ * PR 6 of Issue #29 (partial). The TUI-vs-REPL-vs-WebUI fork at the
5
+ * end of `execute()` is a ~1,600-line `if/else if/else if/else`
6
+ * chain. The WebUI branch is the most self-contained of the four: it
7
+ * constructs a `runWebUI` options object from already-available deps,
8
+ * wires SIGINT handling, and returns an exit code. Extracting it
9
+ * first lets `execute()` shrink by ~100 lines and isolates the
10
+ * WebUI-specific wiring (port resolution, browser banner, recovery
11
+ * lock re-pointing, autonomy forwarding) in a single named module.
12
+ *
13
+ * The TUI branch (~1,388 lines) and the single-shot branch are left
14
+ * inline — they are too deeply coupled to local mutable state for a
15
+ * single-PR extraction.
16
+ */
17
+ import type { Agent, BrainArbiter, Config, EventBus, JournalEntry, MemoryStore, ModelsRegistry, ModeStore, SessionStore, SessionWriter, SkillLoader } from '@wrongstack/core';
18
+ import type { MCPRegistry } from '@wrongstack/mcp';
19
+ import type { TerminalRenderer } from '../renderer.js';
20
+ import type { AutonomyMode } from '../slash-commands/autonomy.js';
21
+ export interface WebUIDispatchContext {
22
+ agent: Agent;
23
+ events: EventBus;
24
+ session: SessionWriter;
25
+ config: Config;
26
+ flags: Record<string, string | boolean>;
27
+ projectRoot: string;
28
+ globalConfigPath: string;
29
+ projectSessionsDir: string;
30
+ modelsRegistry: ModelsRegistry;
31
+ mcpRegistry: MCPRegistry;
32
+ brain: BrainArbiter | undefined;
33
+ brainSettings: {
34
+ maxAutoRisk: import('@wrongstack/core').BrainAutoRisk;
35
+ } | undefined;
36
+ getBrainLog: (() => Array<{
37
+ at: number;
38
+ kind: string;
39
+ question: string;
40
+ outcome: string;
41
+ }>) | undefined;
42
+ subscribeEternalIteration: ((fn: (entry: JournalEntry) => void) => () => void) | undefined;
43
+ sessionStore: SessionStore | undefined;
44
+ memoryStore: MemoryStore | undefined;
45
+ skillLoader: SkillLoader | undefined;
46
+ promptLoader: import('@wrongstack/core').PromptLoader | undefined;
47
+ modeStore: ModeStore | undefined;
48
+ modeId: string | undefined;
49
+ needsSetup: boolean | undefined;
50
+ renderer: TerminalRenderer;
51
+ onAutonomy: ((mode: AutonomyMode) => void) | undefined;
52
+ applyLiveSettings?: ((settings: {
53
+ yolo?: boolean;
54
+ }) => void) | undefined;
55
+ onModelContextResolved?: ((providerId: string, modelId: string, maxContext: number) => void) | undefined;
56
+ activeRecoveryLock: {
57
+ clear: () => Promise<void>;
58
+ write: (sessionId: string) => Promise<void>;
59
+ };
60
+ /** Per-task agent factory for the SDD wizard's multi-agent run. */
61
+ sddSubagentFactory?: import('@wrongstack/core').AgentFactory | undefined;
62
+ onKanbanDispatch?: ((description: string, opts?: {
63
+ provider?: string | undefined;
64
+ model?: string | undefined;
65
+ fallbackModels?: string[] | undefined;
66
+ tools?: string[] | undefined;
67
+ name?: string | undefined;
68
+ allowedCapabilities?: readonly string[] | undefined;
69
+ onDone?: ((result: {
70
+ status: 'completed' | 'failed';
71
+ result?: string | undefined;
72
+ error?: string | undefined;
73
+ }) => void | Promise<void>) | undefined;
74
+ }) => Promise<string>) | undefined;
75
+ }
76
+ /**
77
+ * Run the WebUI server and block until it shuts down.
78
+ *
79
+ * Returns the exit code: 0 on clean shutdown, 1 on server error.
80
+ */
81
+ export declare function runWebUIDispatch(ctx: WebUIDispatchContext): Promise<number>;
82
+ //# sourceMappingURL=dispatch-webui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dispatch-webui.d.ts","sourceRoot":"","sources":["../../src/boot/dispatch-webui.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,KAAK,EACV,KAAK,EACL,YAAY,EACZ,MAAM,EACN,QAAQ,EACR,YAAY,EACZ,WAAW,EACX,cAAc,EACd,SAAS,EACT,YAAY,EACZ,aAAa,EACb,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,QAAQ,CAAC;IACjB,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,WAAW,EAAE,MAAM,CAAC;IACpB,gBAAgB,EAAE,MAAM,CAAC;IACzB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,WAAW,CAAC;IACzB,KAAK,EAAE,YAAY,GAAG,SAAS,CAAC;IAChC,aAAa,EAAE;QAAE,WAAW,EAAE,OAAO,kBAAkB,EAAE,aAAa,CAAA;KAAE,GAAG,SAAS,CAAC;IACrF,WAAW,EACP,CAAC,MAAM,KAAK,CAAC;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,GAC9E,SAAS,CAAC;IACd,yBAAyB,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,YAAY,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3F,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,YAAY,EAAE,OAAO,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAC;IAClE,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,UAAU,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,UAAU,EAAE,CAAC,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACvD,iBAAiB,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAA;KAAE,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzE,sBAAsB,CAAC,EACnB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC,GACnE,SAAS,CAAC;IACd,kBAAkB,EAAE;QAClB,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QAC3B,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;KAC7C,CAAC;IACF,mEAAmE;IACnE,kBAAkB,CAAC,EAAE,OAAO,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAC;IACzE,gBAAgB,CAAC,EACb,CAAC,CACC,WAAW,EAAE,MAAM,EACnB,IAAI,CAAC,EAAE;QACL,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QACtC,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC1B,mBAAmB,CAAC,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,CAAC;QACpD,MAAM,CAAC,EACH,CAAC,CAAC,MAAM,EAAE;YACR,MAAM,EAAE,WAAW,GAAG,QAAQ,CAAC;YAC/B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;YAC5B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;SAC5B,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAC3B,SAAS,CAAC;KACf,KACE,OAAO,CAAC,MAAM,CAAC,CAAC,GACrB,SAAS,CAAC;CACf;AAED;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,oBAAoB,GAAG,OAAO,CAAC,MAAM,CAAC,CAoNjF"}
@@ -0,0 +1,22 @@
1
+ import type { EventBus } from '@wrongstack/core';
2
+ export interface EventWiringRenderer {
3
+ write(text: string): void;
4
+ }
5
+ export type EvOn = (event: string, handler: (...args: any) => void) => void;
6
+ export interface WireEventWiringDeps {
7
+ evOn: EvOn;
8
+ events: EventBus;
9
+ renderer: EventWiringRenderer;
10
+ getProvider: () => string;
11
+ getModel: () => string;
12
+ getSessionId: () => string;
13
+ projectSlug: string;
14
+ getActiveModeId: () => string;
15
+ tuiOwnsScreen: boolean;
16
+ }
17
+ export interface EventWiring {
18
+ setEffectiveMaxContext: (maxContext: number) => void;
19
+ }
20
+ /** Wire CLI spinner, live streaming, and client.status emission. */
21
+ export declare function wireEventWiring(deps: WireEventWiringDeps): EventWiring;
22
+ //# sourceMappingURL=event-wiring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"event-wiring.d.ts","sourceRoot":"","sources":["../../src/boot/event-wiring.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIjD,MAAM,WAAW,mBAAmB;IAClC,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,MAAM,MAAM,IAAI,GAAG,CACjB,KAAK,EAAE,MAAM,EAEb,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,KAAK,IAAI,KAC5B,IAAI,CAAC;AAEV,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,IAAI,CAAC;IACX,MAAM,EAAE,QAAQ,CAAC;IACjB,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,WAAW,EAAE,MAAM,MAAM,CAAC;IAC1B,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB,YAAY,EAAE,MAAM,MAAM,CAAC;IAC3B,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,MAAM,CAAC;IAC9B,aAAa,EAAE,OAAO,CAAC;CACxB;AAED,MAAM,WAAW,WAAW;IAC1B,sBAAsB,EAAE,CAAC,UAAU,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD;AAED,oEAAoE;AACpE,wBAAgB,eAAe,CAAC,IAAI,EAAE,mBAAmB,GAAG,WAAW,CA6JtE"}
@@ -0,0 +1,3 @@
1
+ export declare function stripDesktopLauncherArgs(argv: string[]): string[];
2
+ export declare function handleDesktopShortCircuit(flags: Record<string, string | boolean>, argv: string[]): Promise<number | null>;
3
+ //# sourceMappingURL=short-circuit-desktop.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"short-circuit-desktop.d.ts","sourceRoot":"","sources":["../../src/boot/short-circuit-desktop.ts"],"names":[],"mappings":"AAYA,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,CAUjE;AAED,wBAAsB,yBAAyB,CAC7C,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,EACvC,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAGxB"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Check argv for --help / --version and dispatch directly.
3
+ *
4
+ * Returns 0 when a flag fired, or null when neither was present.
5
+ * The renderer is a stub that writes to stdout — help text is plain
6
+ * `write` calls, no TTY needed.
7
+ */
8
+ export declare function handleHelpVersionShortCircuit(argv: string[]): Promise<number | null>;
9
+ //# sourceMappingURL=short-circuit-flags.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"short-circuit-flags.d.ts","sourceRoot":"","sources":["../../src/boot/short-circuit-flags.ts"],"names":[],"mappings":"AAcA;;;;;;GAMG;AACH,wBAAsB,6BAA6B,CACjD,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAWxB"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * --hq short-circuit — extracted from cli-main.ts.
3
+ *
4
+ * Starts the HQ command center server before boot() — HQ is
5
+ * project-independent. Blocks until SIGINT/SIGTERM.
6
+ *
7
+ * Returns 0 when the HQ flag was present and the server ran, or null
8
+ * when the flag was absent (caller should proceed to boot()).
9
+ */
10
+ /**
11
+ * Check for --hq flag and start the HQ server if present.
12
+ *
13
+ * Returns 0 when the server started, or null when --hq was not set.
14
+ */
15
+ export declare function handleHqShortCircuit(flags: Record<string, string | boolean>): Promise<number | null>;
16
+ //# sourceMappingURL=short-circuit-hq.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"short-circuit-hq.d.ts","sourceRoot":"","sources":["../../src/boot/short-circuit-hq.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AA+DH;;;;GAIG;AACH,wBAAsB,oBAAoB,CACxC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GACtC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+FxB"}
@@ -0,0 +1,91 @@
1
+ import { type TokenSavingTier } from '@wrongstack/core';
2
+ import type { AutonomyMode } from '../slash-commands/autonomy.js';
3
+ export interface MutableRef<T> {
4
+ current: T | undefined;
5
+ }
6
+ /**
7
+ * Paths the SystemPromptBuilder needs from `wpaths`.
8
+ * Kept as a structural subset so the helper doesn't depend
9
+ * on the full WstackPaths shape (which is huge and subject
10
+ * to change).
11
+ */
12
+ export interface SystemPromptBuilderPaths {
13
+ projectGoal: string;
14
+ projectSessions: string;
15
+ globalInstructions?: string | undefined;
16
+ inProjectInstructions?: string | undefined;
17
+ }
18
+ /**
19
+ * Local `path.join`-shaped helper. We don't import `node:path`
20
+ * directly so the unit test doesn't have to mock node modules.
21
+ */
22
+ export interface PathJoiner {
23
+ join(a: string, b: string): string;
24
+ }
25
+ export interface BindSystemPromptBuilderDeps {
26
+ /**
27
+ * The `container` from main(). The helper only calls
28
+ * `container.bind(token, factory)`. To keep the helper
29
+ * testable, the type is structural rather than the
30
+ * concrete `Container` from core.
31
+ */
32
+ container: {
33
+ bind(token: unknown, factory: () => unknown): void;
34
+ };
35
+ modeStore: unknown;
36
+ memoryStore: unknown;
37
+ skillLoader: unknown;
38
+ /** Forward declaration: mutated later in main() by the
39
+ * session bring-up. The contributor's `planPath`
40
+ * callback reads from this ref so the plan path is
41
+ * computed against the current session, not a snapshot. */
42
+ sessionRef: MutableRef<{
43
+ id: string;
44
+ } | undefined>;
45
+ /** Forward declaration: mutated later in main() by the
46
+ * autonomy / eternal engine setup. The contributor's
47
+ * `enabled` callback reads from this ref so the ETERNAL
48
+ * AUTONOMY block is injected only when the current mode
49
+ * is `eternal` or `eternal-parallel`. */
50
+ autonomyModeRef: MutableRef<AutonomyMode>;
51
+ modeId: string;
52
+ modePrompt: string;
53
+ modelCapabilities: {
54
+ maxContextTokens: number;
55
+ supportsTools: boolean;
56
+ supportsVision: boolean;
57
+ supportsReasoning: boolean;
58
+ } | (() => {
59
+ maxContextTokens: number;
60
+ supportsTools: boolean;
61
+ supportsVision: boolean;
62
+ supportsReasoning: boolean;
63
+ } | undefined) | undefined;
64
+ /** `config.features.skills` \u2014 if false, the skillLoader
65
+ * is not passed to the builder. */
66
+ skillsEnabled: boolean;
67
+ /** `config.skills.mode` — `'progressive'` injects only a skill manifest (the agent loads bodies via the `skill` tool). */
68
+ skillMode?: 'eager' | 'progressive' | undefined;
69
+ /** `config.skills.eagerMaxChars` — total skill-body budget in eager mode. */
70
+ skillEagerMaxChars?: number | undefined;
71
+ /** `config.features.tokenSavingMode` — forwarded so prompt guidance matches tool tiering. */
72
+ tokenSavingMode?: TokenSavingTier | boolean | undefined;
73
+ paths: SystemPromptBuilderPaths;
74
+ /** `path.join`-shaped helper from the runtime. */
75
+ pathJoiner: PathJoiner;
76
+ /** The `TOKENS.SystemPromptBuilder` token, opaque to the
77
+ * helper. We just need to call `container.bind(token,
78
+ * factory)`. */
79
+ systemPromptBuilderToken: unknown;
80
+ }
81
+ /**
82
+ * Bind a `DefaultSystemPromptBuilder` factory into the
83
+ * container under the `TOKENS.SystemPromptBuilder` key.
84
+ *
85
+ * The factory closure is lazy \u2014 every time the system
86
+ * prompt is built (once per turn) it reads the *current*
87
+ * `sessionRef.current` and `autonomyModeRef.current`. This
88
+ * matches the pre-refactor inline behavior exactly.
89
+ */
90
+ export declare function bindSystemPromptBuilder(deps: BindSystemPromptBuilderDeps): void;
91
+ //# sourceMappingURL=system-prompt-builder.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-prompt-builder.d.ts","sourceRoot":"","sources":["../../src/boot/system-prompt-builder.ts"],"names":[],"mappings":"AAoDA,OAAO,EAIL,KAAK,eAAe,EACrB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,WAAW,UAAU,CAAC,CAAC;IAC3B,OAAO,EAAE,CAAC,GAAG,SAAS,CAAC;CACxB;AAED;;;;;GAKG;AACH,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C;AAED;;;GAGG;AACH,MAAM,WAAW,UAAU;IACzB,IAAI,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACpC;AAED,MAAM,WAAW,2BAA2B;IAC1C;;;;;OAKG;IACH,SAAS,EAAE;QACT,IAAI,CAAC,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,GAAG,IAAI,CAAC;KACpD,CAAC;IACF,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,WAAW,EAAE,OAAO,CAAC;IACrB;;;gEAG4D;IAC5D,UAAU,EAAE,UAAU,CAAC;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC,CAAC;IACnD;;;;8CAI0C;IAC1C,eAAe,EAAE,UAAU,CAAC,YAAY,CAAC,CAAC;IAC1C,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,iBAAiB,EACb;QACE,gBAAgB,EAAE,MAAM,CAAC;QACzB,aAAa,EAAE,OAAO,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;QACxB,iBAAiB,EAAE,OAAO,CAAC;KAC5B,GACD,CAAC,MACG;QACE,gBAAgB,EAAE,MAAM,CAAC;QACzB,aAAa,EAAE,OAAO,CAAC;QACvB,cAAc,EAAE,OAAO,CAAC;QACxB,iBAAiB,EAAE,OAAO,CAAC;KAC5B,GACD,SAAS,CAAC,GACd,SAAS,CAAC;IACd;wCACoC;IACpC,aAAa,EAAE,OAAO,CAAC;IACvB,0HAA0H;IAC1H,SAAS,CAAC,EAAE,OAAO,GAAG,aAAa,GAAG,SAAS,CAAC;IAChD,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACxC,6FAA6F;IAC7F,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS,CAAC;IACxD,KAAK,EAAE,wBAAwB,CAAC;IAChC,kDAAkD;IAClD,UAAU,EAAE,UAAU,CAAC;IACvB;;qBAEiB;IACjB,wBAAwB,EAAE,OAAO,CAAC;CACnC;AAED;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CAAC,IAAI,EAAE,2BAA2B,GAAG,IAAI,CA6C/E"}
@@ -0,0 +1,66 @@
1
+ import type { Config, Logger, ModelsRegistry } from '@wrongstack/core';
2
+ import type { ProviderRegistry, ResolvedProvider } from '@wrongstack/core';
3
+ export type ModeId = string;
4
+ export type ModePrompt = string;
5
+ export interface ModelCapabilities {
6
+ maxContextTokens: number;
7
+ supportsTools: boolean;
8
+ supportsVision: boolean;
9
+ supportsReasoning: boolean;
10
+ }
11
+ export type ResolvedModeResult = {
12
+ kind: 'ok';
13
+ resolvedProvider: ResolvedProvider;
14
+ providerRegistry: ProviderRegistry;
15
+ provider: ReturnType<ProviderRegistry['create']>;
16
+ modeId: ModeId;
17
+ modePrompt: ModePrompt;
18
+ modelCapabilities: ModelCapabilities | undefined;
19
+ } | {
20
+ kind: 'exit';
21
+ code: 2;
22
+ /** The error message that was written to stderr before
23
+ * the exit. Callers may want to log or display it
24
+ * before tearing down. */
25
+ message: string;
26
+ };
27
+ export interface ResolveModeDeps {
28
+ config: Config;
29
+ modelsRegistry: ModelsRegistry;
30
+ logger: Logger;
31
+ /** Result of `container.resolve(TOKENS.ModeStore).getActiveMode()`. */
32
+ activeMode: {
33
+ id: string;
34
+ prompt: string;
35
+ } | undefined | null;
36
+ }
37
+ /**
38
+ * Run the three resolution steps that the system prompt
39
+ * depends on:
40
+ *
41
+ * 1. `setupProvider({...})` \u2014 picks the provider for this run
42
+ * and returns the resolved `{ provider, providerRegistry,
43
+ * resolvedProvider }` triple. On failure, returns
44
+ * `{ kind: 'exit', code: 2, message }` so the caller can
45
+ * dispatch on the kind without re-implementing the
46
+ * teardown.
47
+ *
48
+ * 2. `capabilitiesFor(...)` + `modelsRegistry.getModel(...)`
49
+ * \u2014 run in parallel via `Promise.all` so the slow
50
+ * `getModel` doesn't block the (usually fast) `capabilitiesFor`
51
+ * or vice-versa. If either fails, we fall back to
52
+ * `undefined` modelCapabilities rather than crashing;
53
+ * the system prompt builder treats undefined as
54
+ * "don't include the model-aware hints".
55
+ *
56
+ * 3. Mode id + mode prompt extraction \u2014 falls back to
57
+ * `'default'` mode and an empty prompt when there's no
58
+ * active mode. The fallback is identical to the
59
+ * pre-refactor inline logic.
60
+ *
61
+ * The function is `async` because both `setupProvider` and
62
+ * `capabilitiesFor` are async. The caller awaits the result
63
+ * and dispatches on `result.kind`.
64
+ */
65
+ export declare function resolveModeAndCapabilities(deps: ResolveModeDeps): Promise<ResolvedModeResult>;
66
+ //# sourceMappingURL=system-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"system-prompt.d.ts","sourceRoot":"","sources":["../../src/boot/system-prompt.ts"],"names":[],"mappings":"AAgDA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvE,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAI3E,MAAM,MAAM,MAAM,GAAG,MAAM,CAAC;AAC5B,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC;AAEhC,MAAM,WAAW,iBAAiB;IAChC,gBAAgB,EAAE,MAAM,CAAC;IACzB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;CAC5B;AAED,MAAM,MAAM,kBAAkB,GAC1B;IACE,IAAI,EAAE,IAAI,CAAC;IACX,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,QAAQ,EAAE,UAAU,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC,CAAC;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,UAAU,CAAC;IACvB,iBAAiB,EAAE,iBAAiB,GAAG,SAAS,CAAC;CAClD,GACD;IACE,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,CAAC,CAAC;IACR;;+BAE2B;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEN,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,uEAAuE;IACvE,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,GAAG,IAAI,CAAC;CAC/D;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,wBAAsB,0BAA0B,CAC9C,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,kBAAkB,CAAC,CAoE7B"}
@@ -0,0 +1,42 @@
1
+ import type { EventBus, MemoryStore, ToolDescriptionModeConfig, ToolRegistry, ToolResultRenderModeConfig, WstackPaths } from '@wrongstack/core';
2
+ import type { TokenSavingTier } from '@wrongstack/core';
3
+ export interface RegisterBuiltinToolsDeps {
4
+ toolRegistry: ToolRegistry;
5
+ compactor: unknown;
6
+ config: {
7
+ features: {
8
+ memory: boolean;
9
+ tokenSavingMode?: TokenSavingTier | boolean | undefined;
10
+ };
11
+ tools?: {
12
+ descriptionMode?: ToolDescriptionModeConfig | undefined;
13
+ resultRenderMode?: ToolResultRenderModeConfig | undefined;
14
+ disabledTools?: string[] | undefined;
15
+ exec?: {
16
+ allow?: string[] | undefined;
17
+ deny?: string[] | undefined;
18
+ danger?: {
19
+ bypass?: string[] | undefined;
20
+ } | undefined;
21
+ } | undefined;
22
+ } | undefined;
23
+ git?: {
24
+ identity?: {
25
+ name?: string | undefined;
26
+ email?: string | undefined;
27
+ } | undefined;
28
+ } | undefined;
29
+ };
30
+ memoryStore: MemoryStore | null | undefined;
31
+ events: EventBus;
32
+ wpaths: Pick<WstackPaths, 'projectDir'>;
33
+ }
34
+ /**
35
+ * Register the inline tool set: context manager + memory
36
+ * tools (if features.memory) + mailbox tools. The mailbox
37
+ * tools are always registered \u2014 they are needed for
38
+ * inter-agent coordination regardless of the per-session
39
+ * memory feature flag.
40
+ */
41
+ export declare function registerBuiltinTools(deps: RegisterBuiltinToolsDeps): void;
42
+ //# sourceMappingURL=tool-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-registry.d.ts","sourceRoot":"","sources":["../../src/boot/tool-registry.ts"],"names":[],"mappings":"AA2CA,OAAO,KAAK,EACV,QAAQ,EACR,WAAW,EACX,yBAAyB,EACzB,YAAY,EACZ,0BAA0B,EAC1B,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAI1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAGxD,MAAM,WAAW,wBAAwB;IACvC,YAAY,EAAE,YAAY,CAAC;IAC3B,SAAS,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE;QACN,QAAQ,EAAE;YAAE,MAAM,EAAE,OAAO,CAAC;YAAC,eAAe,CAAC,EAAE,eAAe,GAAG,OAAO,GAAG,SAAS,CAAA;SAAE,CAAC;QACvF,KAAK,CAAC,EACF;YACE,eAAe,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;YACxD,gBAAgB,CAAC,EAAE,0BAA0B,GAAG,SAAS,CAAC;YAC1D,aAAa,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;YACrC,IAAI,CAAC,EACD;gBACE,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAC7B,IAAI,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;gBAC5B,MAAM,CAAC,EAAE;oBAAE,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAA;iBAAE,GAAG,SAAS,CAAC;aACxD,GACD,SAAS,CAAC;SACf,GACD,SAAS,CAAC;QACd,GAAG,CAAC,EACA;YAAE,QAAQ,CAAC,EAAE;gBAAE,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;gBAAC,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;aAAE,GAAG,SAAS,CAAA;SAAE,GACpF,SAAS,CAAC;KACf,CAAC;IACF,WAAW,EAAE,WAAW,GAAG,IAAI,GAAG,SAAS,CAAC;IAC5C,MAAM,EAAE,QAAQ,CAAC;IACjB,MAAM,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,CAAC,CAAC;CACzC;AAuBD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,wBAAwB,GAAG,IAAI,CA4EzE"}
@@ -0,0 +1,23 @@
1
+ import type { EventBus } from '@wrongstack/core';
2
+ export interface AutoPhaseWiring {
3
+ /**
4
+ * Called by the TUI to receive forwarded events. Each call registers
5
+ * one listener per event name; the returned function unregisters all.
6
+ */
7
+ subscribe: (handler: (event: string, payload: unknown) => void) => () => void;
8
+ /** Remove all listeners. Safe to call multiple times. */
9
+ cleanup: () => void;
10
+ }
11
+ /**
12
+ * Wire AutoPhase event forwarding on the given EventBus.
13
+ *
14
+ * AutoPhase events are emitted on the untyped surface of the bus (the
15
+ * orchestrator casts `emit` to a string-keyed signature), so we subscribe
16
+ * through the same untyped view rather than the typed event-name overloads.
17
+ *
18
+ * Bind to `events` — pulling the method off the bus as a bare reference
19
+ * loses `this`, so `on`/`off` would read `this.listeners` off `undefined`
20
+ * and throw the moment AutoPhase subscribes.
21
+ */
22
+ export declare function wireAutoPhase(events: EventBus): AutoPhaseWiring;
23
+ //# sourceMappingURL=tui-autophase-wiring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-autophase-wiring.d.ts","sourceRoot":"","sources":["../../src/boot/tui-autophase-wiring.ts"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAsBjD,MAAM,WAAW,eAAe;IAC9B;;;OAGG;IACH,SAAS,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,KAAK,MAAM,IAAI,CAAC;IAC9E,yDAAyD;IACzD,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,aAAa,CAAC,MAAM,EAAE,QAAQ,GAAG,eAAe,CAkC/D"}
@@ -0,0 +1,38 @@
1
+ import { AutonomousCoordinator, type Context, type Director, type EventBus } from '@wrongstack/core';
2
+ import type { WstackPaths } from '@wrongstack/core';
3
+ import type { TuiRuntimeState } from './tui-runtime-state.js';
4
+ export interface CoordinatorSetupContext {
5
+ /** The shared mutable runtime state. */
6
+ state: TuiRuntimeState;
7
+ /** The main EventBus — used for the Director lifecycle hook. */
8
+ events: EventBus;
9
+ /** The agent's Context — provides provider, model, session id, transcript path. */
10
+ context: Context;
11
+ /** Resolved WrongStack paths — used for session-dir resolution. */
12
+ wpaths: WstackPaths;
13
+ /** The mailbox — cast to the core Mailbox interface for the coordinator. */
14
+ mailbox: unknown;
15
+ /** The Director (may be null — coordinator waits for lazy spawn). */
16
+ director: Director | null | undefined;
17
+ /** Optional getter for a lazily-created Director. */
18
+ getDirector: (() => Director | null | undefined) | undefined;
19
+ /** The mutable controller object slash commands read/write. */
20
+ coordinatorController: Record<string, unknown> | undefined;
21
+ /** Set by this module so execute()'s finally block can stop the coordinator. */
22
+ onCoordinatorStopSetter: (fn: (() => void) | undefined) => void;
23
+ }
24
+ export interface CoordinatorSetupResult {
25
+ /** The ensureAutonomousCoordinator function (idempotent). */
26
+ ensure: () => AutonomousCoordinator | null;
27
+ /** Call to remove the Director lifecycle listener (for TUI cleanup). */
28
+ cleanup: () => void;
29
+ }
30
+ /**
31
+ * Wire the AutonomousCoordinator and its Director lifecycle hook.
32
+ *
33
+ * Returns the `ensure` function (idempotent — returns the existing
34
+ * coordinator if already created) and a `cleanup` function that removes
35
+ * the event listener.
36
+ */
37
+ export declare function setupAutonomousCoordinator(ctx: CoordinatorSetupContext): CoordinatorSetupResult;
38
+ //# sourceMappingURL=tui-coordinator-setup.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-coordinator-setup.d.ts","sourceRoot":"","sources":["../../src/boot/tui-coordinator-setup.ts"],"names":[],"mappings":"AAmBA,OAAO,EACL,qBAAqB,EACrB,KAAK,OAAO,EACZ,KAAK,QAAQ,EACb,KAAK,QAAQ,EAGd,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,uBAAuB;IACtC,wCAAwC;IACxC,KAAK,EAAE,eAAe,CAAC;IACvB,gEAAgE;IAChE,MAAM,EAAE,QAAQ,CAAC;IACjB,mFAAmF;IACnF,OAAO,EAAE,OAAO,CAAC;IACjB,mEAAmE;IACnE,MAAM,EAAE,WAAW,CAAC;IACpB,4EAA4E;IAC5E,OAAO,EAAE,OAAO,CAAC;IACjB,qEAAqE;IACrE,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,qDAAqD;IACrD,WAAW,EAAE,CAAC,MAAM,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC,GAAG,SAAS,CAAC;IAC7D,+DAA+D;IAC/D,qBAAqB,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;IAC3D,gFAAgF;IAChF,uBAAuB,EAAE,CAAC,EAAE,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC;CACjE;AAED,MAAM,WAAW,sBAAsB;IACrC,6DAA6D;IAC7D,MAAM,EAAE,MAAM,qBAAqB,GAAG,IAAI,CAAC;IAC3C,wEAAwE;IACxE,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED;;;;;;GAMG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,uBAAuB,GAC3B,sBAAsB,CA4KxB"}
@@ -0,0 +1,18 @@
1
+ /**
2
+ * TUI debug-stream callbacks — extracted from the runTui() options literal.
3
+ *
4
+ * Phase C step 6. registerDebugStreamCallback swaps the debug-stream
5
+ * callback from stderr → TUI reducer; restoreDebugStreamCallback reverts
6
+ * to the default on TUI unmount. Both are pure delegates to
7
+ * @wrongstack/providers with structured error logging.
8
+ */
9
+ /**
10
+ * Swap the debug-stream callback to the TUI reducer.
11
+ * Restored on TUI unmount via restoreDebugStreamCallback.
12
+ */
13
+ export declare function registerDebugStreamCallback(cb: import('@wrongstack/providers').DebugStreamCallback): Promise<void>;
14
+ /**
15
+ * Restore the default debug-stream callback (stderr).
16
+ */
17
+ export declare function restoreDebugStreamCallback(): Promise<void>;
18
+ //# sourceMappingURL=tui-debug-stream.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-debug-stream.d.ts","sourceRoot":"","sources":["../../src/boot/tui-debug-stream.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,wBAAsB,2BAA2B,CAC/C,EAAE,EAAE,OAAO,uBAAuB,EAAE,mBAAmB,GACtD,OAAO,CAAC,IAAI,CAAC,CAcf;AAED;;GAEG;AACH,wBAAsB,0BAA0B,IAAI,OAAO,CAAC,IAAI,CAAC,CAgBhE"}
@@ -0,0 +1,39 @@
1
+ import type { TuiRuntimeState } from './tui-runtime-state.js';
2
+ export interface LiveSessionsContext {
3
+ state: TuiRuntimeState;
4
+ }
5
+ /**
6
+ * List live sessions from the global SessionRegistry.
7
+ * Filters out 'stale' entries. Called when the F10 sessions panel opens.
8
+ */
9
+ export declare function getLiveSessions(ctx: LiveSessionsContext): Promise<{
10
+ sessionId: string;
11
+ projectName: string;
12
+ projectSlug: string;
13
+ projectRoot: string;
14
+ workingDir: string;
15
+ gitBranch: string | undefined;
16
+ status: import("@wrongstack/core").SessionLiveStatus;
17
+ pid: number;
18
+ startedAt: string;
19
+ agentCount: number;
20
+ agents: {
21
+ id: string;
22
+ name: string;
23
+ status: import("@wrongstack/core").AgentLiveStatus;
24
+ currentTool: string | undefined;
25
+ iterations: number;
26
+ toolCalls: number;
27
+ lastActivityAt: string;
28
+ }[];
29
+ }[]>;
30
+ /**
31
+ * Record a pending project switch for a live session.
32
+ *
33
+ * Deliberately NOT `--resume <sessionId>`: the F10 panel lists LIVE
34
+ * sessions (their owner processes are alive — 'stale' is filtered out),
35
+ * and resuming one would put two processes on the same session JSONL.
36
+ * We open the target project fresh instead.
37
+ */
38
+ export declare function onSwitchToSession(ctx: LiveSessionsContext, _sessionId: string, targetRoot: string, projectName: string): void;
39
+ //# sourceMappingURL=tui-live-sessions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-live-sessions.d.ts","sourceRoot":"","sources":["../../src/boot/tui-live-sessions.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,eAAe,CAAC;CACxB;AAED;;;GAGG;AACH,wBAAsB,eAAe,CAAC,GAAG,EAAE,mBAAmB;;;;;;;;;;;;;;;;;;;;KA4B7D;AAED;;;;;;;GAOG;AACH,wBAAgB,iBAAiB,CAC/B,GAAG,EAAE,mBAAmB,EACxB,UAAU,EAAE,MAAM,EAClB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,IAAI,CAEN"}