@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
package/README.md CHANGED
@@ -20,7 +20,7 @@ wstack --tui # Ink-based TUI
20
20
  wstack desktop # Electron desktop app (same as --desktop)
21
21
  wstack webui # project WebUI (same as --webui)
22
22
  wstack hq # project-independent HQ dashboard (same as --hq)
23
- wstack --yolo # auto-approve normal project work; destructive calls still prompt
23
+ wstack --yolo # auto-approve tool calls unless explicitly denied
24
24
  wstack "refactor src/auth.ts" # one-shot query (no interactive loop)
25
25
 
26
26
  wstack --provider <id> --model <id> # skip the picker
@@ -101,9 +101,9 @@ API keys are encrypted at rest with AES-256-GCM and the key file at `~/.wrongsta
101
101
  | `--desktop` | Open WrongStack Desktop (also `wstack desktop`) |
102
102
  | `--webui` | Serve the project WebUI (also `wstack webui`) |
103
103
  | `--hq` | Start the project-independent HQ dashboard (also `wstack hq`) |
104
- | `--yolo` | Auto-approve normal in-project tool calls |
105
- | `--confirm-destructive` | Deprecated; destructive confirmations are always on in YOLO |
106
- | `--yolo-destructive` | Deprecated compatibility flag; destructive calls still prompt |
104
+ | `--yolo` | Auto-approve tool calls unless explicitly denied |
105
+ | `--confirm-destructive` | Deprecated compatibility flag; YOLO no longer prompts by destructiveness |
106
+ | `--yolo-destructive` | Deprecated compatibility flag; YOLO no longer prompts by destructiveness |
107
107
  | `--force-all-yolo` | Deprecated alias for `--yolo-destructive` |
108
108
  | `--provider <id>` | Override the configured provider |
109
109
  | `--model <id>` | Override the configured model |
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "tool_call": true,
20
20
  "modalities": { "input": ["text", "image"], "output": ["text"] },
21
- "limit": { "context": 372000, "output": 128000 }
21
+ "limit": { "context": 1050000, "output": 128000 }
22
22
  },
23
23
  "gpt-5.5": {
24
24
  "id": "gpt-5.5",
@@ -42,7 +42,8 @@
42
42
  "preserveThinking": "unsupported"
43
43
  },
44
44
  "tool_call": true,
45
- "modalities": { "input": ["text", "image"], "output": ["text"] }
45
+ "modalities": { "input": ["text", "image"], "output": ["text"] },
46
+ "limit": { "context": 1050000, "output": 128000 }
46
47
  },
47
48
  "gpt-5.6-luna": {
48
49
  "id": "gpt-5.6-luna",
@@ -57,7 +58,8 @@
57
58
  "preserveThinking": "unsupported"
58
59
  },
59
60
  "tool_call": true,
60
- "modalities": { "input": ["text", "image"], "output": ["text"] }
61
+ "modalities": { "input": ["text", "image"], "output": ["text"] },
62
+ "limit": { "context": 1050000, "output": 128000 }
61
63
  },
62
64
  "gpt-5.4": {
63
65
  "id": "gpt-5.4",
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Local cache for the official ACP registry snapshot.
3
+ *
4
+ * `wstack acp sync` / `/acp sync` call `refreshAcpRegistry`, which fetches the
5
+ * CDN snapshot (via `@wrongstack/acp`'s `fetchAcpRegistry`) and writes it to
6
+ * `~/.wrongstack/cache/acp-registry.json`. `loadCachedAcpRegistry` reads it
7
+ * back into the `AcpLiveCatalog` shape the resolver consumes. No network at
8
+ * load time; resolution falls back to the bundled static catalog when no
9
+ * cache exists.
10
+ */
11
+ import { type ACPAgentDescriptor, type AcpLiveCatalog } from '@wrongstack/acp';
12
+ import type { WstackPaths } from '@wrongstack/core';
13
+ export interface LoadedAcpRegistry {
14
+ fetchedAt: string;
15
+ /** Resolver input: registry-id → spawn command. */
16
+ byId: AcpLiveCatalog;
17
+ /** Full descriptors, for listing. */
18
+ agents: ACPAgentDescriptor[];
19
+ }
20
+ /** Where the synced registry snapshot lives. */
21
+ export declare function acpRegistryCachePath(paths: WstackPaths): string;
22
+ /** Read the cached registry, or `null` if it's missing or unreadable. */
23
+ export declare function loadCachedAcpRegistry(paths: WstackPaths): Promise<LoadedAcpRegistry | null>;
24
+ /** Fetch the live registry and persist it. Throws on network/parse failure. */
25
+ export declare function refreshAcpRegistry(paths: WstackPaths, opts?: {
26
+ signal?: AbortSignal;
27
+ timeoutMs?: number;
28
+ }): Promise<{
29
+ count: number;
30
+ location: string;
31
+ fetchedAt: string;
32
+ }>;
33
+ //# sourceMappingURL=acp-registry-cache.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acp-registry-cache.d.ts","sourceRoot":"","sources":["../src/acp-registry-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EACL,KAAK,kBAAkB,EACvB,KAAK,cAAc,EAEpB,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AASpD,MAAM,WAAW,iBAAiB;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,mDAAmD;IACnD,IAAI,EAAE,cAAc,CAAC;IACrB,qCAAqC;IACrC,MAAM,EAAE,kBAAkB,EAAE,CAAC;CAC9B;AAED,gDAAgD;AAChD,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,WAAW,GAAG,MAAM,CAE/D;AAED,yEAAyE;AACzE,wBAAsB,qBAAqB,CACzC,KAAK,EAAE,WAAW,GACjB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAkBnC;AAED,+EAA+E;AAC/E,wBAAsB,kBAAkB,CACtC,KAAK,EAAE,WAAW,EAClB,IAAI,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,WAAW,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAClD,OAAO,CAAC;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAAC,CAUjE"}
@@ -0,0 +1,66 @@
1
+ /**
2
+ * ACP server → real WrongStack Agent wiring.
3
+ *
4
+ * `wstack acp` exposes WrongStack as an ACP v1 agent so any ACP-capable
5
+ * client (Zed, JetBrains, VS Code ACP extension, etc.) can drive it. The
6
+ * server-side `runTurn` adapter (`makeACPServerAgentTurn` in `@wrongstack/acp`)
7
+ * needs a factory that produces a fresh, isolated `Agent` per session — this
8
+ * module is that factory, reusing the same boot pieces the interactive CLI
9
+ * uses (`setupProvider`, `createDefaultContainer`, builtin tools).
10
+ *
11
+ * Scope: a minimal but real agent. It deliberately does NOT wire MCP servers,
12
+ * compaction middleware, model-runtime overlays, or lifecycle hooks — those
13
+ * belong in the interactive host. The ACP server is a headless single-turn
14
+ * surface; a future PR can layer richer session behaviour if needed.
15
+ */
16
+ import { Agent, type Logger, type PermissionDecision, type PermissionPolicy, type Tool } from '@wrongstack/core';
17
+ import type { RunTurnApi } from '@wrongstack/acp/agent';
18
+ import type { SubcommandDeps } from './subcommands/index.js';
19
+ /**
20
+ * Error thrown when the server cannot start because no model provider is
21
+ * configured. The CLI handler catches this and prints a actionable message
22
+ * (`wstack auth`) rather than a stack trace.
23
+ */
24
+ export declare class AcpServerConfigError extends Error {
25
+ constructor(message: string);
26
+ }
27
+ export interface AcpAgentFactoryOptions {
28
+ /** Caller-supplied logger; a minimal stderr logger is created when omitted. */
29
+ logger?: Logger | undefined;
30
+ }
31
+ /**
32
+ * Permission policy that routes side-effecting tool calls to the connected
33
+ * ACP client via `session/request_permission` (the v1-correct behavior),
34
+ * while auto-approving read-only/safe tools. This replaces the blanket
35
+ * auto-approve so an editor driving WrongStack-as-agent gets a real
36
+ * permission prompt before file writes / shell commands run.
37
+ *
38
+ * Exported for direct regression testing of the malformed-response path —
39
+ * `acp-server-agent.test.ts` injects a response whose `optionId` is missing
40
+ * (which previously threw a TypeError at `outcome.optionId.startsWith(...)`
41
+ * and was misattributed to "no permission channel" by the surrounding
42
+ * try/catch). Production callers go through `buildAcpServerAgentFactory`,
43
+ * which constructs this internally when the client exposes a permission
44
+ * channel.
45
+ */
46
+ export declare class ACPClientPermissionPolicy implements PermissionPolicy {
47
+ private readonly requestPermission;
48
+ constructor(requestPermission: RunTurnApi['requestPermission']);
49
+ evaluate(tool: Tool, input: unknown): Promise<PermissionDecision>;
50
+ trust(): Promise<void>;
51
+ deny(): Promise<void>;
52
+ denyOnce(): void;
53
+ allowOnce(): void;
54
+ reload(): Promise<void>;
55
+ }
56
+ /**
57
+ * Build a per-session `Agent` factory suitable for `makeACPServerAgentTurn`.
58
+ *
59
+ * The provider registry + container are built once (they're stateless across
60
+ * sessions); each `agentFor(sessionId, cwd)` call builds a fresh `EventBus`,
61
+ * `Context`, and `Agent` so sessions stay isolated per the v1 spec.
62
+ *
63
+ * Throws `AcpServerConfigError` up front if no provider is configured.
64
+ */
65
+ export declare function buildAcpServerAgentFactory(deps: SubcommandDeps, options?: AcpAgentFactoryOptions): (sessionId: string, cwd: string, api?: RunTurnApi) => Promise<Agent>;
66
+ //# sourceMappingURL=acp-server-agent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"acp-server-agent.d.ts","sourceRoot":"","sources":["../src/acp-server-agent.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EACL,KAAK,EAML,KAAK,MAAM,EACX,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EAErB,KAAK,IAAI,EAKV,MAAM,kBAAkB,CAAC;AAG1B,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAExD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAG7D;;;;GAIG;AACH,qBAAa,oBAAqB,SAAQ,KAAK;IAC7C,YAAY,OAAO,EAAE,MAAM,EAG1B;CACF;AAED,MAAM,WAAW,sBAAsB;IACrC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AASD;;;;;;;;;;;;;;GAcG;AACH,qBAAa,yBAA0B,YAAW,gBAAgB;IACpD,OAAO,CAAC,QAAQ,CAAC,iBAAiB;IAA9C,YAA6B,iBAAiB,EAAE,UAAU,CAAC,mBAAmB,CAAC,EAAI;IAE7E,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA6BtE;IAEK,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;IACzB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;IAC9B,QAAQ,IAAI,IAAI,CAAG;IACnB,SAAS,IAAI,IAAI,CAAG;IACd,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC,CAAG;CACjC;AAmID;;;;;;;;GAQG;AACH,wBAAgB,0BAA0B,CACxC,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,sBAA2B,GACnC,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,CAAC,EAAE,UAAU,KAAK,OAAO,CAAC,KAAK,CAAC,CAmHtE"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Unified CLI argument parsing. Three parsers that were previously
3
+ * spread across index.ts, subcommands/index.ts, and slash-commands/index.ts.
4
+ */
5
+ /** Flags that are boolean-only (no value expected after them). */
6
+ export declare const BOOLEAN_FLAGS: Set<string>;
7
+ export interface ParsedArgs {
8
+ flags: Record<string, string | boolean>;
9
+ positional: string[];
10
+ }
11
+ /** Parse top-level `wstack` CLI args. */
12
+ export declare function parseArgs(argv: string[]): ParsedArgs;
13
+ export interface AuthFlags {
14
+ positional: string[];
15
+ label?: string | undefined;
16
+ family?: import('@wrongstack/core').WireFamily | undefined;
17
+ baseUrl?: string | undefined;
18
+ envVars?: string[] | undefined;
19
+ }
20
+ /** Parse `wstack auth <provider> [--label ...] [--family ...] [...]` flags. */
21
+ export declare function parseAuthFlags(args: string[]): AuthFlags;
22
+ export interface SpawnFlags {
23
+ description: string;
24
+ opts: {
25
+ provider?: string | undefined;
26
+ model?: string | undefined;
27
+ tools?: string[] | undefined;
28
+ name?: string | undefined;
29
+ };
30
+ }
31
+ /**
32
+ * Parse `/spawn` flags from the args head. Supported:
33
+ * --provider=<id> / -p <id> override the subagent's provider id
34
+ * --model=<id> / -m <id> override the subagent's model
35
+ * --name=<label> / -n <label> display name
36
+ * --tools=a,b,c restrict the subagent's tool slice
37
+ *
38
+ * Anything after the last flag is the task description.
39
+ */
40
+ export declare function parseSpawnFlags(input: string): SpawnFlags;
41
+ //# sourceMappingURL=arg-parser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"arg-parser.d.ts","sourceRoot":"","sources":["../src/arg-parser.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,kEAAkE;AAClE,eAAO,MAAM,aAAa,aAwCxB,CAAC;AAIH,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC;IACxC,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,yCAAyC;AACzC,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,UAAU,CAoCpD;AA6BD,MAAM,WAAW,SAAS;IACxB,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,kBAAkB,EAAE,UAAU,GAAG,SAAS,CAAC;IAC3D,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC;AAED,+EAA+E;AAC/E,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,CAyBxD;AAID,MAAM,WAAW,UAAU;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,IAAI,EAAE;QACJ,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC9B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;QAC3B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;QAC7B,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;KAC3B,CAAC;CACH;AAED;;;;;;;;GAQG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CA8CzD"}
@@ -0,0 +1,15 @@
1
+ import type { ProviderConfig, ResolvedProvider } from '@wrongstack/core';
2
+ import type { AuthMenuDeps } from './types.js';
3
+ export declare function addFromCatalog(deps: AuthMenuDeps): Promise<boolean>;
4
+ /**
5
+ * Prompt for family/baseUrl/alias overrides, then add a key.
6
+ * Returns true if a key was added.
7
+ *
8
+ * Exported for the TUI auth panel: the panel does its own catalog
9
+ * selection (searchable list) and then drives this flow through the
10
+ * prompt bridge for the override/label/key questions.
11
+ */
12
+ export declare function addKeyForCatalogProvider(deps: AuthMenuDeps, chosen: ResolvedProvider): Promise<boolean>;
13
+ export declare function addCustomProvider(deps: AuthMenuDeps): Promise<boolean>;
14
+ export declare function addKeyForProvider(providerId: string, deps: AuthMenuDeps, template: Partial<ProviderConfig>): Promise<boolean>;
15
+ //# sourceMappingURL=add-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"add-provider.d.ts","sourceRoot":"","sources":["../../src/auth-menu/add-provider.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAc,MAAM,kBAAkB,CAAC;AAerF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAM/C,wBAAsB,cAAc,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAwCzE;AAED;;;;;;;GAOG;AACH,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,YAAY,EAClB,MAAM,EAAE,gBAAgB,GACvB,OAAO,CAAC,OAAO,CAAC,CA0ElB;AAMD,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,CAmE5E;AAsCD,wBAAsB,iBAAiB,CACrC,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,YAAY,EAClB,QAAQ,EAAE,OAAO,CAAC,cAAc,CAAC,GAChC,OAAO,CAAC,OAAO,CAAC,CAuClB"}
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Anthropic "Sign in with Claude" OAuth (Authorization Code + PKCE) — Claude
3
+ * Pro/Max subscription login. Parallel to the Codex flow but with Anthropic's
4
+ * endpoints and quirks:
5
+ * - authorize at claude.ai/oauth/authorize (params include `code=true`),
6
+ * - the OAuth `state` is the PKCE verifier (Anthropic's convention),
7
+ * - JSON (not form) token exchange at platform.claude.com/v1/oauth/token,
8
+ * - loopback callback on http://localhost:53692/callback.
9
+ *
10
+ * Stored under the canonical `anthropic-oauth` provider (family `anthropic-oauth`)
11
+ * so it never clobbers an API-key `anthropic` provider. The provider adapter
12
+ * adds the Bearer + beta headers and the required Claude Code system block.
13
+ */
14
+ import type { AuthMenuDeps } from './types.js';
15
+ export declare const CLAUDE_PROVIDER_ID = "anthropic-oauth";
16
+ export interface ClaudeTokens {
17
+ access: string;
18
+ refresh: string;
19
+ expires: number;
20
+ }
21
+ export declare function generatePkce(): {
22
+ verifier: string;
23
+ challenge: string;
24
+ };
25
+ /** Build the Claude authorize URL. Anthropic uses the PKCE verifier as `state`. */
26
+ export declare function buildAuthorizeUrl(challenge: string, verifier: string): string;
27
+ export declare function parseAuthorizationInput(input: string): {
28
+ code?: string | undefined;
29
+ state?: string | undefined;
30
+ };
31
+ /** Exchange an authorization code (+ verifier, reused as state) for tokens. */
32
+ export declare function exchangeAuthorizationCode(code: string, state: string, verifier: string, signal?: AbortSignal): Promise<ClaudeTokens>;
33
+ export interface ClaudeLoginOptions {
34
+ providerId?: string;
35
+ /**
36
+ * External cancellation signal (e.g. the TUI auth panel's Esc). When
37
+ * provided, the flow does NOT install its own SIGINT handler — the
38
+ * caller owns cancellation.
39
+ */
40
+ signal?: AbortSignal | undefined;
41
+ }
42
+ export declare function runClaudeOAuthLogin(deps: AuthMenuDeps, opts?: ClaudeLoginOptions): Promise<number>;
43
+ //# sourceMappingURL=anthropic-oauth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anthropic-oauth.d.ts","sourceRoot":"","sources":["../../src/auth-menu/anthropic-oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAYH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAW/C,eAAO,MAAM,kBAAkB,oBAAoB,CAAC;AAGpD,MAAM,WAAW,YAAY;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;CACjB;AAQD,wBAAgB,YAAY,IAAI;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAItE;AAED,mFAAmF;AACnF,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,CAY7E;AAED,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,MAAM,GAAG;IACtD,IAAI,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B,CAwBA;AAkCD,+EAA+E;AAC/E,wBAAsB,yBAAyB,CAC7C,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,MAAM,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,YAAY,CAAC,CAiBvB;AA0KD,MAAM,WAAW,kBAAkB;IACjC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAED,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE,kBAAuB,GAC5B,OAAO,CAAC,MAAM,CAAC,CA8GjB"}
@@ -0,0 +1,175 @@
1
+ /**
2
+ * Structured audit logger for the `wstack auth local` lifecycle.
3
+ *
4
+ * Emits JSON-line events to an injectable sink (default: stdout).
5
+ * The event names mirror the WebUI's WS message types
6
+ * (`provider.clear_models` ↔ `auth.local.clear`,
7
+ * `provider.undo_clear` ↔ `auth.local.undo`) so a downstream
8
+ * tool that filters on one convention finds the corresponding
9
+ * events on the other surface.
10
+ *
11
+ * Why a dedicated logger (vs. `console.log`)?
12
+ * - **Test seam** — tests inject an in-memory array sink and
13
+ * assert on the recorded events. `console.log` can't be
14
+ * captured cleanly across the test runner / reporter.
15
+ * - **Schema stability** — the discriminated union of
16
+ * `AuthAuditEvent` types gives downstream consumers a
17
+ * contract they can switch on. Plain `console.log` strings
18
+ * drift on every commit.
19
+ * - **Redaction built in** — every event passes through a
20
+ * `SecretScrubber` before reaching the sink, so a Bearer
21
+ * token accidentally captured in a payload can't echo to
22
+ * stdout / the audit file in plaintext.
23
+ *
24
+ * The logger is intentionally minimal: no buffering, no
25
+ * rotation, no transport. The CLI process is short-lived and
26
+ * emits at most a handful of events per invocation. A
27
+ * long-running consumer (file rotation, OTLP export) would
28
+ * belong in a dedicated audit-sink module, not here.
29
+ */
30
+ import { type SecretScrubber } from '@wrongstack/core';
31
+ /**
32
+ * Discriminated union of every event the auth-menu local flow
33
+ * can emit. New events slot in here as the lifecycle grows —
34
+ * the `type` field is the stable contract.
35
+ */
36
+ export type AuthAuditEvent = {
37
+ type: 'auth.local.add';
38
+ providerId: string;
39
+ baseUrl: string;
40
+ /** The resolved model list saved to disk. Empty when the
41
+ * user didn't pass `--model`. */
42
+ models: string[];
43
+ /** Label of the saved key entry, if any. */
44
+ keyLabel?: string | undefined;
45
+ } | {
46
+ /**
47
+ * Emitted when the save replaces a previously non-empty
48
+ * `cfg.models` allowlist with `[]`. Pairs with
49
+ * `auth.local.undo` — a search for both events in
50
+ * sequence surfaces a "user changed their mind" pair.
51
+ */
52
+ type: 'auth.local.clear';
53
+ providerId: string;
54
+ baseUrl: string;
55
+ /** The list the user just removed. */
56
+ previousModels: string[];
57
+ } | {
58
+ /**
59
+ * Emitted when the save restores a non-empty `cfg.models`
60
+ * allowlist that was previously `[]` or absent. The
61
+ * `restoredModels` field carries the new list verbatim.
62
+ * Pairs with `auth.local.clear`.
63
+ */
64
+ type: 'auth.local.undo';
65
+ providerId: string;
66
+ baseUrl: string;
67
+ /** The list the user just restored. */
68
+ restoredModels: string[];
69
+ } | {
70
+ /**
71
+ * Emitted when the `--model` flag was probe-driven
72
+ * (`'first'` / `'<N>'`) but the probe didn't return
73
+ * enough ids. The flag is silently ignored in that case
74
+ * — this event lets the audit log surface the silent
75
+ * skip.
76
+ */
77
+ type: 'auth.local.probe_skip';
78
+ providerId: string;
79
+ baseUrl: string;
80
+ requestedShape: 'first' | string;
81
+ } | {
82
+ /**
83
+ * Emitted when the health probe failed AND the user chose
84
+ * to save anyway. Pairs with the probe result line in
85
+ * the terminal — the audit event is the durable record
86
+ * that the provider was saved in a known-bad state.
87
+ */
88
+ type: 'auth.local.probe_failed_save';
89
+ providerId: string;
90
+ baseUrl: string;
91
+ probeStatus: string;
92
+ probeDetail?: string | undefined;
93
+ };
94
+ /**
95
+ * Sink contract: receives the post-scrub, post-stringify event
96
+ * line. The default implementation writes to stdout; tests
97
+ * inject an in-memory array.
98
+ */
99
+ export interface AuthAuditSink {
100
+ write(line: string): void;
101
+ }
102
+ /** Default sink: one JSON line per event on stdout. */
103
+ export declare function defaultStdoutSink(): AuthAuditSink;
104
+ /** Stderr sink: one JSON line per event on stderr. */
105
+ export declare function defaultStderrSink(): AuthAuditSink;
106
+ /**
107
+ * File sink: appends one JSON line per event to the named
108
+ * path. Uses synchronous append + newline so events are
109
+ * durable on process exit. Wraps any I/O failure as a thrown
110
+ * error so the caller can surface it.
111
+ */
112
+ export declare function fileAuditSink(path: string): AuthAuditSink;
113
+ /**
114
+ * Resolve the `--audit` flag value (parsed by `parseAuthFlags`)
115
+ * to a concrete `AuthAuditSink`. Returns `undefined` when the
116
+ * caller didn't pass `--audit` (no sink is wired and the
117
+ * audit log is silent).
118
+ *
119
+ * Resolution rules:
120
+ * - `true` (bare `--audit`) → stdout
121
+ * - `'stdout'` → stdout
122
+ * - `'stderr'` → stderr
123
+ * - `'<file-path>'` → append to the file
124
+ * - `undefined` → undefined (no sink)
125
+ */
126
+ export declare function resolveAuditSink(flag: boolean | string | undefined): AuthAuditSink | undefined;
127
+ /** In-memory sink for tests. Records every line verbatim. */
128
+ export declare function memAuthAuditSink(): AuthAuditSink & {
129
+ lines: string[];
130
+ };
131
+ export interface AuthAuditLogger {
132
+ /** Emit an event. The payload is JSON-serialized, scrubbed,
133
+ * and written to the sink. No-ops when the sink is
134
+ * `undefined` (tests that don't care about the audit log
135
+ * can pass `audit: undefined`). */
136
+ emit(event: AuthAuditEvent): void;
137
+ }
138
+ /** No-op logger for tests that don't need the audit log. */
139
+ export declare const NOOP_AUDIT_LOGGER: AuthAuditLogger;
140
+ /**
141
+ * Build the canonical logger. The `scrubber` runs over the
142
+ * serialized event so a Bearer token accidentally included
143
+ * in a payload (e.g. an echo from a misbehaving server) is
144
+ * redacted before reaching the sink.
145
+ */
146
+ export declare function createAuthAuditLogger(sink: AuthAuditSink | undefined, scrubber?: SecretScrubber): AuthAuditLogger;
147
+ /**
148
+ * Decide which audit event(s) to emit given the previous saved
149
+ * state and the new save's resolved values. Pure function —
150
+ * the caller is responsible for the actual `emit()` call so
151
+ * the same input always produces the same event list (and the
152
+ * test suite can pin it).
153
+ *
154
+ * - `previousModels` is `undefined` when no prior entry
155
+ * existed. `[]` means "the user previously cleared".
156
+ * - `newModels` is `null` when the `--model` flag wasn't
157
+ * passed (don't touch `cfg.models`). `[]` means "the user
158
+ * passed `--model ''` to clear". A non-empty list is the
159
+ * resolved list (probe-driven or literal).
160
+ */
161
+ export declare function decideAuthLocalEvents(opts: {
162
+ providerId: string;
163
+ baseUrl: string;
164
+ previousModels: string[] | undefined;
165
+ newModels: string[] | null;
166
+ keyLabel: string | undefined;
167
+ probeSkip?: {
168
+ shape: 'first' | string;
169
+ } | undefined;
170
+ probeFailedSave?: {
171
+ status: string;
172
+ detail?: string;
173
+ } | undefined;
174
+ }): AuthAuditEvent[];
175
+ //# sourceMappingURL=auth-menu-audit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth-menu-audit.d.ts","sourceRoot":"","sources":["../../src/auth-menu/auth-menu-audit.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,OAAO,EAAE,KAAK,cAAc,EAAyB,MAAM,kBAAkB,CAAC;AAE9E;;;;GAIG;AACH,MAAM,MAAM,cAAc,GACtB;IACE,IAAI,EAAE,gBAAgB,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB;sCACkC;IAClC,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,4CAA4C;IAC5C,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC/B,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,kBAAkB,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,sCAAsC;IACtC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,iBAAiB,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,uCAAuC;IACvC,cAAc,EAAE,MAAM,EAAE,CAAC;CAC1B,GACD;IACE;;;;;;OAMG;IACH,IAAI,EAAE,uBAAuB,CAAC;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,OAAO,GAAG,MAAM,CAAC;CAClC,GACD;IACE;;;;;OAKG;IACH,IAAI,EAAE,8BAA8B,CAAC;IACrC,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,CAAC;AAEN;;;;GAIG;AACH,MAAM,WAAW,aAAa;IAC5B,KAAK,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED,uDAAuD;AACvD,wBAAgB,iBAAiB,IAAI,aAAa,CAUjD;AAED,sDAAsD;AACtD,wBAAgB,iBAAiB,IAAI,aAAa,CAMjD;AAED;;;;;GAKG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,CAWzD;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,GACjC,aAAa,GAAG,SAAS,CAa3B;AAED,6DAA6D;AAC7D,wBAAgB,gBAAgB,IAAI,aAAa,GAAG;IAAE,KAAK,EAAE,MAAM,EAAE,CAAA;CAAE,CAQtE;AAED,MAAM,WAAW,eAAe;IAC9B;;;wCAGoC;IACpC,IAAI,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAAC;CACnC;AAED,4DAA4D;AAC5D,eAAO,MAAM,iBAAiB,EAAE,eAE/B,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,aAAa,GAAG,SAAS,EAC/B,QAAQ,GAAE,cAA4C,GACrD,eAAe,CAYjB;AA0DD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,qBAAqB,CAAC,IAAI,EAAE;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,cAAc,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IACrC,SAAS,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,SAAS,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,GAAG,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;IACpD,eAAe,CAAC,EAAE;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,SAAS,CAAC;CACnE,GAAG,cAAc,EAAE,CA4FnB"}
@@ -0,0 +1,15 @@
1
+ import type { WireFamily } from '@wrongstack/core';
2
+ import type { AuthMenuDeps } from './types.js';
3
+ /**
4
+ * One-shot add: used by `wstack auth <provider>` to skip the menu and
5
+ * append a single key. Honors --label / --family / --base-url / --env
6
+ * flags. If the label collides, we suffix with a counter.
7
+ */
8
+ export declare function runAuthDirect(deps: AuthMenuDeps, opts: {
9
+ providerId: string;
10
+ label?: string | undefined;
11
+ family?: WireFamily | undefined;
12
+ baseUrl?: string | undefined;
13
+ envVars?: string[] | undefined;
14
+ }): Promise<number>;
15
+ //# sourceMappingURL=direct.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"direct.d.ts","sourceRoot":"","sources":["../../src/auth-menu/direct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AASnD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C;;;;GAIG;AACH,wBAAsB,aAAa,CACjC,IAAI,EAAE,YAAY,EAClB,IAAI,EAAE;IACJ,UAAU,EAAE,MAAM,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IAChC,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;CAChC,GACA,OAAO,CAAC,MAAM,CAAC,CA2DjB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * GitHub Copilot login — GitHub OAuth **device flow** (no loopback server).
3
+ *
4
+ * 1. POST github.com/login/device/code → user_code + verification_uri.
5
+ * 2. User opens the URL, enters the code; we poll login/oauth/access_token
6
+ * until GitHub returns a long-lived OAuth token.
7
+ * 3. Exchange that token at api.github.com/copilot_internal/v2/token for a
8
+ * short-lived Copilot token (the chat access token).
9
+ *
10
+ * Stored under the canonical `github-copilot` provider (family `github-copilot`,
11
+ * an OpenAI chat/completions-compatible wire). The GitHub OAuth token is the
12
+ * refresh token; the provider mints fresh Copilot tokens from it transparently.
13
+ */
14
+ import type { AuthMenuDeps } from './types.js';
15
+ export declare const COPILOT_PROVIDER_ID = "github-copilot";
16
+ interface DeviceCode {
17
+ device_code: string;
18
+ user_code: string;
19
+ verification_uri: string;
20
+ interval: number;
21
+ expires_in: number;
22
+ }
23
+ /** Start the GitHub device flow. */
24
+ export declare function startDeviceFlow(signal?: AbortSignal): Promise<DeviceCode>;
25
+ /** Poll until the user authorizes; returns the GitHub OAuth token. */
26
+ export declare function pollForGitHubToken(device: DeviceCode, signal: AbortSignal): Promise<string>;
27
+ /** Shape of the fields we read from a `/models` entry (everything optional). */
28
+ interface CopilotModelEntry {
29
+ id?: unknown;
30
+ model_picker_enabled?: unknown;
31
+ is_chat_default?: unknown;
32
+ is_chat_fallback?: unknown;
33
+ vendor?: unknown;
34
+ supported_endpoints?: unknown;
35
+ policy?: {
36
+ state?: unknown;
37
+ } | undefined;
38
+ capabilities?: {
39
+ type?: unknown;
40
+ supports?: {
41
+ tool_calls?: unknown;
42
+ } | undefined;
43
+ } | undefined;
44
+ }
45
+ /**
46
+ * Decide whether a Copilot `/models` entry is a chat model we can actually
47
+ * drive over this provider's wire.
48
+ *
49
+ * The provider POSTs to `…/chat/completions`, so the discriminators are:
50
+ * - `capabilities.type === 'chat'` — drops embeddings and completion-only ids.
51
+ * - `capabilities.supports.tool_calls` — the agent loop needs tool calling.
52
+ * - `supported_endpoints` (when present) must include `/chat/completions`.
53
+ * This is the key fix: `/responses`-only ids (the `*-picker` router models,
54
+ * `gpt-5.4-mini-free-auto`, `mai-code-1-flash*`) advertise themselves in the
55
+ * model picker but 400 on `/chat/completions`. Absent field ⇒ legacy chat
56
+ * model (gpt-4o, gpt-4.1) ⇒ allowed.
57
+ * - `policy.state !== 'disabled'` — disabled means the user hasn't enabled the
58
+ * model in their GitHub Copilot settings; calling it would 403.
59
+ * - `vendor !== 'Experimental'` — drops internal previews (trajectory-compaction).
60
+ */
61
+ export declare function isUsableCopilotChatModel(item: CopilotModelEntry): boolean;
62
+ export interface CopilotLoginOptions {
63
+ providerId?: string;
64
+ /**
65
+ * External cancellation signal (e.g. the TUI auth panel's Esc). When
66
+ * provided, the flow does NOT install its own SIGINT handler — the
67
+ * caller owns cancellation.
68
+ */
69
+ signal?: AbortSignal | undefined;
70
+ }
71
+ export declare function runCopilotOAuthLogin(deps: AuthMenuDeps, opts?: CopilotLoginOptions): Promise<number>;
72
+ export {};
73
+ //# sourceMappingURL=github-copilot-oauth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"github-copilot-oauth.d.ts","sourceRoot":"","sources":["../../src/auth-menu/github-copilot-oauth.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAY/C,eAAO,MAAM,mBAAmB,mBAAmB,CAAC;AAEpD,UAAU,UAAU;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,gBAAgB,EAAE,MAAM,CAAC;IACzB,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB;AAkCD,oCAAoC;AACpC,wBAAsB,eAAe,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAuC/E;AAED,sEAAsE;AACtE,wBAAsB,kBAAkB,CAAC,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,MAAM,CAAC,CAqCjG;AAED,gFAAgF;AAChF,UAAU,iBAAiB;IACzB,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,MAAM,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,GAAG,SAAS,CAAC;IACzC,YAAY,CAAC,EAAE;QAAE,IAAI,CAAC,EAAE,OAAO,CAAC;QAAC,QAAQ,CAAC,EAAE;YAAE,UAAU,CAAC,EAAE,OAAO,CAAA;SAAE,GAAG,SAAS,CAAA;KAAE,GAAG,SAAS,CAAC;CAChG;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAUzE;AAoCD,MAAM,WAAW,mBAAmB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;;OAIG;IACH,MAAM,CAAC,EAAE,WAAW,GAAG,SAAS,CAAC;CAClC;AAED,wBAAsB,oBAAoB,CACxC,IAAI,EAAE,YAAY,EAClB,IAAI,GAAE,mBAAwB,GAC7B,OAAO,CAAC,MAAM,CAAC,CAkEjB"}
@@ -0,0 +1,7 @@
1
+ import type { ProviderConfig } from '@wrongstack/core';
2
+ import type { AuthMenuDeps } from './types.js';
3
+ /** Thin wrapper — delegates to the shared config provider loader. */
4
+ export declare function loadProviders(deps: AuthMenuDeps): Promise<Record<string, ProviderConfig>>;
5
+ /** Thin wrapper — delegates to the shared atomic config mutator. */
6
+ export declare function mutateProviders(deps: AuthMenuDeps, mutator: (providers: Record<string, ProviderConfig>) => void): Promise<void>;
7
+ //# sourceMappingURL=helpers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../src/auth-menu/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAE/C,qEAAqE;AACrE,wBAAsB,aAAa,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC,CAI/F;AAED,oEAAoE;AACpE,wBAAsB,eAAe,CACnC,IAAI,EAAE,YAAY,EAClB,OAAO,EAAE,CAAC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,KAAK,IAAI,GAC3D,OAAO,CAAC,IAAI,CAAC,CAEf"}
@@ -0,0 +1,8 @@
1
+ export { runAuthDirect } from './direct.js';
2
+ export { runTopMenu as runAuthMenu } from './top-menu.js';
3
+ export type { AuthMenuDeps } from './types.js';
4
+ export { runCodexOAuthLogin, refreshCodexToken, extractAccountId, fetchCodexModels, resolveCodexModels, FALLBACK_CODEX_MODELS, CODEX_CATALOG_FAMILIES, fallbackCodexModelIds, fallbackCodexProviderModels, filterCurrentCodexModelIds, isCodexCatalogModel, CODEX_PROVIDER_ID, CODEX_BASE_URL, type CodexLoginOptions, type CodexTokens, } from './openai-codex-oauth.js';
5
+ export { runClaudeOAuthLogin, CLAUDE_PROVIDER_ID, type ClaudeLoginOptions, type ClaudeTokens, } from './anthropic-oauth.js';
6
+ export { runCopilotOAuthLogin, COPILOT_PROVIDER_ID, type CopilotLoginOptions, } from './github-copilot-oauth.js';
7
+ export { runAuthLocal, resolveModelList, probeLocalLlm, LOCAL_LLM_PRESETS, type RunAuthLocalOptions, type LocalLlmPresetEntry, type ProbeOptions, type ProbeResult, } from './local.js';
8
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/auth-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,UAAU,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AAC1D,YAAY,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,gBAAgB,EAChB,gBAAgB,EAChB,kBAAkB,EAClB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,2BAA2B,EAC3B,0BAA0B,EAC1B,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,WAAW,GACjB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,mBAAmB,EACnB,kBAAkB,EAClB,KAAK,kBAAkB,EACvB,KAAK,YAAY,GAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,KAAK,mBAAmB,GACzB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,YAAY,EACZ,gBAAgB,EAChB,aAAa,EACb,iBAAiB,EACjB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,WAAW,GACjB,MAAM,YAAY,CAAC"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Local-LLM server presets — the single source of truth shared by the
3
+ * `wstack auth local` quick-add flow (`./local.ts`) and the startup
4
+ * provider picker (`../picker.ts`).
5
+ *
6
+ * This module holds ONLY the preset data + its type, with no runtime
7
+ * dependencies (no probe, no config vault). That lets the picker import
8
+ * the presets to surface keyless local gateways without dragging in the
9
+ * heavier auth-flow machinery. Keep these entries in sync with the
10
+ * wire-format presets in `@wrongstack/providers`.
11
+ */
12
+ export interface LocalLlmPresetEntry {
13
+ /** Stable id used both for the config key and the --name flag. */
14
+ id: string;
15
+ /** Display name shown in the picker. */
16
+ label: string;
17
+ /** Default base URL for this server. */
18
+ defaultBaseUrl: string;
19
+ /**
20
+ * When true, no API key is needed — the shortcut saves the provider
21
+ * without prompting for a key. Use for servers that reject any
22
+ * Authorization header (Ollama).
23
+ */
24
+ noAuth: boolean;
25
+ /**
26
+ * Human-readable hint shown next to the entry — typically the upstream
27
+ * doc URL or the local port.
28
+ */
29
+ hint: string;
30
+ }
31
+ /**
32
+ * Single source of truth for the `wstack auth local` picker. Keep this
33
+ * in sync with the wire-format presets in `@wrongstack/providers`.
34
+ */
35
+ export declare const LOCAL_LLM_PRESETS: readonly LocalLlmPresetEntry[];
36
+ //# sourceMappingURL=local-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"local-presets.d.ts","sourceRoot":"","sources":["../../src/auth-menu/local-presets.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,MAAM,WAAW,mBAAmB;IAClC,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,wCAAwC;IACxC,KAAK,EAAE,MAAM,CAAC;IACd,wCAAwC;IACxC,cAAc,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,MAAM,EAAE,OAAO,CAAC;IAChB;;;OAGG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;GAGG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,mBAAmB,EA6BlD,CAAC"}