@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,58 @@
1
+ import type { Config } from '@wrongstack/core';
2
+ import type { UpdateInfo } from './update-check.js';
3
+ export interface PreflightResult {
4
+ /** The (possibly refreshed) update info, after the 2-second
5
+ * quick-check. Undefined if the check was aborted. */
6
+ updateInfo: UpdateInfo | undefined;
7
+ /** Whether `setDebugStreamEnabled(true)` was called. Callers
8
+ * don't need this today, but exporting it makes the
9
+ * orchestrator's effect explicit. */
10
+ debugStreamEnabled: boolean;
11
+ }
12
+ /**
13
+ * Default `NODE_ENV=production` when unset, so the React/Ink
14
+ * `react-reconciler.development.js` path (which ticks
15
+ * `performance.measure()` per render and leaks ~200 user-timing
16
+ * entries/sec into Node's global timeline) is never picked.
17
+ *
18
+ * Must run before the lazy `--tui` import evaluates ink/react.
19
+ * The marker flag lets `buildChildEnv()` strip the injected
20
+ * value from child processes \u2014 a leaked `NODE_ENV=production`
21
+ * would make `pnpm install` skip devDependencies and flip
22
+ * test-runner behavior.
23
+ */
24
+ export declare function applyNodeEnvDefault(): void;
25
+ /**
26
+ * Pin one stable shell for the session on Windows via `WRONGSTACK_SHELL`, so
27
+ * the bash tool's shell routing and the system-prompt Environment block agree
28
+ * on a single target the model can write syntax for. No-op on POSIX and when
29
+ * the user already set a valid `WRONGSTACK_SHELL`. Defaults Windows to
30
+ * PowerShell (pwsh 7+ when present); `WRONGSTACK_SHELL=cmd` opts back to cmd.exe.
31
+ *
32
+ * Like `applyNodeEnvDefault()`, this is idempotent — once the env var is set the
33
+ * second call (inside `runPreflight()`) is a no-op.
34
+ */
35
+ export declare function applySessionShellDefault(): void;
36
+ /**
37
+ * Best-effort `printUpdateNotice()` wrapper. The 2-second
38
+ * quick-check is a network call that must not block boot;
39
+ * callers get back the (possibly refreshed) `UpdateInfo`
40
+ * so version-aware UI can render without re-fetching.
41
+ */
42
+ export declare function applyPrintUpdateNotice(initialUpdateInfo: UpdateInfo | undefined): Promise<UpdateInfo | undefined>;
43
+ /**
44
+ * Seed the stream-debug singleton from persisted config so
45
+ * `WireAdapter` picks it up on construction. Runtime toggles
46
+ * (e.g. `/diag-stats stream-debug on`) update this singleton
47
+ * directly; the config file is the source of truth for
48
+ * restarts. The default debug-stream callback is intentionally
49
+ * left unset \u2014 see the module-level docstring for why.
50
+ */
51
+ export declare function applyDebugStreamSeed(config: Config): Promise<void>;
52
+ /**
53
+ * Apply every pre-boot side effect, in dependency order. Returns
54
+ * the (possibly refreshed) update info so the caller can write
55
+ * it back into the `BootContext` for downstream consumers.
56
+ */
57
+ export declare function runPreflight(config: Config, initialUpdateInfo: UpdateInfo | undefined): Promise<PreflightResult>;
58
+ //# sourceMappingURL=preflight.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preflight.d.ts","sourceRoot":"","sources":["../src/preflight.ts"],"names":[],"mappings":"AA+CA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,kBAAkB,CAAC;AAE/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAC;AAGpD,MAAM,WAAW,eAAe;IAC9B;2DACuD;IACvD,UAAU,EAAE,UAAU,GAAG,SAAS,CAAC;IACnC;;0CAEsC;IACtC,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAK1C;AAED;;;;;;;;;GASG;AACH,wBAAgB,wBAAwB,IAAI,IAAI,CAE/C;AAED;;;;;GAKG;AACH,wBAAsB,sBAAsB,CAC1C,iBAAiB,EAAE,UAAU,GAAG,SAAS,GACxC,OAAO,CAAC,UAAU,GAAG,SAAS,CAAC,CAEjC;AAED;;;;;;;GAOG;AACH,wBAAsB,oBAAoB,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAKxE;AAED;;;;GAIG;AACH,wBAAsB,YAAY,CAChC,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,UAAU,GAAG,SAAS,GACxC,OAAO,CAAC,eAAe,CAAC,CAS1B"}
@@ -0,0 +1,56 @@
1
+ import type { ProjectEntry } from './slash-commands/project-utils.js';
2
+ export interface PickerItem {
3
+ key: string;
4
+ label: string;
5
+ subtitle?: string | undefined;
6
+ meta?: string | undefined;
7
+ kind: 'project' | 'action';
8
+ }
9
+ export interface PickerConfig {
10
+ title: string;
11
+ items: PickerItem[];
12
+ globalConfigPath?: string | undefined;
13
+ }
14
+ export interface PickerResult {
15
+ kind: 'project' | 'action';
16
+ key: string;
17
+ /** Resolved project entry (only set when kind === 'project') */
18
+ project?: ProjectEntry | undefined;
19
+ /** Action identifier: 'new-session', 'prev-sessions', 'quit' */
20
+ action?: 'new-session' | 'prev-sessions' | 'quit' | undefined;
21
+ }
22
+ /**
23
+ * Build the picker items from the projects manifest plus built-in actions.
24
+ */
25
+ export declare function buildPickerItems(opts: {
26
+ globalConfigPath?: string | undefined;
27
+ currentProjectRoot?: string | undefined;
28
+ }): Promise<PickerItem[]>;
29
+ /**
30
+ * Filter items by a case-insensitive substring match against label and subtitle.
31
+ * Only project items are filtered; action items and dividers always appear.
32
+ *
33
+ * @public — exported for testing
34
+ */
35
+ export declare function filterItems(allItems: PickerItem[], filter: string): PickerItem[];
36
+ /**
37
+ * Compute the effective visible height accounting for the filter bar overhead.
38
+ *
39
+ * @public — exported for testing
40
+ */
41
+ export declare function effectiveVisibleHeight(baseVisibleHeight: number, filter: string): number;
42
+ /**
43
+ * Skip divider items at the given index, moving forward or backward.
44
+ * Returns the adjusted index, clamped to bounds.
45
+ *
46
+ * @public — exported for testing
47
+ */
48
+ export declare function skipDivider(items: PickerItem[], idx: number, direction: -1 | 1): number;
49
+ /**
50
+ * Run the interactive project picker. Returns the selection or undefined on cancel.
51
+ */
52
+ export declare function runProjectPicker(opts: {
53
+ globalConfigPath?: string | undefined;
54
+ currentProjectRoot?: string | undefined;
55
+ }): Promise<PickerResult | undefined>;
56
+ //# sourceMappingURL=project-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-picker.d.ts","sourceRoot":"","sources":["../src/project-picker.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAwBtE,MAAM,WAAW,UAAU;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,EAAE,SAAS,GAAG,QAAQ,CAAC;CAC5B;AAED,MAAM,WAAW,YAAY;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
3
+ import type { ProviderApiKey, ProviderConfig, SecretVault } from '@wrongstack/core';
4
+ /**
5
+ * Normalize a ProviderConfig to the canonical `apiKeys[]` form.
6
+ * Migrates the legacy single-key `apiKey` field on the fly so every
7
+ * consumer sees a uniform shape. Does NOT mutate the input.
8
+ */
9
+ export declare function normalizeKeys(cfg: ProviderConfig): ProviderApiKey[];
10
+ /**
11
+ * Write a normalized key list back into a ProviderConfig. Does NOT mirror
12
+ * the plaintext key to the legacy `apiKey` field — that would leak the
13
+ * secret on any accidental JSON.stringify of the config. Consumers that
14
+ * need the real key must call {@link resolveActiveApiKey}.
15
+ */
16
+ export declare function writeKeysBack(cfg: ProviderConfig, keys: ProviderApiKey[]): void;
17
+ /**
18
+ * Extract the active (decrypted) API key from a ProviderConfig.
19
+ *
20
+ * Resolution order:
21
+ * 1. `apiKeys[]` — pick the entry matching `activeKey`, or the first one
22
+ * 2. Legacy `apiKey` field — only for configs not yet migrated to multi-key
23
+ *
24
+ * This is the **preferred** way to read the API key. Never read `cfg.apiKey`
25
+ * directly in new code — after {@link writeKeysBack} it is cleared, and even
26
+ * when present on a freshly-loaded config it may contain a masked value.
27
+ */
28
+ export declare function resolveActiveApiKey(cfg: ProviderConfig): string | undefined;
29
+ /**
30
+ * Clear top-level provider/model defaults when provider mutations make them
31
+ * stale. This prevents a removed provider, deleted final key, or edited model
32
+ * allowlist from being accepted on the next boot and crashing provider setup.
33
+ */
34
+ export declare function clearStaleProviderDefaults(config: Record<string, unknown>): void;
35
+ /**
36
+ * Return the label of the active key, or the first key's label if no
37
+ * active is pinned. Returns `undefined` when there are no keys at all.
38
+ */
39
+ export declare function activeLabel(cfg: ProviderConfig, keys: ProviderApiKey[]): string | undefined;
40
+ /** Mask an API key for display: show first 4 + last 4 chars. */
41
+ export declare function maskedKey(key: string): string;
42
+ /** ISO-8601 timestamp for key `createdAt` fields. */
43
+ export declare function nowIso(): string;
44
+ /**
45
+ * Read the on-disk config file and return its `providers` map, fully
46
+ * decrypted. Returns `{}` on ENOENT or corrupt JSON (surfacing the error
47
+ * via the optional `warn` callback when provided).
48
+ */
49
+ export declare function loadConfigProviders(configPath: string, vault: SecretVault, opts?: {
50
+ warn?: (msg: string) => void;
51
+ }): Promise<Record<string, ProviderConfig>>;
52
+ /**
53
+ * Load → mutate → encrypt → atomic-write. Operates on the FULL config file
54
+ * so non-provider keys are preserved. Refuses to overwrite a corrupt-but-
55
+ * existing config (the user may still have salvageable data).
56
+ */
57
+ export declare function mutateConfigProviders(configPath: string, vault: SecretVault, mutator: (providers: Record<string, ProviderConfig>) => void): Promise<void>;
58
+ //# sourceMappingURL=provider-config-utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-config-utils.d.ts","sourceRoot":"","sources":["../src/provider-config-utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAW,MAAM,kBAAkB,CAAC;AAE1D,OAAO,EAAE,aAAa,EAAE,CAAC;AASzB,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAGpF;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,GAAG,cAAc,EAAE,CAQnE;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI,CAgB/E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAQ3E;AAqBD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAchF;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,GAAG,EAAE,cAAc,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,MAAM,GAAG,SAAS,CAG3F;AAED,gEAAgE;AAChE,wBAAgB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAM7C;AAED,qDAAqD;AACrD,wBAAgB,MAAM,IAAI,MAAM,CAE/B;AAMD;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,WAAW,EAClB,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,GACtC,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAoBzC;AAED;;;;GAIG;AACH,wBAAsB,qBAAqB,CACzC,UAAU,EAAE,MAAM,EAClB,KAAK,EAAE,WAAW,EAClB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,IAAI,GAC3D,OAAO,CAAC,IAAI,CAAC,CA0Cf"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * Shared provider-config helpers used by the picker, main boot sequence,
3
+ * and subcommands. Keeps provider key detection and alias resolution in
4
+ * one place so the logic doesn't drift between call sites.
5
+ */
6
+ import type { Config, ModelsRegistry, ProviderConfig, ResolvedProvider } from '@wrongstack/core';
7
+ /** Return the provider's visible model ids.
8
+ *
9
+ * For most providers, `cfg.models` is a strict user allowlist. ChatGPT/OpenAI/Codex
10
+ * are catalog-backed by the curated providers.json overlay, so their saved config
11
+ * model list is treated as a cache/visibility hint: an empty list falls back to
12
+ * refreshed catalog models, and a non-empty list is augmented with catalog models
13
+ * so newly-added providers.json entries can be fetched again when needed. */
14
+ export declare function visibleModelIds(providerId: string, config: Config, catalogModelIds: string[], cfg?: ProviderConfig | undefined): string[];
15
+ /**
16
+ * Is this a keyless local gateway — a server on a loopback address that
17
+ * declares no API-key env vars (omniroute, LiteLLM/vLLM/LM Studio/Ollama
18
+ * running locally, …)? These need no credential, so they belong in the
19
+ * picker even though `hasApiKey` returns false for them. Accepts the
20
+ * minimal shape both call sites can supply.
21
+ */
22
+ export declare function isKeylessLocalProvider(provider: {
23
+ apiBase?: string | undefined;
24
+ envVars?: string[] | undefined;
25
+ }): boolean;
26
+ /**
27
+ * Does this provider have an API key available — either in the
28
+ * environment (via one of its known env vars) or stored in config
29
+ * (encrypted or plaintext)? Used to filter the picker to providers
30
+ * the user can actually use right now.
31
+ */
32
+ export declare function hasApiKey(provider: ResolvedProvider, config?: Config): boolean;
33
+ /**
34
+ * Build the list of providers the user can switch to mid-session.
35
+ * Only includes providers that have an API key available (env var or
36
+ * stored config). Falls back to the full catalog when no keys are found.
37
+ *
38
+ * Models are inlined from the catalog (or from `cfg.models` for custom
39
+ * entries) so the picker can show a real selection.
40
+ */
41
+ export declare function buildPickableProviders(modelsRegistry: ModelsRegistry, config: Config): Promise<Array<{
42
+ id: string;
43
+ family: string;
44
+ models: string[];
45
+ }>>;
46
+ /**
47
+ * Resolve a provider id that may be an alias. When the user has
48
+ * `providers[id].type` pointing at a different catalog entry, return
49
+ * the catalog id so downstream lookups still work. Returns the
50
+ * original id unchanged when it's a direct catalog match.
51
+ */
52
+ export declare function resolveProviderAlias(providerId: string, config: Config): string;
53
+ //# sourceMappingURL=provider-helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"provider-helpers.d.ts","sourceRoot":"","sources":["../src/provider-helpers.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAuBjG;;;;;;6EAM6E;AAC7E,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,eAAe,EAAE,MAAM,EAAE,EACzB,GAAG,CAAC,EAAE,cAAc,GAAG,SAAS,GAC/B,MAAM,EAAE,CAKV;AAoBD;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE;IAC/C,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC,GAAG,OAAO,CAGV;AAED;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,gBAAgB,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAO9E;AAED;;;;;;;GAOG;AACH,wBAAsB,sBAAsB,CAC1C,cAAc,EAAE,cAAc,EAC9B,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAAC,CA4ClE;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAM/E"}
@@ -0,0 +1,76 @@
1
+ import type { ContentBlock, Renderer, TextBlock, ToolResultRenderMode } from '@wrongstack/core';
2
+ export interface TerminalRendererOptions {
3
+ out?: NodeJS.WriteStream | undefined;
4
+ err?: NodeJS.WriteStream | undefined;
5
+ }
6
+ export declare class TerminalRenderer implements Renderer {
7
+ private readonly out;
8
+ private readonly err;
9
+ private lineStart;
10
+ /**
11
+ * When true, every stdout-bound method is a no-op. This is the only
12
+ * safe state to be in while Ink owns the terminal (TUI mode):
13
+ * raw writes to stdout interleave with Ink's cursor math and cause
14
+ * the input + status bar to be reprinted as scrollback junk.
15
+ * Stderr-bound methods (writeInfo/Warning/Error) still flow — they
16
+ * go to a different stream Ink does not manage.
17
+ */
18
+ private silent;
19
+ /**
20
+ * Per-tool on-screen result render mode. Defaults to `'extend'` so
21
+ * existing callers without `setResultRenderMode` see full content.
22
+ * `setResultRenderMode(name, mode)` overrides the entry for `name`; the
23
+ * override is one-shot for that name (the default reasserts after the
24
+ * next write) so callers can set the mode right before each tool call
25
+ * without leaking state across unrelated tool calls.
26
+ */
27
+ private renderModes;
28
+ /** Mode applied when no entry is set for a given tool name. */
29
+ private static readonly DEFAULT_RENDER_MODE;
30
+ /** Lines kept per tool family in `extend` mode. */
31
+ private static readonly EXTEND_PREVIEW_LINES;
32
+ constructor(opts?: TerminalRendererOptions);
33
+ /**
34
+ * Toggle stdout suppression. Call `setSilent(true)` right before
35
+ * handing the terminal to Ink, and `setSilent(false)` after Ink
36
+ * exits. Idempotent.
37
+ */
38
+ setSilent(silent: boolean): void;
39
+ isSilent(): boolean;
40
+ setResultRenderMode(name: string, mode: ToolResultRenderMode): void;
41
+ private getRenderMode;
42
+ private clearRenderMode;
43
+ write(input: string | TextBlock): void;
44
+ writeLine(text?: string): void;
45
+ writeBlock(block: ContentBlock): void;
46
+ writeToolCall(name: string, input: unknown): void;
47
+ writeToolResult(name: string, content: unknown, isError: boolean): void;
48
+ writeDiff(diff: string): void;
49
+ writeWarning(text: string): void;
50
+ writeError(text: string): void;
51
+ writeInfo(text: string): void;
52
+ clear(): void;
53
+ /**
54
+ * Write a flashy agent completion banner for delegate tool results.
55
+ * Renders a box like:
56
+ * ┌─────────────────────────────────────┐
57
+ * │ ✓ [role] done in 4m 32s │
58
+ * │ 127 iterations · 341 tools │
59
+ * │ Found 14 bugs across 6 files... │
60
+ * └─────────────────────────────────────┘
61
+ */
62
+ writeAgentSummary(summary: string, ok: boolean): void;
63
+ /**
64
+ * Render subagent completion banners from a RunResult.
65
+ * Uses `delegateSummaries` when available (populated by delegate tool),
66
+ * otherwise falls back to scanning message history.
67
+ */
68
+ writeDelegateSummaries(result: {
69
+ delegateSummaries?: Array<{
70
+ summary: string | undefined;
71
+ ok: boolean;
72
+ }>;
73
+ messages?: Array<unknown> | undefined;
74
+ }): void;
75
+ }
76
+ //# sourceMappingURL=renderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"renderer.d.ts","sourceRoot":"","sources":["../src/renderer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,SAAS,EAAE,oBAAoB,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,MAAM,GAAG,IAAI,CAK5B;IAED,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE/B;IACD,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE7B;IACD,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAE5B;IAED,KAAK,IAAI,IAAI,CAIZ;IAED;;;;;;;;OAQG;IACH,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,GAAG,IAAI,CAwCpD;IAED;;;;OAIG;IACH,sBAAsB,CAAC,MAAM,EAAE;QAC7B,iBAAiB,CAAC,EAAE,KAAK,CAAC;YAAE,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;YAAC,EAAE,EAAE,OAAO,CAAA;SAAE,CAAC,CAAC;QACxE,QAAQ,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,GAAG,SAAS,CAAC;KACvC,GAAG,IAAI,CAkCP;CACF"}
package/dist/repl.d.ts ADDED
@@ -0,0 +1,162 @@
1
+ import type { Agent, AttachmentStore, SlashCommandRegistry, TokenCounter, TodoItem } from '@wrongstack/core';
2
+ import { type VisionAdapters } from '@wrongstack/runtime';
3
+ import type { ReadlineInputReader } from './input-reader.js';
4
+ import type { TerminalRenderer } from './renderer.js';
5
+ /**
6
+ * Extract canonical "<nextsteps>" suggestions from the agent's final output.
7
+ * Loose "Next steps" prose is intentionally ignored; `/next` requires the tagged block.
8
+ * Returns null when no suggestions are found.
9
+ *
10
+ * Gated on the live todo list: when the agent still has open todos
11
+ * (`pending` or `in_progress`), we suppress `<nextsteps>` entirely and clear
12
+ * the auto-suggestion store. Surfacing suggestions mid-task would race the
13
+ * todo loop — YOLO+auto could pick the top suggestion and pivot away from
14
+ * the unfinished work, and `/next 1` would replace the next todo with an
15
+ * arbitrary prompt. Finishing the todo list comes first; suggestions re-arm
16
+ * on the next turn once everything is `completed`.
17
+ */
18
+ export declare function parseSuggestionsFromOutput(finalText: string, todos?: readonly TodoItem[] | null): string[] | null;
19
+ /**
20
+ * Extract only the auto="true" items from next_steps output.
21
+ * Used by YOLO+auto autonomy mode.
22
+ */
23
+ export declare function parseAutoSuggestionsFromOutput(finalText: string): string[] | null;
24
+ export interface ReplOptions {
25
+ agent: Agent;
26
+ renderer: TerminalRenderer;
27
+ reader: ReadlineInputReader;
28
+ slashRegistry: SlashCommandRegistry;
29
+ attachments: AttachmentStore;
30
+ banner?: boolean | undefined;
31
+ tokenCounter?: TokenCounter | undefined;
32
+ visionAdapters?: VisionAdapters | undefined;
33
+ /** Autonomy mode state getter. */
34
+ getAutonomy?: (() => import('./slash-commands/autonomy.js').AutonomyMode) | undefined;
35
+ /** Set autonomy mode (used by SIGINT handler to flip back to 'off'). */
36
+ onAutonomy?: ((mode: import('./slash-commands/autonomy.js').AutonomyMode) => void) | undefined;
37
+ /**
38
+ * Whether next-task prediction is enabled. When true, the REPL runs a
39
+ * lightweight single-shot prediction after each completed turn and shows
40
+ * the likely next steps (display-only). Toggled via `/next`.
41
+ */
42
+ getNextPredict?: (() => boolean) | undefined;
43
+ /**
44
+ * Called after each agent turn with parsed "💡 Next steps" suggestions
45
+ * extracted from the final response text. The host stores these so
46
+ * `/next 1`, `/next 1 2 3` can select and execute them.
47
+ * Passed `null` when no suggestions were found in the output.
48
+ */
49
+ onSuggestionsParsed?: ((suggestions: string[] | null) => void) | undefined;
50
+ /**
51
+ * Read the current suggestion list. Used by the auto-proceed loop to
52
+ * check whether there are suggestions to feed when autonomy is 'auto'.
53
+ */
54
+ getSuggestions?: (() => string[]) | undefined;
55
+ /**
56
+ * Read the current auto suggestion list (items with auto="true" attribute).
57
+ * Used by YOLO+auto autonomy mode.
58
+ */
59
+ getAutoSuggestions?: (() => string[]) | undefined;
60
+ /**
61
+ * YOLO mode getter. When true, auto="true" suggestions trigger auto-proceed.
62
+ */
63
+ getYolo?: (() => boolean) | undefined;
64
+ /**
65
+ * Autonomy next prompt template. Used to construct the prompt when auto-submitting
66
+ * a next_steps item in YOLO+auto mode. Contains {{suggestion}} placeholder.
67
+ */
68
+ autonomyNextPrompt?: string | undefined;
69
+ /**
70
+ * Delay in milliseconds before auto-proceeding with the top suggestion
71
+ * when autonomy mode is 'auto'. Default 45 seconds.
72
+ */
73
+ autoProceedDelayMs?: number | undefined;
74
+ /**
75
+ * Maximum auto-proceed iterations before stopping to prevent infinite
76
+ * loops. Default 50. 0 means unlimited.
77
+ */
78
+ autoProceedMaxIterations?: number | undefined;
79
+ /**
80
+ * LLM validation gate called before starting the auto-proceed countdown.
81
+ * Receives the top suggestion and the last agent output text. Should
82
+ * return `true` if auto-proceeding is safe, `false` if user review is
83
+ * needed. The countdown only starts when this returns `true`.
84
+ */
85
+ onValidateAutoProceed?: ((suggestion: string, lastOutput: string) => Promise<boolean>) | undefined;
86
+ /**
87
+ * Access the eternal-autonomy engine. When autonomy mode is 'eternal'
88
+ * the REPL skips reading user input and instead drives engine
89
+ * iterations from this loop — so the engine and the REPL never compete
90
+ * for the shared Context. Returns null until /autonomy eternal primes it.
91
+ */
92
+ getEternalEngine?: (() => import('@wrongstack/core').EternalAutonomyEngine | null) | undefined;
93
+ /**
94
+ * Access the parallel-eternal engine. When autonomy mode is 'eternal-parallel'
95
+ * the REPL drives this engine instead of reading user input.
96
+ * Returns null until /autonomy parallel primes it.
97
+ */
98
+ getParallelEngine?: (() => import('@wrongstack/core').ParallelEternalEngine | null) | undefined;
99
+ /**
100
+ * Access the active SDD parallel run's control surface (or null). A running
101
+ * `/sdd parallel` blocks the prompt while it awaits completion, so this is the
102
+ * only mid-run stop path from the REPL — the SIGINT handler calls `stop()`.
103
+ */
104
+ getSddRun?: (() => import('@wrongstack/sdd').SddRunControl | null) | undefined;
105
+ /** Model-specific max context window (tokens). Used for the context bar in turn summaries. */
106
+ effectiveMaxContext?: number | undefined;
107
+ /** Live model-specific max context window. Prefer this over the startup snapshot when provided. */
108
+ getEffectiveMaxContext?: (() => number | undefined) | undefined;
109
+ /** Project / folder name shown in the banner. Usually `path.basename(projectRoot)`. */
110
+ projectName?: string | undefined;
111
+ /** Absolute project root — used to locate .wrongstack/goal.json for the goal banner. */
112
+ projectRoot?: string | undefined;
113
+ /** Full app config, used for HQ client publishing settings. */
114
+ appConfig?: import('@wrongstack/core').Config | undefined;
115
+ /** Live active session id for cross-surface client registration. */
116
+ getSessionId?: (() => string | undefined) | undefined;
117
+ /** Resolve current model vision support. Falls back to provider capability when omitted. */
118
+ supportsVision?: (() => boolean | Promise<boolean>) | undefined;
119
+ /** Skill loader for the skill generator wizard. */
120
+ skillLoader?: import('@wrongstack/core').SkillLoader | undefined;
121
+ /** Controller for the agents monitor overlay. */
122
+ agentsMonitorController?: {
123
+ visible: boolean;
124
+ setVisible: (visible: boolean) => void;
125
+ } | undefined;
126
+ /** Controller for fleet stream (subagent output to history). */
127
+ fleetStreamController?: {
128
+ enabled: boolean;
129
+ setEnabled: (enabled: boolean) => void;
130
+ } | undefined;
131
+ /**
132
+ * Shared controller for the `/interrupt` slash command. The REPL installs
133
+ * `abortLeader` here so the command can abort the active turn. Note: the REPL
134
+ * prompt is blocked during a run, so `/interrupt` is only dispatched at the
135
+ * prompt (where nothing is in flight) — Ctrl+C is the mid-run path.
136
+ */
137
+ interruptController?: {
138
+ abortLeader: () => boolean;
139
+ } | undefined;
140
+ /**
141
+ * Stop every running subagent. Wired to the director so the first Ctrl+C (and
142
+ * `/interrupt`) stops the fleet too, not just the leader. Returns the count
143
+ * stopped. Undefined when no fleet/director is active.
144
+ */
145
+ onInterruptFleet?: (() => number) | undefined;
146
+ /**
147
+ * Called after each agent.run() iteration completes so the host can
148
+ * report context pressure to the Director (for spawn pre-checks) or
149
+ * other systems that track token usage across the session.
150
+ */
151
+ onAgentIterationComplete?: ((estimatedTokens: number) => void) | undefined;
152
+ /**
153
+ * Called every second during the auto-proceed countdown with the
154
+ * remaining seconds until auto-proceed fires. Return true to abort
155
+ * the countdown and switch to manual mode.
156
+ */
157
+ onCountdownTick?: ((remainingSeconds: number) => boolean | void) | undefined;
158
+ /** Called when the REPL exits — use for cleanup such as removing event listeners. */
159
+ onDestroy?: (() => void) | undefined;
160
+ }
161
+ export declare function runRepl(opts: ReplOptions): Promise<number>;
162
+ //# sourceMappingURL=repl.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"repl.d.ts","sourceRoot":"","sources":["../src/repl.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,KAAK,EACL,eAAe,EAEf,oBAAoB,EACpB,YAAY,EACZ,QAAQ,EACT,MAAM,kBAAkB,CAAC;AAgB1B,OAAO,EAA2C,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAInG,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mBAAmB,CAAC;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAgCtD;;;;;;;;;;;;GAYG;AACH,wBAAgB,0BAA0B,CACxC,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,SAAS,QAAQ,EAAE,GAAG,IAAI,GACjC,MAAM,EAAE,GAAG,IAAI,CAcjB;AAED;;;GAGG;AACH,wBAAgB,8BAA8B,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,IAAI,CAGjF;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,MAAM,EAAE,mBAAmB,CAAC;IAC5B,aAAa,EAAE,oBAAoB,CAAC;IACpC,WAAW,EAAE,eAAe,CAAC;IAC7B,MAAM,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAC7B,YAAY,CAAC,EAAE,YAAY,GAAG,SAAS,CAAC;IACxC,cAAc,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IAC5C,kCAAkC;IAClC,WAAW,CAAC,EAAE,CAAC,MAAM,OAAO,8BAA8B,EAAE,YAAY,CAAC,GAAG,SAAS,CAAC;IACtF,wEAAwE;IACxE,UAA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,EAAE,MAAM,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC3E;;;;OAIG;IACH,eAAe,CAAC,EAAE,CAAC,CAAC,gBAAgB,EAAE,MAAM,KAAK,OAAO,GAAG,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7E,qFAAqF;IACrF,SAAS,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;CACtC;AAED,wBAAsB,OAAO,CAAC,IAAI,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAu2BhE"}
@@ -0,0 +1,17 @@
1
+ export interface ProjectFacts {
2
+ build?: string | undefined;
3
+ test?: string | undefined;
4
+ lint?: string | undefined;
5
+ run?: string | undefined;
6
+ hints: string[];
7
+ /** Top languages by source-file count, e.g. `['Python (142)', 'Shell (8)']`.
8
+ * Only populated by the source-tree scan fallback (no manifest matched). */
9
+ languages?: string[] | undefined;
10
+ /** Likely entry-point files discovered by the scan (relative paths). */
11
+ entryPoints?: string[] | undefined;
12
+ /** Non-ignored top-level directories discovered by the scan. */
13
+ topDirs?: string[] | undefined;
14
+ }
15
+ export declare function detectProjectFacts(root: string): Promise<ProjectFacts>;
16
+ export declare function renderAgentsTemplate(f: ProjectFacts): string;
17
+ //# sourceMappingURL=project-facts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-facts.d.ts","sourceRoot":"","sources":["../../src/services/project-facts.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,YAAY;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,GAAG,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACzB,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;iFAC6E;IAC7E,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACjC,wEAAwE;IACxE,WAAW,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACnC,gEAAgE;IAChE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC;AA0ND,wBAAsB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,YAAY,CAAC,CA+F5E;AAED,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,YAAY,GAAG,MAAM,CAyF5D"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * session-event-wiring — EventBus subscriptions for session audit logging,
3
+ * error tracking, and file-author recording. Also owns the
4
+ * SessionEventBridge and appendSessionEvent helper that gates on session
5
+ * identity so stale sessions don't pollute the current log.
6
+ *
7
+ * Extracted from cli-main.ts's monolithic main() to reduce cognitive load
8
+ * and enable focused testing.
9
+ */
10
+ import type { SessionEventBridge } from '@wrongstack/core';
11
+ export interface ErrorEntry {
12
+ ts: string;
13
+ phase: string;
14
+ code: string;
15
+ message: string;
16
+ }
17
+ export interface WireSessionEventsDeps {
18
+ evOn: (event: string, handler: (...args: any[]) => void) => void;
19
+ config: Record<string, unknown>;
20
+ context: Record<string, unknown>;
21
+ session: {
22
+ id: string;
23
+ };
24
+ sessionRef: {
25
+ current?: {
26
+ id: string;
27
+ } | undefined;
28
+ };
29
+ wpaths: {
30
+ globalRoot: string;
31
+ projectSlug: string;
32
+ };
33
+ projectRoot: string;
34
+ renderer?: {
35
+ writeInfo?: (msg: string) => void;
36
+ };
37
+ tuiOwnsScreen?: boolean;
38
+ }
39
+ export interface WireSessionEventsResult {
40
+ errorRing: ErrorEntry[];
41
+ sessionBridge: SessionEventBridge;
42
+ appendSessionEvent: (sessionId: string | undefined, event: Parameters<SessionEventBridge['append']>[0]) => void;
43
+ }
44
+ /** Wire SessionEventBridge, appendSessionEvent, error ring, and tool-lifecycle
45
+ * session audit events. Returns the sessionBridge (for compaction / audit-level
46
+ * changes) and the error ring array (for /diag). */
47
+ export declare function wireSessionEvents(deps: WireSessionEventsDeps): WireSessionEventsResult;
48
+ //# sourceMappingURL=session-event-wiring.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-event-wiring.d.ts","sourceRoot":"","sources":["../src/session-event-wiring.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAI3D,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,qBAAqB;IAEpC,IAAI,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,GAAG,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,KAAK,IAAI,CAAC;IACjE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAChC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,OAAO,EAAE;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IACxB,UAAU,EAAE;QAAE,OAAO,CAAC,EAAE;YAAE,EAAE,EAAE,MAAM,CAAA;SAAE,GAAG,SAAS,CAAA;KAAE,CAAC;IACrD,MAAM,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;IACpD,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE;QAAE,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;KAAE,CAAC;IACjD,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,UAAU,EAAE,CAAC;IACxB,aAAa,EAAE,kBAAkB,CAAC;IAClC,kBAAkB,EAAE,CAClB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,UAAU,CAAC,kBAAkB,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,KAC/C,IAAI,CAAC;CACX;AAID;;qDAEqD;AACrD,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,uBAAuB,CAmLtF"}
@@ -0,0 +1,38 @@
1
+ import type { EventBus, TokenCounter } from '@wrongstack/core';
2
+ import type { TerminalRenderer } from './renderer.js';
3
+ /**
4
+ * Accumulates per-session stats by listening to EventBus events. Designed
5
+ * to be created once in main(), live for the whole CLI invocation (single-shot
6
+ * or REPL), and produce the closing report when asked.
7
+ *
8
+ * Cost is intentionally not tracked here — TokenCounter is the authority.
9
+ */
10
+ export declare class SessionStats {
11
+ private readonly tokenCounter;
12
+ private readonly startedAt;
13
+ private apiRequests;
14
+ private iterations;
15
+ private errors;
16
+ private readonly toolStats;
17
+ private readonly readPaths;
18
+ private readonly editedPaths;
19
+ private readonly writtenPaths;
20
+ private bytesWritten;
21
+ private bashCommands;
22
+ private fetches;
23
+ private readonly _handlers;
24
+ constructor(events: EventBus, tokenCounter: TokenCounter);
25
+ /** Remove all event listeners. Call this when the session ends. */
26
+ destroy(events: EventBus): void;
27
+ hasActivity(): boolean;
28
+ /**
29
+ * Build the report string. Returns null when there's no recorded
30
+ * activity yet — caller decides whether to emit a placeholder or stay
31
+ * silent. Splitting `format()` out of `render()` lets the TUI's slash
32
+ * dispatcher take the string and turn it into a history entry, while
33
+ * REPL keeps the old direct-write path.
34
+ */
35
+ format(): string | null;
36
+ render(renderer: TerminalRenderer): void;
37
+ }
38
+ //# sourceMappingURL=session-stats.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"session-stats.d.ts","sourceRoot":"","sources":["../src/session-stats.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE/D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAStD;;;;;;GAMG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAe;IAC5C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAc;IAExC,OAAO,CAAC,WAAW,CAAK;IACxB,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,MAAM,CAAK;IAEnB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+B;IACzD,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAqB;IAC/C,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAqB;IACjD,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,YAAY,CAAK;IACzB,OAAO,CAAC,OAAO,CAAK;IAGpB,OAAO,CAAC,QAAQ,CAAC,SAAS,CAA+D;IAEzF,YAAY,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAY,EAmDvD;IAED,mEAAmE;IACnE,OAAO,CAAC,MAAM,EAAE,QAAQ,GAAG,IAAI,CAM9B;IAED,WAAW,IAAI,OAAO,CAOrB;IAED;;;;;;OAMG;IACH,MAAM,IAAI,MAAM,GAAG,IAAI,CAoFtB;IAED,MAAM,CAAC,QAAQ,EAAE,gBAAgB,GAAG,IAAI,CAIvC;CACF"}