@wrongstack/cli 0.284.0 → 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 (547) hide show
  1. package/README.md +4 -4
  2. package/data/providers.json +5 -3
  3. package/dist/acp-registry-cache.d.ts +33 -0
  4. package/dist/acp-registry-cache.d.ts.map +1 -0
  5. package/dist/acp-server-agent.d.ts +66 -0
  6. package/dist/acp-server-agent.d.ts.map +1 -0
  7. package/dist/arg-parser.d.ts +41 -0
  8. package/dist/arg-parser.d.ts.map +1 -0
  9. package/dist/auth-menu/add-provider.d.ts +15 -0
  10. package/dist/auth-menu/add-provider.d.ts.map +1 -0
  11. package/dist/auth-menu/anthropic-oauth.d.ts +43 -0
  12. package/dist/auth-menu/anthropic-oauth.d.ts.map +1 -0
  13. package/dist/auth-menu/auth-menu-audit.d.ts +175 -0
  14. package/dist/auth-menu/auth-menu-audit.d.ts.map +1 -0
  15. package/dist/auth-menu/direct.d.ts +15 -0
  16. package/dist/auth-menu/direct.d.ts.map +1 -0
  17. package/dist/auth-menu/github-copilot-oauth.d.ts +73 -0
  18. package/dist/auth-menu/github-copilot-oauth.d.ts.map +1 -0
  19. package/dist/auth-menu/helpers.d.ts +7 -0
  20. package/dist/auth-menu/helpers.d.ts.map +1 -0
  21. package/dist/auth-menu/index.d.ts +8 -0
  22. package/dist/auth-menu/index.d.ts.map +1 -0
  23. package/dist/auth-menu/local-presets.d.ts +36 -0
  24. package/dist/auth-menu/local-presets.d.ts.map +1 -0
  25. package/dist/auth-menu/local.d.ts +138 -0
  26. package/dist/auth-menu/local.d.ts.map +1 -0
  27. package/dist/auth-menu/oauth-menu.d.ts +10 -0
  28. package/dist/auth-menu/oauth-menu.d.ts.map +1 -0
  29. package/dist/auth-menu/openai-codex-oauth.d.ts +167 -0
  30. package/dist/auth-menu/openai-codex-oauth.d.ts.map +1 -0
  31. package/dist/auth-menu/panel-service.d.ts +32 -0
  32. package/dist/auth-menu/panel-service.d.ts.map +1 -0
  33. package/dist/auth-menu/provider-menu.d.ts +7 -0
  34. package/dist/auth-menu/provider-menu.d.ts.map +1 -0
  35. package/dist/auth-menu/shared.d.ts +32 -0
  36. package/dist/auth-menu/shared.d.ts.map +1 -0
  37. package/dist/auth-menu/top-menu.d.ts +11 -0
  38. package/dist/auth-menu/top-menu.d.ts.map +1 -0
  39. package/dist/auth-menu/types.d.ts +42 -0
  40. package/dist/auth-menu/types.d.ts.map +1 -0
  41. package/dist/auth-menu.d.ts +7 -0
  42. package/dist/auth-menu.d.ts.map +1 -0
  43. package/dist/autophase-host.d.ts +103 -0
  44. package/dist/autophase-host.d.ts.map +1 -0
  45. package/dist/boot/auto-discover-providers.d.ts +20 -0
  46. package/dist/boot/auto-discover-providers.d.ts.map +1 -0
  47. package/dist/boot/brain-decision-log.d.ts +38 -0
  48. package/dist/boot/brain-decision-log.d.ts.map +1 -0
  49. package/dist/boot/container-wiring.d.ts +34 -0
  50. package/dist/boot/container-wiring.d.ts.map +1 -0
  51. package/dist/boot/dispatch-singleshot.d.ts +35 -0
  52. package/dist/boot/dispatch-singleshot.d.ts.map +1 -0
  53. package/dist/boot/dispatch-webui.d.ts +82 -0
  54. package/dist/boot/dispatch-webui.d.ts.map +1 -0
  55. package/dist/boot/event-wiring.d.ts +22 -0
  56. package/dist/boot/event-wiring.d.ts.map +1 -0
  57. package/dist/boot/short-circuit-desktop.d.ts +3 -0
  58. package/dist/boot/short-circuit-desktop.d.ts.map +1 -0
  59. package/dist/boot/short-circuit-flags.d.ts +9 -0
  60. package/dist/boot/short-circuit-flags.d.ts.map +1 -0
  61. package/dist/boot/short-circuit-hq.d.ts +16 -0
  62. package/dist/boot/short-circuit-hq.d.ts.map +1 -0
  63. package/dist/boot/system-prompt-builder.d.ts +91 -0
  64. package/dist/boot/system-prompt-builder.d.ts.map +1 -0
  65. package/dist/boot/system-prompt.d.ts +66 -0
  66. package/dist/boot/system-prompt.d.ts.map +1 -0
  67. package/dist/boot/tool-registry.d.ts +42 -0
  68. package/dist/boot/tool-registry.d.ts.map +1 -0
  69. package/dist/boot/tui-autophase-wiring.d.ts +23 -0
  70. package/dist/boot/tui-autophase-wiring.d.ts.map +1 -0
  71. package/dist/boot/tui-coordinator-setup.d.ts +38 -0
  72. package/dist/boot/tui-coordinator-setup.d.ts.map +1 -0
  73. package/dist/boot/tui-debug-stream.d.ts +18 -0
  74. package/dist/boot/tui-debug-stream.d.ts.map +1 -0
  75. package/dist/boot/tui-live-sessions.d.ts +39 -0
  76. package/dist/boot/tui-live-sessions.d.ts.map +1 -0
  77. package/dist/boot/tui-project-picker-callback.d.ts +30 -0
  78. package/dist/boot/tui-project-picker-callback.d.ts.map +1 -0
  79. package/dist/boot/tui-project-spawn.d.ts +19 -0
  80. package/dist/boot/tui-project-spawn.d.ts.map +1 -0
  81. package/dist/boot/tui-project-switch.d.ts +26 -0
  82. package/dist/boot/tui-project-switch.d.ts.map +1 -0
  83. package/dist/boot/tui-runtime-state.d.ts +83 -0
  84. package/dist/boot/tui-runtime-state.d.ts.map +1 -0
  85. package/dist/boot/tui-sdd-callback.d.ts +20 -0
  86. package/dist/boot/tui-sdd-callback.d.ts.map +1 -0
  87. package/dist/boot/tui-session-resume.d.ts +21 -0
  88. package/dist/boot/tui-session-resume.d.ts.map +1 -0
  89. package/dist/boot/tui-settings-adapter.d.ts +23 -0
  90. package/dist/boot/tui-settings-adapter.d.ts.map +1 -0
  91. package/dist/boot-config.d.ts +26 -0
  92. package/dist/boot-config.d.ts.map +1 -0
  93. package/dist/boot.d.ts +30 -0
  94. package/dist/boot.d.ts.map +1 -0
  95. package/dist/cli-bundled-prompts.d.ts +12 -0
  96. package/dist/cli-bundled-prompts.d.ts.map +1 -0
  97. package/dist/cli-bundled-skills.d.ts +13 -0
  98. package/dist/cli-bundled-skills.d.ts.map +1 -0
  99. package/dist/cli-context.d.ts +30 -0
  100. package/dist/cli-context.d.ts.map +1 -0
  101. package/dist/cli-entry-point.d.ts +2 -0
  102. package/dist/cli-entry-point.d.ts.map +1 -0
  103. package/dist/cli-eternal-flag.d.ts +66 -0
  104. package/dist/cli-eternal-flag.d.ts.map +1 -0
  105. package/dist/cli-main.d.ts +13 -0
  106. package/dist/cli-main.d.ts.map +1 -0
  107. package/dist/cli-recovery-prompt.d.ts +19 -0
  108. package/dist/cli-recovery-prompt.d.ts.map +1 -0
  109. package/dist/cli-update-notice.d.ts +3 -0
  110. package/dist/cli-update-notice.d.ts.map +1 -0
  111. package/dist/config-doctor.d.ts +39 -0
  112. package/dist/config-doctor.d.ts.map +1 -0
  113. package/dist/config-history.d.ts +54 -0
  114. package/dist/config-history.d.ts.map +1 -0
  115. package/dist/context-limit.d.ts +51 -0
  116. package/dist/context-limit.d.ts.map +1 -0
  117. package/dist/context-overflow-diagnostic.d.ts +3 -0
  118. package/dist/context-overflow-diagnostic.d.ts.map +1 -0
  119. package/dist/diff-renderer.d.ts +2 -0
  120. package/dist/diff-renderer.d.ts.map +1 -0
  121. package/dist/execute-deps.d.ts +239 -0
  122. package/dist/execute-deps.d.ts.map +1 -0
  123. package/dist/execution.d.ts +99 -0
  124. package/dist/execution.d.ts.map +1 -0
  125. package/dist/first-run-auth-gate.d.ts +18 -0
  126. package/dist/first-run-auth-gate.d.ts.map +1 -0
  127. package/dist/fleet/host.d.ts +533 -0
  128. package/dist/fleet/host.d.ts.map +1 -0
  129. package/dist/fleet/routing.d.ts +8 -0
  130. package/dist/fleet/routing.d.ts.map +1 -0
  131. package/dist/fleet/status-broadcast.d.ts +42 -0
  132. package/dist/fleet/status-broadcast.d.ts.map +1 -0
  133. package/dist/fleet/supervisor-registry.d.ts +16 -0
  134. package/dist/fleet/supervisor-registry.d.ts.map +1 -0
  135. package/dist/fleet-statusline.d.ts +71 -0
  136. package/dist/fleet-statusline.d.ts.map +1 -0
  137. package/dist/hooks-wiring.d.ts +26 -0
  138. package/dist/hooks-wiring.d.ts.map +1 -0
  139. package/dist/hq-command-controller.d.ts +52 -0
  140. package/dist/hq-command-controller.d.ts.map +1 -0
  141. package/dist/hq-dashboard-html.d.ts +2 -0
  142. package/dist/hq-dashboard-html.d.ts.map +1 -0
  143. package/dist/hq-publisher.d.ts +16 -0
  144. package/dist/hq-publisher.d.ts.map +1 -0
  145. package/dist/hq-server.d.ts +56 -0
  146. package/dist/hq-server.d.ts.map +1 -0
  147. package/dist/hq-static-serve.d.ts +26 -0
  148. package/dist/hq-static-serve.d.ts.map +1 -0
  149. package/dist/index.d.ts +3 -5
  150. package/dist/index.d.ts.map +1 -0
  151. package/dist/index.js +6025 -3952
  152. package/dist/index.js.map +7 -1
  153. package/dist/input-reader.d.ts +45 -0
  154. package/dist/input-reader.d.ts.map +1 -0
  155. package/dist/launch-hints.d.ts +46 -0
  156. package/dist/launch-hints.d.ts.map +1 -0
  157. package/dist/mailbox-bridge-bootstrap.d.ts +85 -0
  158. package/dist/mailbox-bridge-bootstrap.d.ts.map +1 -0
  159. package/dist/mcp-serve.d.ts +23 -0
  160. package/dist/mcp-serve.d.ts.map +1 -0
  161. package/dist/multi-agent.d.ts +4 -0
  162. package/dist/multi-agent.d.ts.map +1 -0
  163. package/dist/next-task-predictor.d.ts +45 -0
  164. package/dist/next-task-predictor.d.ts.map +1 -0
  165. package/dist/permission-prompt.d.ts +11 -0
  166. package/dist/permission-prompt.d.ts.map +1 -0
  167. package/dist/picker.d.ts +86 -0
  168. package/dist/picker.d.ts.map +1 -0
  169. package/dist/plugin-api-factory.d.ts +3 -0
  170. package/dist/plugin-api-factory.d.ts.map +1 -0
  171. package/dist/plugin-management.d.ts +43 -0
  172. package/dist/plugin-management.d.ts.map +1 -0
  173. package/dist/pre-launch/indexing-question.d.ts +28 -0
  174. package/dist/pre-launch/indexing-question.d.ts.map +1 -0
  175. package/dist/pre-launch/launch-prompts.d.ts +52 -0
  176. package/dist/pre-launch/launch-prompts.d.ts.map +1 -0
  177. package/dist/pre-launch/project-check.d.ts +25 -0
  178. package/dist/pre-launch/project-check.d.ts.map +1 -0
  179. package/dist/pre-launch.d.ts +4 -0
  180. package/dist/pre-launch.d.ts.map +1 -0
  181. package/dist/preflight.d.ts +58 -0
  182. package/dist/preflight.d.ts.map +1 -0
  183. package/dist/project-picker.d.ts +56 -0
  184. package/dist/project-picker.d.ts.map +1 -0
  185. package/dist/provider-config-utils.d.ts +58 -0
  186. package/dist/provider-config-utils.d.ts.map +1 -0
  187. package/dist/provider-helpers.d.ts +53 -0
  188. package/dist/provider-helpers.d.ts.map +1 -0
  189. package/dist/renderer.d.ts +76 -0
  190. package/dist/renderer.d.ts.map +1 -0
  191. package/dist/repl.d.ts +162 -0
  192. package/dist/repl.d.ts.map +1 -0
  193. package/dist/services/project-facts.d.ts +17 -0
  194. package/dist/services/project-facts.d.ts.map +1 -0
  195. package/dist/session-event-wiring.d.ts +48 -0
  196. package/dist/session-event-wiring.d.ts.map +1 -0
  197. package/dist/session-stats.d.ts +38 -0
  198. package/dist/session-stats.d.ts.map +1 -0
  199. package/dist/settings-menu.d.ts +87 -0
  200. package/dist/settings-menu.d.ts.map +1 -0
  201. package/dist/shutdown-cleanup.d.ts +44 -0
  202. package/dist/shutdown-cleanup.d.ts.map +1 -0
  203. package/dist/slash-commands/acp.d.ts +23 -0
  204. package/dist/slash-commands/acp.d.ts.map +1 -0
  205. package/dist/slash-commands/agents.d.ts +16 -0
  206. package/dist/slash-commands/agents.d.ts.map +1 -0
  207. package/dist/slash-commands/audit.d.ts +11 -0
  208. package/dist/slash-commands/audit.d.ts.map +1 -0
  209. package/dist/slash-commands/auth.d.ts +20 -0
  210. package/dist/slash-commands/auth.d.ts.map +1 -0
  211. package/dist/slash-commands/autonomy.d.ts +5 -0
  212. package/dist/slash-commands/autonomy.d.ts.map +1 -0
  213. package/dist/slash-commands/autophase.d.ts +13 -0
  214. package/dist/slash-commands/autophase.d.ts.map +1 -0
  215. package/dist/slash-commands/brain.d.ts +4 -0
  216. package/dist/slash-commands/brain.d.ts.map +1 -0
  217. package/dist/slash-commands/btw.d.ts +13 -0
  218. package/dist/slash-commands/btw.d.ts.map +1 -0
  219. package/dist/slash-commands/clear.d.ts +4 -0
  220. package/dist/slash-commands/clear.d.ts.map +1 -0
  221. package/dist/slash-commands/codebase-reindex.d.ts +11 -0
  222. package/dist/slash-commands/codebase-reindex.d.ts.map +1 -0
  223. package/dist/slash-commands/collab.d.ts +26 -0
  224. package/dist/slash-commands/collab.d.ts.map +1 -0
  225. package/dist/slash-commands/commit-llm.d.ts +41 -0
  226. package/dist/slash-commands/commit-llm.d.ts.map +1 -0
  227. package/dist/slash-commands/compact.d.ts +4 -0
  228. package/dist/slash-commands/compact.d.ts.map +1 -0
  229. package/dist/slash-commands/context.d.ts +4 -0
  230. package/dist/slash-commands/context.d.ts.map +1 -0
  231. package/dist/slash-commands/coordinator.d.ts +4 -0
  232. package/dist/slash-commands/coordinator.d.ts.map +1 -0
  233. package/dist/slash-commands/delegate.d.ts +17 -0
  234. package/dist/slash-commands/delegate.d.ts.map +1 -0
  235. package/dist/slash-commands/design.d.ts +16 -0
  236. package/dist/slash-commands/design.d.ts.map +1 -0
  237. package/dist/slash-commands/dev.d.ts +9 -0
  238. package/dist/slash-commands/dev.d.ts.map +1 -0
  239. package/dist/slash-commands/diag-stats.d.ts +5 -0
  240. package/dist/slash-commands/diag-stats.d.ts.map +1 -0
  241. package/dist/slash-commands/dispatch-llm.d.ts +12 -0
  242. package/dist/slash-commands/dispatch-llm.d.ts.map +1 -0
  243. package/dist/slash-commands/doctor.d.ts +13 -0
  244. package/dist/slash-commands/doctor.d.ts.map +1 -0
  245. package/dist/slash-commands/enhance.d.ts +13 -0
  246. package/dist/slash-commands/enhance.d.ts.map +1 -0
  247. package/dist/slash-commands/ensemble.d.ts +17 -0
  248. package/dist/slash-commands/ensemble.d.ts.map +1 -0
  249. package/dist/slash-commands/f-keys.d.ts +18 -0
  250. package/dist/slash-commands/f-keys.d.ts.map +1 -0
  251. package/dist/slash-commands/fallback.d.ts +20 -0
  252. package/dist/slash-commands/fallback.d.ts.map +1 -0
  253. package/dist/slash-commands/fix-classifier.d.ts +28 -0
  254. package/dist/slash-commands/fix-classifier.d.ts.map +1 -0
  255. package/dist/slash-commands/fix.d.ts +4 -0
  256. package/dist/slash-commands/fix.d.ts.map +1 -0
  257. package/dist/slash-commands/fleet.d.ts +20 -0
  258. package/dist/slash-commands/fleet.d.ts.map +1 -0
  259. package/dist/slash-commands/gitid.d.ts +22 -0
  260. package/dist/slash-commands/gitid.d.ts.map +1 -0
  261. package/dist/slash-commands/goal-refiner.d.ts +22 -0
  262. package/dist/slash-commands/goal-refiner.d.ts.map +1 -0
  263. package/dist/slash-commands/goal.d.ts +4 -0
  264. package/dist/slash-commands/goal.d.ts.map +1 -0
  265. package/dist/slash-commands/help.d.ts +4 -0
  266. package/dist/slash-commands/help.d.ts.map +1 -0
  267. package/dist/slash-commands/helpers.d.ts +33 -0
  268. package/dist/slash-commands/helpers.d.ts.map +1 -0
  269. package/dist/slash-commands/hq.d.ts +4 -0
  270. package/dist/slash-commands/hq.d.ts.map +1 -0
  271. package/dist/slash-commands/index.d.ts +524 -0
  272. package/dist/slash-commands/index.d.ts.map +1 -0
  273. package/dist/slash-commands/init.d.ts +4 -0
  274. package/dist/slash-commands/init.d.ts.map +1 -0
  275. package/dist/slash-commands/interrupt.d.ts +15 -0
  276. package/dist/slash-commands/interrupt.d.ts.map +1 -0
  277. package/dist/slash-commands/kanban.d.ts +4 -0
  278. package/dist/slash-commands/kanban.d.ts.map +1 -0
  279. package/dist/slash-commands/mailbox-demo.d.ts +19 -0
  280. package/dist/slash-commands/mailbox-demo.d.ts.map +1 -0
  281. package/dist/slash-commands/mailbox-serve.d.ts +20 -0
  282. package/dist/slash-commands/mailbox-serve.d.ts.map +1 -0
  283. package/dist/slash-commands/mailbox.d.ts +28 -0
  284. package/dist/slash-commands/mailbox.d.ts.map +1 -0
  285. package/dist/slash-commands/mcp-utils.d.ts +24 -0
  286. package/dist/slash-commands/mcp-utils.d.ts.map +1 -0
  287. package/dist/slash-commands/mcp.d.ts +19 -0
  288. package/dist/slash-commands/mcp.d.ts.map +1 -0
  289. package/dist/slash-commands/memory.d.ts +4 -0
  290. package/dist/slash-commands/memory.d.ts.map +1 -0
  291. package/dist/slash-commands/mode.d.ts +6 -0
  292. package/dist/slash-commands/mode.d.ts.map +1 -0
  293. package/dist/slash-commands/modelcaps.d.ts +4 -0
  294. package/dist/slash-commands/modelcaps.d.ts.map +1 -0
  295. package/dist/slash-commands/models.d.ts +23 -0
  296. package/dist/slash-commands/models.d.ts.map +1 -0
  297. package/dist/slash-commands/mouse.d.ts +14 -0
  298. package/dist/slash-commands/mouse.d.ts.map +1 -0
  299. package/dist/slash-commands/next.d.ts +21 -0
  300. package/dist/slash-commands/next.d.ts.map +1 -0
  301. package/dist/slash-commands/plugin.d.ts +4 -0
  302. package/dist/slash-commands/plugin.d.ts.map +1 -0
  303. package/dist/slash-commands/project-utils.d.ts +51 -0
  304. package/dist/slash-commands/project-utils.d.ts.map +1 -0
  305. package/dist/slash-commands/project.d.ts +4 -0
  306. package/dist/slash-commands/project.d.ts.map +1 -0
  307. package/dist/slash-commands/prune.d.ts +4 -0
  308. package/dist/slash-commands/prune.d.ts.map +1 -0
  309. package/dist/slash-commands/review.d.ts +4 -0
  310. package/dist/slash-commands/review.d.ts.map +1 -0
  311. package/dist/slash-commands/sdd/project-context.d.ts +7 -0
  312. package/dist/slash-commands/sdd/project-context.d.ts.map +1 -0
  313. package/dist/slash-commands/sdd/rendering.d.ts +2 -0
  314. package/dist/slash-commands/sdd/rendering.d.ts.map +1 -0
  315. package/dist/slash-commands/sdd/spec-detection.d.ts +21 -0
  316. package/dist/slash-commands/sdd/spec-detection.d.ts.map +1 -0
  317. package/dist/slash-commands/sdd/state.d.ts +40 -0
  318. package/dist/slash-commands/sdd/state.d.ts.map +1 -0
  319. package/dist/slash-commands/sdd/task-manager.d.ts +37 -0
  320. package/dist/slash-commands/sdd/task-manager.d.ts.map +1 -0
  321. package/dist/slash-commands/sdd.d.ts +15 -0
  322. package/dist/slash-commands/sdd.d.ts.map +1 -0
  323. package/dist/slash-commands/security.d.ts +4 -0
  324. package/dist/slash-commands/security.d.ts.map +1 -0
  325. package/dist/slash-commands/session.d.ts +7 -0
  326. package/dist/slash-commands/session.d.ts.map +1 -0
  327. package/dist/slash-commands/setmodel.d.ts +20 -0
  328. package/dist/slash-commands/setmodel.d.ts.map +1 -0
  329. package/dist/slash-commands/settings.d.ts +12 -0
  330. package/dist/slash-commands/settings.d.ts.map +1 -0
  331. package/dist/slash-commands/shadow.d.ts +28 -0
  332. package/dist/slash-commands/shadow.d.ts.map +1 -0
  333. package/dist/slash-commands/slash-deep-help.d.ts +51 -0
  334. package/dist/slash-commands/slash-deep-help.d.ts.map +1 -0
  335. package/dist/slash-commands/spawn-agents.d.ts +6 -0
  336. package/dist/slash-commands/spawn-agents.d.ts.map +1 -0
  337. package/dist/slash-commands/statusline.d.ts +67 -0
  338. package/dist/slash-commands/statusline.d.ts.map +1 -0
  339. package/dist/slash-commands/suggest.d.ts +4 -0
  340. package/dist/slash-commands/suggest.d.ts.map +1 -0
  341. package/dist/slash-commands/suggestion-store.d.ts +29 -0
  342. package/dist/slash-commands/suggestion-store.d.ts.map +1 -0
  343. package/dist/slash-commands/supervisor.d.ts +18 -0
  344. package/dist/slash-commands/supervisor.d.ts.map +1 -0
  345. package/dist/slash-commands/surfaces.d.ts +4 -0
  346. package/dist/slash-commands/surfaces.d.ts.map +1 -0
  347. package/dist/slash-commands/tasks.d.ts +4 -0
  348. package/dist/slash-commands/tasks.d.ts.map +1 -0
  349. package/dist/slash-commands/techstack.d.ts +4 -0
  350. package/dist/slash-commands/techstack.d.ts.map +1 -0
  351. package/dist/slash-commands/telegram-settings.d.ts +4 -0
  352. package/dist/slash-commands/telegram-settings.d.ts.map +1 -0
  353. package/dist/slash-commands/telegram-setup.d.ts +11 -0
  354. package/dist/slash-commands/telegram-setup.d.ts.map +1 -0
  355. package/dist/slash-commands/todos.d.ts +4 -0
  356. package/dist/slash-commands/todos.d.ts.map +1 -0
  357. package/dist/slash-commands/tool.d.ts +4 -0
  358. package/dist/slash-commands/tool.d.ts.map +1 -0
  359. package/dist/slash-commands/tools.d.ts +4 -0
  360. package/dist/slash-commands/tools.d.ts.map +1 -0
  361. package/dist/slash-commands/tuneup.d.ts +15 -0
  362. package/dist/slash-commands/tuneup.d.ts.map +1 -0
  363. package/dist/slash-commands/working-dir.d.ts +14 -0
  364. package/dist/slash-commands/working-dir.d.ts.map +1 -0
  365. package/dist/slash-commands/worktree.d.ts +8 -0
  366. package/dist/slash-commands/worktree.d.ts.map +1 -0
  367. package/dist/slash-commands/yolo.d.ts +4 -0
  368. package/dist/slash-commands/yolo.d.ts.map +1 -0
  369. package/dist/spinner.d.ts +44 -0
  370. package/dist/spinner.d.ts.map +1 -0
  371. package/dist/subcommands/handlers/acp.d.ts +15 -0
  372. package/dist/subcommands/handlers/acp.d.ts.map +1 -0
  373. package/dist/subcommands/handlers/audit.d.ts +12 -0
  374. package/dist/subcommands/handlers/audit.d.ts.map +1 -0
  375. package/dist/subcommands/handlers/auth-local-help.d.ts +69 -0
  376. package/dist/subcommands/handlers/auth-local-help.d.ts.map +1 -0
  377. package/dist/subcommands/handlers/auth.d.ts +3 -0
  378. package/dist/subcommands/handlers/auth.d.ts.map +1 -0
  379. package/dist/subcommands/handlers/bench-run-help.d.ts +145 -0
  380. package/dist/subcommands/handlers/bench-run-help.d.ts.map +1 -0
  381. package/dist/subcommands/handlers/bench.d.ts +13 -0
  382. package/dist/subcommands/handlers/bench.d.ts.map +1 -0
  383. package/dist/subcommands/handlers/config-history.d.ts +10 -0
  384. package/dist/subcommands/handlers/config-history.d.ts.map +1 -0
  385. package/dist/subcommands/handlers/diag-doctor.d.ts +4 -0
  386. package/dist/subcommands/handlers/diag-doctor.d.ts.map +1 -0
  387. package/dist/subcommands/handlers/export.d.ts +3 -0
  388. package/dist/subcommands/handlers/export.d.ts.map +1 -0
  389. package/dist/subcommands/handlers/helpers.d.ts +2 -0
  390. package/dist/subcommands/handlers/helpers.d.ts.map +1 -0
  391. package/dist/subcommands/handlers/hq.d.ts +3 -0
  392. package/dist/subcommands/handlers/hq.d.ts.map +1 -0
  393. package/dist/subcommands/handlers/init.d.ts +7 -0
  394. package/dist/subcommands/handlers/init.d.ts.map +1 -0
  395. package/dist/subcommands/handlers/mailbox-serve.d.ts +3 -0
  396. package/dist/subcommands/handlers/mailbox-serve.d.ts.map +1 -0
  397. package/dist/subcommands/handlers/mcp.d.ts +3 -0
  398. package/dist/subcommands/handlers/mcp.d.ts.map +1 -0
  399. package/dist/subcommands/handlers/modeldiag.d.ts +3 -0
  400. package/dist/subcommands/handlers/modeldiag.d.ts.map +1 -0
  401. package/dist/subcommands/handlers/models-add-help.d.ts +142 -0
  402. package/dist/subcommands/handlers/models-add-help.d.ts.map +1 -0
  403. package/dist/subcommands/handlers/per-subcommand-help.d.ts +136 -0
  404. package/dist/subcommands/handlers/per-subcommand-help.d.ts.map +1 -0
  405. package/dist/subcommands/handlers/plugin-usage.d.ts +4 -0
  406. package/dist/subcommands/handlers/plugin-usage.d.ts.map +1 -0
  407. package/dist/subcommands/handlers/projects.d.ts +3 -0
  408. package/dist/subcommands/handlers/projects.d.ts.map +1 -0
  409. package/dist/subcommands/handlers/providers-models.d.ts +4 -0
  410. package/dist/subcommands/handlers/providers-models.d.ts.map +1 -0
  411. package/dist/subcommands/handlers/quick.d.ts +14 -0
  412. package/dist/subcommands/handlers/quick.d.ts.map +1 -0
  413. package/dist/subcommands/handlers/replay.d.ts +12 -0
  414. package/dist/subcommands/handlers/replay.d.ts.map +1 -0
  415. package/dist/subcommands/handlers/rewind.d.ts +3 -0
  416. package/dist/subcommands/handlers/rewind.d.ts.map +1 -0
  417. package/dist/subcommands/handlers/sessions-config.d.ts +4 -0
  418. package/dist/subcommands/handlers/sessions-config.d.ts.map +1 -0
  419. package/dist/subcommands/handlers/sessions-fleet.d.ts +15 -0
  420. package/dist/subcommands/handlers/sessions-fleet.d.ts.map +1 -0
  421. package/dist/subcommands/handlers/tools-skills.d.ts +4 -0
  422. package/dist/subcommands/handlers/tools-skills.d.ts.map +1 -0
  423. package/dist/subcommands/handlers/update.d.ts +7 -0
  424. package/dist/subcommands/handlers/update.d.ts.map +1 -0
  425. package/dist/subcommands/handlers/version-help.d.ts +4 -0
  426. package/dist/subcommands/handlers/version-help.d.ts.map +1 -0
  427. package/dist/subcommands/index.d.ts +26 -0
  428. package/dist/subcommands/index.d.ts.map +1 -0
  429. package/dist/theme.d.ts +12 -0
  430. package/dist/theme.d.ts.map +1 -0
  431. package/dist/tui-thinking-word.d.ts +5 -0
  432. package/dist/tui-thinking-word.d.ts.map +1 -0
  433. package/dist/tuneup.d.ts +162 -0
  434. package/dist/tuneup.d.ts.map +1 -0
  435. package/dist/update-check.d.ts +22 -0
  436. package/dist/update-check.d.ts.map +1 -0
  437. package/dist/utils/delay-format.d.ts +5 -0
  438. package/dist/utils/delay-format.d.ts.map +1 -0
  439. package/dist/utils/win32-cmd.d.ts +7 -0
  440. package/dist/utils/win32-cmd.d.ts.map +1 -0
  441. package/dist/utils.d.ts +58 -0
  442. package/dist/utils.d.ts.map +1 -0
  443. package/dist/version.d.ts +4 -0
  444. package/dist/version.d.ts.map +1 -0
  445. package/dist/webui-server/client-registration.d.ts +41 -0
  446. package/dist/webui-server/client-registration.d.ts.map +1 -0
  447. package/dist/webui-server/connection-handler.d.ts +59 -0
  448. package/dist/webui-server/connection-handler.d.ts.map +1 -0
  449. package/dist/webui-server/context-breakdown.d.ts +57 -0
  450. package/dist/webui-server/context-breakdown.d.ts.map +1 -0
  451. package/dist/webui-server/cost-helpers.d.ts +29 -0
  452. package/dist/webui-server/cost-helpers.d.ts.map +1 -0
  453. package/dist/webui-server/lifecycle.d.ts +108 -0
  454. package/dist/webui-server/lifecycle.d.ts.map +1 -0
  455. package/dist/webui-server/logger-shim.d.ts +10 -0
  456. package/dist/webui-server/logger-shim.d.ts.map +1 -0
  457. package/dist/webui-server/message-router.d.ts +39 -0
  458. package/dist/webui-server/message-router.d.ts.map +1 -0
  459. package/dist/webui-server/prefs-seeding.d.ts +57 -0
  460. package/dist/webui-server/prefs-seeding.d.ts.map +1 -0
  461. package/dist/webui-server/provider-config.d.ts +61 -0
  462. package/dist/webui-server/provider-config.d.ts.map +1 -0
  463. package/dist/webui-server/session-start-payload.d.ts +20 -0
  464. package/dist/webui-server/session-start-payload.d.ts.map +1 -0
  465. package/dist/webui-server/session-status-poll.d.ts +14 -0
  466. package/dist/webui-server/session-status-poll.d.ts.map +1 -0
  467. package/dist/webui-server/setup-events.d.ts +45 -0
  468. package/dist/webui-server/setup-events.d.ts.map +1 -0
  469. package/dist/webui-server/static-serve.d.ts +70 -0
  470. package/dist/webui-server/static-serve.d.ts.map +1 -0
  471. package/dist/webui-server/stream-coalescer.d.ts +41 -0
  472. package/dist/webui-server/stream-coalescer.d.ts.map +1 -0
  473. package/dist/webui-server/ws-handlers/agent-config.d.ts +47 -0
  474. package/dist/webui-server/ws-handlers/agent-config.d.ts.map +1 -0
  475. package/dist/webui-server/ws-handlers/brain.d.ts +36 -0
  476. package/dist/webui-server/ws-handlers/brain.d.ts.map +1 -0
  477. package/dist/webui-server/ws-handlers/connection.d.ts +50 -0
  478. package/dist/webui-server/ws-handlers/connection.d.ts.map +1 -0
  479. package/dist/webui-server/ws-handlers/context.d.ts +55 -0
  480. package/dist/webui-server/ws-handlers/context.d.ts.map +1 -0
  481. package/dist/webui-server/ws-handlers/index.d.ts +60 -0
  482. package/dist/webui-server/ws-handlers/index.d.ts.map +1 -0
  483. package/dist/webui-server/ws-handlers/introspection.d.ts +35 -0
  484. package/dist/webui-server/ws-handlers/introspection.d.ts.map +1 -0
  485. package/dist/webui-server/ws-handlers/kanban.d.ts +41 -0
  486. package/dist/webui-server/ws-handlers/kanban.d.ts.map +1 -0
  487. package/dist/webui-server/ws-handlers/mailbox.d.ts +51 -0
  488. package/dist/webui-server/ws-handlers/mailbox.d.ts.map +1 -0
  489. package/dist/webui-server/ws-handlers/oauth.d.ts +16 -0
  490. package/dist/webui-server/ws-handlers/oauth.d.ts.map +1 -0
  491. package/dist/webui-server/ws-handlers/prefs.d.ts +32 -0
  492. package/dist/webui-server/ws-handlers/prefs.d.ts.map +1 -0
  493. package/dist/webui-server/ws-handlers/process.d.ts +6 -0
  494. package/dist/webui-server/ws-handlers/process.d.ts.map +1 -0
  495. package/dist/webui-server/ws-handlers/projects.d.ts +44 -0
  496. package/dist/webui-server/ws-handlers/projects.d.ts.map +1 -0
  497. package/dist/webui-server/ws-handlers/providers.d.ts +36 -0
  498. package/dist/webui-server/ws-handlers/providers.d.ts.map +1 -0
  499. package/dist/webui-server/ws-handlers/sessions.d.ts +38 -0
  500. package/dist/webui-server/ws-handlers/sessions.d.ts.map +1 -0
  501. package/dist/webui-server/ws-handlers/worklist.d.ts +49 -0
  502. package/dist/webui-server/ws-handlers/worklist.d.ts.map +1 -0
  503. package/dist/webui-server.d.ts +160 -0
  504. package/dist/webui-server.d.ts.map +1 -0
  505. package/dist/wiring/brain-and-orchestration.d.ts +63 -0
  506. package/dist/wiring/brain-and-orchestration.d.ts.map +1 -0
  507. package/dist/wiring/codebase-index.d.ts +33 -0
  508. package/dist/wiring/codebase-index.d.ts.map +1 -0
  509. package/dist/wiring/controllers.d.ts +46 -0
  510. package/dist/wiring/controllers.d.ts.map +1 -0
  511. package/dist/wiring/dep-watcher.d.ts +23 -0
  512. package/dist/wiring/dep-watcher.d.ts.map +1 -0
  513. package/dist/wiring/design-studio.d.ts +17 -0
  514. package/dist/wiring/design-studio.d.ts.map +1 -0
  515. package/dist/wiring/director-setup.d.ts +51 -0
  516. package/dist/wiring/director-setup.d.ts.map +1 -0
  517. package/dist/wiring/hq-telemetry.d.ts +42 -0
  518. package/dist/wiring/hq-telemetry.d.ts.map +1 -0
  519. package/dist/wiring/lifecycle-plugins.d.ts +58 -0
  520. package/dist/wiring/lifecycle-plugins.d.ts.map +1 -0
  521. package/dist/wiring/mailbox-bridge-bootstrap.d.ts +53 -0
  522. package/dist/wiring/mailbox-bridge-bootstrap.d.ts.map +1 -0
  523. package/dist/wiring/metrics.d.ts +21 -0
  524. package/dist/wiring/metrics.d.ts.map +1 -0
  525. package/dist/wiring/pipeline.d.ts +96 -0
  526. package/dist/wiring/pipeline.d.ts.map +1 -0
  527. package/dist/wiring/plugins.d.ts +108 -0
  528. package/dist/wiring/plugins.d.ts.map +1 -0
  529. package/dist/wiring/provider-runtime-setup.d.ts +47 -0
  530. package/dist/wiring/provider-runtime-setup.d.ts.map +1 -0
  531. package/dist/wiring/provider-runtime.d.ts +57 -0
  532. package/dist/wiring/provider-runtime.d.ts.map +1 -0
  533. package/dist/wiring/provider.d.ts +13 -0
  534. package/dist/wiring/provider.d.ts.map +1 -0
  535. package/dist/wiring/replay.d.ts +32 -0
  536. package/dist/wiring/replay.d.ts.map +1 -0
  537. package/dist/wiring/session.d.ts +56 -0
  538. package/dist/wiring/session.d.ts.map +1 -0
  539. package/dist/wiring/slash-commands.d.ts +74 -0
  540. package/dist/wiring/slash-commands.d.ts.map +1 -0
  541. package/dist/wiring/super-memory.d.ts +9 -0
  542. package/dist/wiring/super-memory.d.ts.map +1 -0
  543. package/dist/wiring/to-execute-deps.d.ts +11 -0
  544. package/dist/wiring/to-execute-deps.d.ts.map +1 -0
  545. package/dist/wiring/tools.d.ts +41 -0
  546. package/dist/wiring/tools.d.ts.map +1 -0
  547. package/package.json +20 -20
@@ -0,0 +1,30 @@
1
+ import { type Director } from '@wrongstack/core';
2
+ import type { TerminalRenderer } from '../renderer.js';
3
+ import type { TuiRuntimeState } from './tui-runtime-state.js';
4
+ import type { ProjectSwitchContext } from './tui-project-switch.js';
5
+ export interface ProjectPickerContext {
6
+ state: TuiRuntimeState;
7
+ renderer: TerminalRenderer;
8
+ director: Director | null | undefined;
9
+ getEternalEngine: (() => {
10
+ currentState: string;
11
+ } | null) | undefined;
12
+ getParallelEngine: (() => {
13
+ currentState: string;
14
+ } | null) | undefined;
15
+ switchCtx: ProjectSwitchContext;
16
+ switchProjectInPlace: (targetRoot: string, displayName: string) => Promise<string | null>;
17
+ }
18
+ /**
19
+ * Load project picker items from the global manifest.
20
+ * Called each time the project picker panel opens (F1).
21
+ */
22
+ export declare function getProjectPickerItems(ctx: ProjectPickerContext): Promise<import("../project-picker.js").PickerItem[]>;
23
+ /**
24
+ * Called when the user selects a project in the picker.
25
+ * Re-roots the live TUI process in place: new Context root, fresh
26
+ * per-project session writer, rebuilt system prompt, and no spawned
27
+ * replacement process.
28
+ */
29
+ export declare function onProjectSelect(ctx: ProjectPickerContext, slug: string, kind: 'project' | 'action'): Promise<void>;
30
+ //# sourceMappingURL=tui-project-picker-callback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-project-picker-callback.d.ts","sourceRoot":"","sources":["../../src/boot/tui-project-picker-callback.ts"],"names":[],"mappings":"AAWA,OAAO,EAAE,KAAK,QAAQ,EAAS,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AACvD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAEpE,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,CAAC;IACvB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,QAAQ,EAAE,QAAQ,GAAG,IAAI,GAAG,SAAS,CAAC;IACtC,gBAAgB,EAAE,CAAC,MAAM;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACtE,iBAAiB,EAAE,CAAC,MAAM;QAAE,YAAY,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IACvE,SAAS,EAAE,oBAAoB,CAAC;IAChC,oBAAoB,EAAE,CAAC,UAAU,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAC3F;AAED;;;GAGG;AACH,wBAAsB,qBAAqB,CAAC,GAAG,EAAE,oBAAoB,wDAMpE;AAED;;;;;GAKG;AACH,wBAAsB,eAAe,CACnC,GAAG,EAAE,oBAAoB,EACzB,IAAI,EAAE,MAAM,EACZ,IAAI,EAAE,SAAS,GAAG,QAAQ,GACzB,OAAO,CAAC,IAAI,CAAC,CAqDf"}
@@ -0,0 +1,19 @@
1
+ export declare const PROJECT_SWITCH_EXIT_CODE = 42;
2
+ export interface PendingProjectSwitch {
3
+ root: string;
4
+ name: string;
5
+ resumeSessionId?: string | undefined;
6
+ }
7
+ export interface ProjectSwitchSpawnOptions {
8
+ /** The TUI's exit code. */
9
+ code: number;
10
+ /** The pending switch info set by onProjectSelect / onSwitchToSession. */
11
+ pendingProjectSwitch: PendingProjectSwitch | null;
12
+ }
13
+ /**
14
+ * If the TUI exited with PROJECT_SWITCH_EXIT_CODE and a pending switch
15
+ * is set, spawn a new wstack in the target project and return 0.
16
+ * Otherwise return null (no spawn happened — caller continues cleanup).
17
+ */
18
+ export declare function handleProjectSwitchSpawn(opts: ProjectSwitchSpawnOptions): Promise<number | null>;
19
+ //# sourceMappingURL=tui-project-spawn.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-project-spawn.d.ts","sourceRoot":"","sources":["../../src/boot/tui-project-spawn.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,wBAAwB,KAAK,CAAC;AAE3C,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CACtC;AAED,MAAM,WAAW,yBAAyB;IACxC,2BAA2B;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,0EAA0E;IAC1E,oBAAoB,EAAE,oBAAoB,GAAG,IAAI,CAAC;CACnD;AAED;;;;GAIG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,yBAAyB,GAC9B,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyDxB"}
@@ -0,0 +1,26 @@
1
+ import { type Agent, type Config, type Context, type EventBus, type MemoryStore, type ModeStore } from '@wrongstack/core';
2
+ import type { TuiRuntimeState } from './tui-runtime-state.js';
3
+ import type { SkillLoader } from '@wrongstack/core';
4
+ export interface ProjectSwitchContext {
5
+ state: TuiRuntimeState;
6
+ context: Context;
7
+ events: EventBus;
8
+ agent: Agent;
9
+ config: Config;
10
+ tokenCounter: import('@wrongstack/core').TokenCounter;
11
+ modeId: string | undefined;
12
+ modeStore: ModeStore | undefined;
13
+ memoryStore: MemoryStore | undefined;
14
+ skillLoader: SkillLoader | undefined;
15
+ /** attachTodosCheckpoint — from execute() scope. */
16
+ attachTodosCheckpoint: (state: import('@wrongstack/core').ConversationState, todosPath: string, sessionId: string, events: EventBus, traceId: string | undefined) => () => void;
17
+ }
18
+ /**
19
+ * Re-root the live TUI process to a new project directory.
20
+ *
21
+ * Returns `null` on success, or an error message string on failure.
22
+ * Mutates `state.*` (projectRoot, wpaths, activeSessionStore,
23
+ * activeRecoveryLock, detachActiveTodosCheckpoint).
24
+ */
25
+ export declare function switchProjectInPlace(ctx: ProjectSwitchContext, targetRoot: string, displayName: string): Promise<string | null>;
26
+ //# sourceMappingURL=tui-project-switch.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-project-switch.d.ts","sourceRoot":"","sources":["../../src/boot/tui-project-switch.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,KAAK,KAAK,EACV,KAAK,MAAM,EACX,KAAK,OAAO,EACZ,KAAK,QAAQ,EAGb,KAAK,WAAW,EAChB,KAAK,SAAS,EAKf,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,CAAC;IACvB,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,QAAQ,CAAC;IACjB,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,OAAO,kBAAkB,EAAE,YAAY,CAAC;IACtD,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,SAAS,EAAE,SAAS,GAAG,SAAS,CAAC;IACjC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,WAAW,EAAE,WAAW,GAAG,SAAS,CAAC;IACrC,oDAAoD;IACpD,qBAAqB,EAAE,CACrB,KAAK,EAAE,OAAO,kBAAkB,EAAE,iBAAiB,EACnD,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,QAAQ,EAChB,OAAO,EAAE,MAAM,GAAG,SAAS,KACxB,MAAM,IAAI,CAAC;CACjB;AAED;;;;;;GAMG;AACH,wBAAsB,oBAAoB,CACxC,GAAG,EAAE,oBAAoB,EACzB,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAsHxB"}
@@ -0,0 +1,83 @@
1
+ /**
2
+ * TuiRuntimeState — shared mutable context for TUI branch sub-modules.
3
+ *
4
+ * Phase B prerequisite. The TUI branch of `execute()` (lines 603-1905)
5
+ * contains ~1,200 lines of closures that read and write mutable local
6
+ * variables declared at the top of `execute()`:
7
+ *
8
+ * `projectRoot`, `wpaths`, `activeSessionStore`, `activeRecoveryLock`,
9
+ * `detachActiveTodosCheckpoint` (in the outer scope)
10
+ * `pendingProjectSwitch`, `autonomousCoordinator`, `coordinatorRun`,
11
+ * `coordinatorEvents` (in the TUI branch scope)
12
+ *
13
+ * Extracting sub-modules (coordinator setup, project switch, session
14
+ * resume) requires these mutable bindings to be reachable from outside
15
+ * the `execute()` closure. JavaScript closures can't be partially
16
+ * extracted — a function defined in another file can't reassign a
17
+ * `let` in `execute()`.
18
+ *
19
+ * The pattern is a shared mutable container: each mutable binding
20
+ * becomes a property on a single `TuiRuntimeState` object that the
21
+ * extracted function receives as a parameter. Mutations are written
22
+ * to `state.field = newValue`; the caller (execute) and the extracted
23
+ * module both hold the same object reference, so a mutation by one is
24
+ * visible to the other.
25
+ *
26
+ * Usage in execute():
27
+ *
28
+ * const state: TuiRuntimeState = {
29
+ * projectRoot,
30
+ * wpaths,
31
+ * activeSessionStore,
32
+ * activeRecoveryLock,
33
+ * detachActiveTodosCheckpoint,
34
+ * pendingProjectSwitch: null,
35
+ * autonomousCoordinator: null,
36
+ * coordinatorRun: null,
37
+ * coordinatorEvents: new Set(),
38
+ * };
39
+ *
40
+ * // ... extracted modules receive `state` and mutate it:
41
+ * const coordinator = ensureAutonomousCoordinator(state, deps);
42
+ * // coordinator wrote state.autonomousCoordinator — visible here
43
+ *
44
+ * // After the TUI branch, sync locals back:
45
+ * projectRoot = state.projectRoot;
46
+ * wpaths = state.wpaths;
47
+ *
48
+ * Why not individual `{ current: T }` refs (React-style)?
49
+ * The outer scope's `finally` block reads these variables (e.g.
50
+ * `activeSessionStore`, `wpaths`) for cleanup. A single flat object
51
+ * is simpler to sync back than 8 separate refs, and the mutation
52
+ * pattern (`.field = x`) is cleaner than `.field.current = x`.
53
+ */
54
+ import type { AutonomousCoordinator, CoordinatorEvent, RecoveryLock, SessionStore, WstackPaths } from '@wrongstack/core';
55
+ import type { PendingProjectSwitch } from './tui-project-spawn.js';
56
+ /**
57
+ * The shared mutable runtime state for the TUI dispatch branch.
58
+ *
59
+ * Every field is mutable — extracted modules read AND write these
60
+ * properties. The object is created once in `execute()` and passed
61
+ * to every Phase B sub-module.
62
+ */
63
+ export interface TuiRuntimeState {
64
+ /** Current project root directory. Mutated by switchProjectInPlace. */
65
+ projectRoot: string;
66
+ /** Resolved WrongStack paths. Mutated by switchProjectInPlace. */
67
+ wpaths: WstackPaths;
68
+ /** Active session store. Mutated by switchProjectInPlace. */
69
+ activeSessionStore: SessionStore | undefined;
70
+ /** Active crash-recovery lock. Mutated by switchProjectInPlace and onResumeSession. */
71
+ activeRecoveryLock: RecoveryLock;
72
+ /** Todos checkpoint detach function. Mutated by switchProjectInPlace. */
73
+ detachActiveTodosCheckpoint: (() => void | Promise<void>) | undefined;
74
+ /** Pending project switch (F1 picker / F10 sessions). Set by onProjectSelect/onSwitchToSession. */
75
+ pendingProjectSwitch: PendingProjectSwitch | null;
76
+ /** Lazy AutonomousCoordinator. Set by ensureAutonomousCoordinator. */
77
+ autonomousCoordinator: AutonomousCoordinator | null;
78
+ /** In-flight coordinator run promise. Set/cleared by onCoordinatorStart. */
79
+ coordinatorRun: Promise<void> | null;
80
+ /** Coordinator event subscribers. Mutated by subscribeCoordinatorEvents. */
81
+ coordinatorEvents: Set<(event: CoordinatorEvent) => void>;
82
+ }
83
+ //# sourceMappingURL=tui-runtime-state.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-runtime-state.d.ts","sourceRoot":"","sources":["../../src/boot/tui-runtime-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,OAAO,KAAK,EACV,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,YAAY,EACZ,WAAW,EACZ,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEnE;;;;;;GAMG;AACH,MAAM,WAAW,eAAe;IAG9B,uEAAuE;IACvE,WAAW,EAAE,MAAM,CAAC;IACpB,kEAAkE;IAClE,MAAM,EAAE,WAAW,CAAC;IACpB,6DAA6D;IAC7D,kBAAkB,EAAE,YAAY,GAAG,SAAS,CAAC;IAC7C,uFAAuF;IACvF,kBAAkB,EAAE,YAAY,CAAC;IACjC,yEAAyE;IACzE,2BAA2B,EAAE,CAAC,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,SAAS,CAAC;IAItE,mGAAmG;IACnG,oBAAoB,EAAE,oBAAoB,GAAG,IAAI,CAAC;IAClD,sEAAsE;IACtE,qBAAqB,EAAE,qBAAqB,GAAG,IAAI,CAAC;IACpD,4EAA4E;IAC5E,cAAc,EAAE,OAAO,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC;IACrC,4EAA4E;IAC5E,iBAAiB,EAAE,GAAG,CAAC,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC,CAAC;CAC3D"}
@@ -0,0 +1,20 @@
1
+ /**
2
+ * TUI SDD callbacks — extracted from the runTui() options literal.
3
+ *
4
+ * Phase C step 5. getSDDContext returns the active spec-driven-development
5
+ * context; onSDDOutput parses assistant output for spec/plan/task artifacts,
6
+ * auto-saves them, and returns status messages for the TUI to display.
7
+ *
8
+ * No closure dependencies — both functions are pure delegates to the
9
+ * slash-commands/sdd module.
10
+ */
11
+ /**
12
+ * Get the active SDD context for the current session.
13
+ */
14
+ export declare function getSDDContext(): Promise<unknown>;
15
+ /**
16
+ * Parse assistant output for SDD artifacts (spec, plan, tasks), auto-save
17
+ * them, and return status messages for the TUI.
18
+ */
19
+ export declare function onSDDOutput(output: string): Promise<string[]>;
20
+ //# sourceMappingURL=tui-sdd-callback.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-sdd-callback.d.ts","sourceRoot":"","sources":["../../src/boot/tui-sdd-callback.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH;;GAEG;AACH,wBAAsB,aAAa,IAAI,OAAO,CAAC,OAAO,CAAC,CAGtD;AAED;;;GAGG;AACH,wBAAsB,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAkCnE"}
@@ -0,0 +1,21 @@
1
+ import type { Agent, TokenCounter } from '@wrongstack/core';
2
+ import type { TuiRuntimeState } from './tui-runtime-state.js';
3
+ export interface SessionResumeContext {
4
+ state: TuiRuntimeState;
5
+ agent: Agent;
6
+ tokenCounter: TokenCounter;
7
+ switchProviderAndModel: ((providerId: string, modelId: string) => string | null | void | Promise<unknown>) | undefined;
8
+ }
9
+ export interface SessionResumeResult {
10
+ entries: unknown[];
11
+ nextId: number;
12
+ sessionId: string;
13
+ }
14
+ /**
15
+ * Resume a past session by id.
16
+ *
17
+ * Returns the replayed history entries + new session id, or null on
18
+ * failure. Throws if the session is live in another process.
19
+ */
20
+ export declare function resumeSession(ctx: SessionResumeContext, sessionId: string): Promise<SessionResumeResult | null>;
21
+ //# sourceMappingURL=tui-session-resume.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-session-resume.d.ts","sourceRoot":"","sources":["../../src/boot/tui-session-resume.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAE9D,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,eAAe,CAAC;IACvB,KAAK,EAAE,KAAK,CAAC;IACb,YAAY,EAAE,YAAY,CAAC;IAC3B,sBAAsB,EAClB,CAAC,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,GAClF,SAAS,CAAC;CACf;AAED,MAAM,WAAW,mBAAmB;IAClC,OAAO,EAAE,OAAO,EAAE,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,EAAE,MAAM,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,GAAG,EAAE,oBAAoB,EACzB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAsKrC"}
@@ -0,0 +1,23 @@
1
+ import { type ConfigStore, type WstackPaths } from '@wrongstack/core';
2
+ import type { LiveSettingsInput } from '../execution.js';
3
+ export interface SettingsAdapterContext {
4
+ configStore: ConfigStore;
5
+ wpaths: WstackPaths;
6
+ fleetStreamController: {
7
+ setEnabled: (enabled: boolean) => void;
8
+ } | undefined;
9
+ applyLiveSettings: ((s: LiveSettingsInput) => void) | undefined;
10
+ }
11
+ export interface SettingsAdapter {
12
+ getSettings: () => Record<string, unknown>;
13
+ saveSettings: (s: LiveSettingsInput) => Promise<string | null>;
14
+ }
15
+ /**
16
+ * Build the getSettings/saveSettings pair for the TUI SettingsPicker.
17
+ *
18
+ * `getSettings` reads from the live ConfigStore on every call.
19
+ * `saveSettings` persists to disk (global or project-local config),
20
+ * syncs the in-memory store, and applies runtime effects immediately.
21
+ */
22
+ export declare function createSettingsAdapter(ctx: SettingsAdapterContext): SettingsAdapter;
23
+ //# sourceMappingURL=tui-settings-adapter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tui-settings-adapter.d.ts","sourceRoot":"","sources":["../../src/boot/tui-settings-adapter.ts"],"names":[],"mappings":"AAcA,OAAO,EAEL,KAAK,WAAW,EAChB,KAAK,WAAW,EAMjB,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,WAAW,CAAC;IACpB,qBAAqB,EAAE;QAAE,UAAU,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAA;KAAE,GAAG,SAAS,CAAC;IAC9E,iBAAiB,EAAE,CAAC,CAAC,CAAC,EAAE,iBAAiB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;CACjE;AAED,MAAM,WAAW,eAAe;IAC9B,WAAW,EAAE,MAAM,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC3C,YAAY,EAAE,CAAC,CAAC,EAAE,iBAAiB,KAAK,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAAC;CAChE;AAYD;;;;;;GAMG;AACH,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,sBAAsB,GAAG,eAAe,CAgalF"}
@@ -0,0 +1,26 @@
1
+ import { type Config, bootConfig as coreBootConfig, type WstackPaths } from '@wrongstack/core';
2
+ import type { DefaultPathResolver } from '@wrongstack/core/infrastructure';
3
+ export interface BootPaths {
4
+ cwd: string;
5
+ projectRoot: string;
6
+ userHome: string;
7
+ wpaths: WstackPaths;
8
+ pathResolver: DefaultPathResolver;
9
+ }
10
+ export interface BootConfigResult {
11
+ paths: BootPaths;
12
+ config: Config;
13
+ vault: BootConfigVault;
14
+ }
15
+ /** The concrete vault type returned by the core boot routine. */
16
+ type BootConfigVault = Awaited<ReturnType<typeof coreBootConfig>>['vault'];
17
+ /**
18
+ * Thin CLI wrapper over the canonical `bootConfig` in `@wrongstack/core`.
19
+ * Re-shapes the core result into the CLI's historical `{ paths, config, vault }`
20
+ * return type. All real boot behavior (path resolution, vault, secret
21
+ * migration, config + sync loading) lives in core so the CLI and the WebUI
22
+ * server can't drift.
23
+ */
24
+ export declare function bootConfig(flags: Record<string, string | boolean>): Promise<BootConfigResult>;
25
+ export {};
26
+ //# sourceMappingURL=boot-config.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot-config.d.ts","sourceRoot":"","sources":["../src/boot-config.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,MAAM,EACX,UAAU,IAAI,cAAc,EAC5B,KAAK,WAAW,EACjB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,iCAAiC,CAAC;AAE3E,MAAM,WAAW,SAAS;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,WAAW,CAAC;IACpB,YAAY,EAAE,mBAAmB,CAAC;CACnC;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,eAAe,CAAC;CACxB;AAED,iEAAiE;AACjE,KAAK,eAAe,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC;AAE3E;;;;;;GAMG;AACH,wBAAsB,UAAU,CAC9B,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,GACtC,OAAO,CAAC,gBAAgB,CAAC,CAc3B"}
package/dist/boot.d.ts ADDED
@@ -0,0 +1,30 @@
1
+ import { type Config, DefaultLogger, type ModelsRegistry, type SecretVault, type WstackPaths } from '@wrongstack/core';
2
+ import { ReadlineInputReader } from './input-reader.js';
3
+ import { TerminalRenderer } from './renderer.js';
4
+ import type { UpdateInfo } from './update-check.js';
5
+ export interface BootContext {
6
+ config: Config;
7
+ vault: SecretVault;
8
+ wpaths: WstackPaths;
9
+ cwd: string;
10
+ projectRoot: string;
11
+ userHome: string;
12
+ flags: Record<string, string | boolean>;
13
+ positional: string[];
14
+ modelsRegistry: ModelsRegistry;
15
+ renderer: TerminalRenderer;
16
+ reader: ReadlineInputReader;
17
+ logger: DefaultLogger;
18
+ /** Set by background update check — if outdated, index.ts shows notification */
19
+ updateInfo?: UpdateInfo | undefined;
20
+ /** True when running in --webui/--no-interactive mode but provider/model not configured */
21
+ needsSetup?: boolean | undefined;
22
+ }
23
+ /**
24
+ * Boot the CLI: parse args, load config, handle subcommand dispatch
25
+ * (early exit), run interactive prompts (project check, provider picker,
26
+ * mode/yolo). Returns a BootContext for the wiring phase, or an exit
27
+ * code when the run should stop here.
28
+ */
29
+ export declare function boot(argv: string[]): Promise<BootContext | number>;
30
+ //# sourceMappingURL=boot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot.d.ts","sourceRoot":"","sources":["../src/boot.ts"],"names":[],"mappings":"AAiCA,OAAO,EACL,KAAK,MAAM,EAEX,aAAa,EAGb,KAAK,cAAc,EACnB,KAAK,WAAW,EAGhB,KAAK,WAAW,EAEjB,MAAM,kBAAkB,CAAC;AAM1B,OAAO,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAYxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEjD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AA0CpD,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,WAAW,CAAC;IACnB,MAAM,EAAE,WAAW,CAAC;IACpB,GAAG,EAAE,MAAM,CAAC;IACZ,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,cAAc,EAAE,cAAc,CAAC;IAC/B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,MAAM,EAAE,aAAa,CAAC;IACtB,gFAAgF;IAChF,UAAU,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACpC,2FAA2F;IAC3F,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAClC;AAsBD;;;;;GAKG;AACH,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,WAAW,GAAG,MAAM,CAAC,CAoaxE"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Resolves the bundled `<pkg>/data/prompts/` dataset shipped with the installed
3
+ * `@wrongstack/core` package. Used by the CLI/WebUI to discover the curated
4
+ * builtin prompt library without the user pointing at a path manually.
5
+ *
6
+ * The directory lives at a sibling of `dist/` (in development: `src/`) so the
7
+ * resolution walks one level up from the core package's `package.json` and
8
+ * joins with `data/prompts`. Returns `undefined` if the lookup fails — the
9
+ * caller treats that as "no bundled prompts this run" and continues.
10
+ */
11
+ export declare function resolveBundledPromptsDir(): string | undefined;
12
+ //# sourceMappingURL=cli-bundled-prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-bundled-prompts.d.ts","sourceRoot":"","sources":["../src/cli-bundled-prompts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAKH,wBAAgB,wBAAwB,IAAI,MAAM,GAAG,SAAS,CAQ7D"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Resolves the bundled `<pkg>/skills/` directory shipped with the installed
3
+ * `@wrongstack/core` package. Used by the CLI to discover the curated skill
4
+ * set without making the user point at a path manually.
5
+ *
6
+ * The directory lives at a sibling of `dist/` (in development: `src/`) so
7
+ * the resolution walks one level up from the core package's `package.json`
8
+ * and joins with `skills`. Returns `undefined` if the lookup fails for any
9
+ * reason — the caller should treat that as "no bundled skills this run"
10
+ * and continue without error.
11
+ */
12
+ export declare function resolveBundledSkillsDir(): string | undefined;
13
+ //# sourceMappingURL=cli-bundled-skills.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-bundled-skills.d.ts","sourceRoot":"","sources":["../src/cli-bundled-skills.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAKH,wBAAgB,uBAAuB,IAAI,MAAM,GAAG,SAAS,CAQ5D"}
@@ -0,0 +1,30 @@
1
+ /**
2
+ * cli-context — Boot context initialization for the CLI main entry point.
3
+ *
4
+ * Consolidates the first ~150 lines of the monolithic main() function:
5
+ * - Pre-boot side effects (NODE_ENV, shell default)
6
+ * - Short-circuits (--help, --version, --desktop, --hq)
7
+ * - Boot() call + preflight
8
+ * - OAuth token persistence
9
+ * - Container wiring (EventBus, DI container)
10
+ * - Replay/record mode wiring
11
+ *
12
+ * Returns a `CliContext` object with all the dependencies the rest of
13
+ * main() needs, or a numeric exit code when a short-circuit fires.
14
+ */
15
+ import { wireContainer } from './boot/container-wiring.js';
16
+ import type { EventBus, ConfigStore } from '@wrongstack/core';
17
+ import type { BootContext } from './boot.js';
18
+ /** All boot-phase dependencies the rest of main() needs. */
19
+ export interface CliContext extends BootContext {
20
+ events: EventBus;
21
+ container: ReturnType<typeof wireContainer>['container'];
22
+ configStore: ConfigStore;
23
+ }
24
+ /**
25
+ * Run all pre-boot and boot-phase setup. Returns a `CliContext` on success,
26
+ * or a numeric exit code when a short-circuit flag (--help, --desktop, --hq)
27
+ * fires. When the return is a number the caller must return it immediately.
28
+ */
29
+ export declare function initializeCli(argv: string[]): Promise<CliContext | number>;
30
+ //# sourceMappingURL=cli-context.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-context.d.ts","sourceRoot":"","sources":["../src/cli-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AASH,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAM3D,OAAO,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAI7C,4DAA4D;AAC5D,MAAM,WAAW,UAAW,SAAQ,WAAW;IAC7C,MAAM,EAAE,QAAQ,CAAC;IACjB,SAAS,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAC,WAAW,CAAC,CAAC;IACzD,WAAW,EAAE,WAAW,CAAC;CAC1B;AAID;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,UAAU,GAAG,MAAM,CAAC,CA6FhF"}
@@ -0,0 +1,2 @@
1
+ export declare function runAsMain(mainFn: (argv: string[]) => Promise<number>): void;
2
+ //# sourceMappingURL=cli-entry-point.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-entry-point.d.ts","sourceRoot":"","sources":["../src/cli-entry-point.ts"],"names":[],"mappings":"AA2BA,wBAAgB,SAAS,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,MAAM,CAAC,GAAG,IAAI,CAoB3E"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * One-shot launch into eternal autonomy via the `--eternal "<mission>"`
3
+ * CLI flag. Writes the mission as the active goal, forces YOLO on
4
+ * (consistent with `/autonomy eternal`), instantiates + primes the
5
+ * `EternalAutonomyEngine`, and flips `autonomyMode='eternal'` so the
6
+ * REPL's main loop drives the engine instead of reading user input.
7
+ *
8
+ * The user can still `/autonomy stop` or Ctrl+C to exit the loop normally.
9
+ *
10
+ * Extracted from `cli/index.ts` to make the contract — "given a flag
11
+ * string and the wired container, launch an eternal loop" — testable
12
+ * without spinning up the entire CLI. Returns `true` if a launch
13
+ * happened, `false` if the flag was empty.
14
+ */
15
+ import type { Agent } from '@wrongstack/core';
16
+ import { type Config, EternalAutonomyEngine, type JournalEntry } from '@wrongstack/core';
17
+ import type { Token } from '@wrongstack/core/kernel';
18
+ import type { TerminalRenderer } from './renderer.js';
19
+ import type { AutonomyMode } from './slash-commands/autonomy.js';
20
+ /**
21
+ * The container type is structural because `@wrongstack/runtime`'s `Container`
22
+ * is not part of the public re-export surface, and pulling the full type
23
+ * in from `core/kernel/container` would create an awkward cross-package
24
+ * import. The container's structural contract (`.resolve(token)`) is the
25
+ * only thing this helper actually needs; runtime callers pass a real
26
+ * `Container` and the cast inside the helper handles the rest.
27
+ */
28
+ type ContainerLike = {
29
+ resolve: <T>(token: Token<T>) => T;
30
+ };
31
+ export interface EternalFlagDeps {
32
+ /** The `--eternal` flag value (already trimmed). Empty string = no-op. */
33
+ eternalFlag: string;
34
+ projectRoot: string;
35
+ agent: Agent;
36
+ container: ContainerLike;
37
+ renderer: TerminalRenderer;
38
+ /**
39
+ * Broadcast hook for engine iteration events. Typed as `unknown` rather
40
+ * than `unknown` so callers can pass a JournalEntry-typed function
41
+ * without contravariance noise (the engine forwards whatever it
42
+ * produces; the caller chooses the right shape for its listener).
43
+ */
44
+ broadcastEternalIteration: (iter: JournalEntry) => void;
45
+ /** Resolved max context tokens (0 = unknown; engine decides its own cap). */
46
+ effectiveMaxContext: number;
47
+ configRef: {
48
+ current: Config;
49
+ };
50
+ autonomyModeRef: {
51
+ current: AutonomyMode;
52
+ };
53
+ /**
54
+ * Optional sink for the constructed engine. The CLI's `index.ts` does
55
+ * not currently consume the engine outside the helper, so most callers
56
+ * can leave this off. The flag exists so a test (or a future feature
57
+ * that needs to keep the engine alive past the helper's return) can
58
+ * observe the engine the helper produced without re-deriving it.
59
+ */
60
+ eternalEngineRef?: {
61
+ current: EternalAutonomyEngine | undefined;
62
+ };
63
+ }
64
+ export declare function launchEternalFromFlag(deps: EternalFlagDeps): Promise<boolean>;
65
+ export {};
66
+ //# sourceMappingURL=cli-eternal-flag.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-eternal-flag.d.ts","sourceRoot":"","sources":["../src/cli-eternal-flag.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAEL,KAAK,MAAM,EAEX,qBAAqB,EACrB,KAAK,YAAY,EAElB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAGjE;;;;;;;GAOG;AACH,KAAK,aAAa,GAAG;IAAE,OAAO,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAA;CAAE,CAAC;AAE5D,MAAM,WAAW,eAAe;IAC9B,0EAA0E;IAC1E,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,KAAK,CAAC;IACb,SAAS,EAAE,aAAa,CAAC;IACzB,QAAQ,EAAE,gBAAgB,CAAC;IAC3B;;;;;OAKG;IACH,yBAAyB,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI,CAAC;IACxD,6EAA6E;IAC7E,mBAAmB,EAAE,MAAM,CAAC;IAG5B,SAAS,EAAE;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAC/B,eAAe,EAAE;QAAE,OAAO,EAAE,YAAY,CAAA;KAAE,CAAC;IAC3C;;;;;;OAMG;IACH,gBAAgB,CAAC,EAAE;QACjB,OAAO,EAAE,qBAAqB,GAAG,SAAS,CAAC;KAC5C,CAAC;CACH;AAED,wBAAsB,qBAAqB,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,OAAO,CAAC,CAkDnF"}
@@ -0,0 +1,13 @@
1
+ import { CLI_VERSION } from './version.js';
2
+ export { CLI_VERSION };
3
+ export declare function main(argv: string[]): Promise<number>;
4
+ /**
5
+ * Prompt the user about an abandoned session. The lockfile lifecycle
6
+ * guarantees we only get here when the previous instance died without
7
+ * writing `session_end` AND there's real work on disk (≥1 message).
8
+ *
9
+ * `--recover` short-circuits to "resume" without asking; piped/non-TTY
10
+ * input degrades to the same — the alternative is hanging on stdin or
11
+ * forcing the user to remember a flag they never typed.
12
+ */
13
+ //# sourceMappingURL=cli-main.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-main.d.ts","sourceRoot":"","sources":["../src/cli-main.ts"],"names":[],"mappings":"AAmFA,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AA2B3C,OAAO,EAAE,WAAW,EAAE,CAAC;AAavB,wBAAsB,IAAI,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAgtE1D;AAED;;;;;;;;GAQG"}
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Interactive prompt for an abandoned-session recovery decision.
3
+ *
4
+ * Three branches:
5
+ * - `autoRecover` is true (caller passed `--recover`): resume silently.
6
+ * - stdin is not a TTY (CI / piped): skip, leave the session alone.
7
+ * - interactive: ask the user — y/Y/Enter resume, n/N skip, d/D delete.
8
+ *
9
+ * Exists as a free function so it can be unit-tested with a fake
10
+ * `ReadlineInputReader` and a renderer stub. Previously a private nested
11
+ * function in `index.ts`; extracted as part of the cli/index.ts decompose
12
+ * pass to make the recovery contract independently testable.
13
+ */
14
+ import type { AbandonedSession } from '@wrongstack/core';
15
+ import type { ReadlineInputReader } from './input-reader.js';
16
+ import type { TerminalRenderer } from './renderer.js';
17
+ export type RecoveryDecision = 'resume' | 'delete' | 'skip';
18
+ export declare function promptRecovery(reader: ReadlineInputReader, renderer: TerminalRenderer, abandoned: AbandonedSession, autoRecover: boolean): Promise<RecoveryDecision>;
19
+ //# sourceMappingURL=cli-recovery-prompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-recovery-prompt.d.ts","sourceRoot":"","sources":["../src/cli-recovery-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAC7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtD,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE5D,wBAAsB,cAAc,CAClC,MAAM,EAAE,mBAAmB,EAC3B,QAAQ,EAAE,gBAAgB,EAC1B,SAAS,EAAE,gBAAgB,EAC3B,WAAW,EAAE,OAAO,GACnB,OAAO,CAAC,gBAAgB,CAAC,CAkC3B"}
@@ -0,0 +1,3 @@
1
+ import type { UpdateInfo } from './update-check.js';
2
+ export declare function printUpdateNotice(initialUpdateInfo?: UpdateInfo | undefined): Promise<UpdateInfo | undefined>;
3
+ //# sourceMappingURL=cli-update-notice.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli-update-notice.d.ts","sourceRoot":"","sources":["../src/cli-update-notice.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAIpD,wBAAsB,iBAAiB,CACrC,iBAAiB,CAAC,EAAE,UAAU,GAAG,SAAS,GACzC,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAkBjC"}
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Config doctor — deterministic diagnosis and auto-repair for the standard
3
+ * config file (~/.wrongstack/config.json and the per-project config).
4
+ *
5
+ * Pure module: `diagnoseConfig` never touches the filesystem. The /doctor
6
+ * slash command owns file IO, backups, and persistence so the engine stays
7
+ * trivially testable.
8
+ *
9
+ * Repair philosophy: a removed key is always safe — built-in defaults (and,
10
+ * for `extensions`, each plugin's `defaultConfig`) are merged underneath user
11
+ * values at load time, so deleting an invalid value falls back to a known-good
12
+ * default. Values are only rewritten when the intent is unambiguous (e.g. the
13
+ * string "true" for a boolean field); anything ambiguous is reported as a
14
+ * non-fixable finding instead of guessed at.
15
+ */
16
+ import type { JSONSchema } from '@wrongstack/core';
17
+ export type DoctorSeverity = 'error' | 'warning';
18
+ export interface DoctorFinding {
19
+ /** Dot path of the offending value, e.g. `autonomy.defaultMode`. */
20
+ path: string;
21
+ problem: string;
22
+ severity: DoctorSeverity;
23
+ /** Present when the finding is auto-fixable; describes the repair. */
24
+ fix?: string | undefined;
25
+ }
26
+ export interface DoctorReport {
27
+ findings: DoctorFinding[];
28
+ /** Deep copy of the input with every fixable finding repaired. */
29
+ fixed: Record<string, unknown>;
30
+ /** True when `fixed` differs from the input. */
31
+ changed: boolean;
32
+ }
33
+ /** The subset of Plugin the doctor needs to validate `extensions` sections. */
34
+ export interface PluginSchemaInfo {
35
+ name: string;
36
+ configSchema?: JSONSchema | undefined;
37
+ }
38
+ export declare function diagnoseConfig(cfg: Record<string, unknown>, plugins?: PluginSchemaInfo[]): DoctorReport;
39
+ //# sourceMappingURL=config-doctor.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config-doctor.d.ts","sourceRoot":"","sources":["../src/config-doctor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAQnD,MAAM,MAAM,cAAc,GAAG,OAAO,GAAG,SAAS,CAAC;AAEjD,MAAM,WAAW,aAAa;IAC5B,oEAAoE;IACpE,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,cAAc,CAAC;IACzB,sEAAsE;IACtE,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC1B;AAED,MAAM,WAAW,YAAY;IAC3B,QAAQ,EAAE,aAAa,EAAE,CAAC;IAC1B,kEAAkE;IAClE,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,gDAAgD;IAChD,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,+EAA+E;AAC/E,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;CACvC;AAyED,wBAAgB,cAAc,CAC5B,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC5B,OAAO,GAAE,gBAAgB,EAAO,GAC/B,YAAY,CA4Sd"}
@@ -0,0 +1,54 @@
1
+ export declare const MAX_CONFIG_HISTORY_ENTRIES = 50;
2
+ export interface HistoryEntry {
3
+ id: string;
4
+ timestamp: string;
5
+ description: string;
6
+ snapshotMasked: Record<string, unknown>;
7
+ diffSummary: string;
8
+ }
9
+ interface HistoryIndex {
10
+ version: 1;
11
+ entries: Array<{
12
+ id: string;
13
+ timestamp: string;
14
+ description: string;
15
+ }>;
16
+ }
17
+ type HomeDirFn = () => string;
18
+ /**
19
+ * Backup current config.json → config.json.last and timestamped .bak files.
20
+ * Safe to call even if config.json doesn't exist. Never throws.
21
+ *
22
+ * IMPORTANT: config.json and .key are never deleted by this function.
23
+ * Only config.json.*.bak timestamped snapshots are pruned.
24
+ */
25
+ export declare function backupCurrent(homeFn?: HomeDirFn): Promise<void>;
26
+ /**
27
+ * Append a history entry for a config change.
28
+ */
29
+ export declare function appendHistory(oldCfg: Record<string, unknown>, newCfg: Record<string, unknown>, description: string, homeFn?: HomeDirFn): Promise<string>;
30
+ /**
31
+ * List all history entries (newest first).
32
+ */
33
+ export declare function listHistory(homeFn?: HomeDirFn): Promise<HistoryIndex['entries']>;
34
+ /**
35
+ * Get a specific history entry by ID.
36
+ */
37
+ export declare function getHistoryEntry(id: string, homeFn?: HomeDirFn): Promise<HistoryEntry | null>;
38
+ /**
39
+ * Restore config.json to a given history entry's snapshot.
40
+ */
41
+ export declare function restoreFromHistory(id: string, homeFn?: HomeDirFn): Promise<{
42
+ ok: boolean;
43
+ backupId: string | null;
44
+ error?: string | undefined;
45
+ }>;
46
+ /**
47
+ * Restore config.json to the .last backup.
48
+ */
49
+ export declare function restoreLast(homeFn?: HomeDirFn): Promise<{
50
+ ok: boolean;
51
+ error?: string | undefined;
52
+ }>;
53
+ export {};
54
+ //# sourceMappingURL=config-history.d.ts.map