muonroi-cli 1.2.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 (1207) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +380 -0
  3. package/dist/__test-stubs__/ee-server.d.ts +27 -0
  4. package/dist/__test-stubs__/ee-server.js +138 -0
  5. package/dist/__test-stubs__/ee-server.js.map +1 -0
  6. package/dist/billing/index.d.ts +5 -0
  7. package/dist/billing/index.js +2 -0
  8. package/dist/billing/index.js.map +1 -0
  9. package/dist/cloud/index.d.ts +5 -0
  10. package/dist/cloud/index.js +2 -0
  11. package/dist/cloud/index.js.map +1 -0
  12. package/dist/daemon/scheduler.d.ts +15 -0
  13. package/dist/daemon/scheduler.js +126 -0
  14. package/dist/daemon/scheduler.js.map +1 -0
  15. package/dist/daemon/scheduler.test.d.ts +1 -0
  16. package/dist/daemon/scheduler.test.js +103 -0
  17. package/dist/daemon/scheduler.test.js.map +1 -0
  18. package/dist/ee/__tests__/pipeline.integration.test.d.ts +14 -0
  19. package/dist/ee/__tests__/pipeline.integration.test.js +151 -0
  20. package/dist/ee/__tests__/pipeline.integration.test.js.map +1 -0
  21. package/dist/ee/auth.d.ts +19 -0
  22. package/dist/ee/auth.js +48 -0
  23. package/dist/ee/auth.js.map +1 -0
  24. package/dist/ee/auth.test.d.ts +1 -0
  25. package/dist/ee/auth.test.js +59 -0
  26. package/dist/ee/auth.test.js.map +1 -0
  27. package/dist/ee/bridge.d.ts +68 -0
  28. package/dist/ee/bridge.js +177 -0
  29. package/dist/ee/bridge.js.map +1 -0
  30. package/dist/ee/bridge.test.d.ts +1 -0
  31. package/dist/ee/bridge.test.js +231 -0
  32. package/dist/ee/bridge.test.js.map +1 -0
  33. package/dist/ee/client.d.ts +22 -0
  34. package/dist/ee/client.js +464 -0
  35. package/dist/ee/client.js.map +1 -0
  36. package/dist/ee/client.test.d.ts +1 -0
  37. package/dist/ee/client.test.js +151 -0
  38. package/dist/ee/client.test.js.map +1 -0
  39. package/dist/ee/embedding-cache.d.ts +7 -0
  40. package/dist/ee/embedding-cache.js +33 -0
  41. package/dist/ee/embedding-cache.js.map +1 -0
  42. package/dist/ee/extract-session.d.ts +17 -0
  43. package/dist/ee/extract-session.js +53 -0
  44. package/dist/ee/extract-session.js.map +1 -0
  45. package/dist/ee/extract-session.test.d.ts +1 -0
  46. package/dist/ee/extract-session.test.js +197 -0
  47. package/dist/ee/extract-session.test.js.map +1 -0
  48. package/dist/ee/health.d.ts +29 -0
  49. package/dist/ee/health.js +64 -0
  50. package/dist/ee/health.js.map +1 -0
  51. package/dist/ee/index.d.ts +10 -0
  52. package/dist/ee/index.js +9 -0
  53. package/dist/ee/index.js.map +1 -0
  54. package/dist/ee/intercept.d.ts +46 -0
  55. package/dist/ee/intercept.js +117 -0
  56. package/dist/ee/intercept.js.map +1 -0
  57. package/dist/ee/intercept.test.d.ts +1 -0
  58. package/dist/ee/intercept.test.js +170 -0
  59. package/dist/ee/intercept.test.js.map +1 -0
  60. package/dist/ee/judge.d.ts +36 -0
  61. package/dist/ee/judge.js +56 -0
  62. package/dist/ee/judge.js.map +1 -0
  63. package/dist/ee/judge.test.d.ts +1 -0
  64. package/dist/ee/judge.test.js +139 -0
  65. package/dist/ee/judge.test.js.map +1 -0
  66. package/dist/ee/offline-queue.d.ts +37 -0
  67. package/dist/ee/offline-queue.js +163 -0
  68. package/dist/ee/offline-queue.js.map +1 -0
  69. package/dist/ee/offline-queue.test.d.ts +1 -0
  70. package/dist/ee/offline-queue.test.js +246 -0
  71. package/dist/ee/offline-queue.test.js.map +1 -0
  72. package/dist/ee/posttool.d.ts +11 -0
  73. package/dist/ee/posttool.js +16 -0
  74. package/dist/ee/posttool.js.map +1 -0
  75. package/dist/ee/posttool.test.d.ts +1 -0
  76. package/dist/ee/posttool.test.js +70 -0
  77. package/dist/ee/posttool.test.js.map +1 -0
  78. package/dist/ee/prompt-stale.d.ts +20 -0
  79. package/dist/ee/prompt-stale.js +37 -0
  80. package/dist/ee/prompt-stale.js.map +1 -0
  81. package/dist/ee/prompt-stale.test.d.ts +8 -0
  82. package/dist/ee/prompt-stale.test.js +76 -0
  83. package/dist/ee/prompt-stale.test.js.map +1 -0
  84. package/dist/ee/render.d.ts +20 -0
  85. package/dist/ee/render.js +30 -0
  86. package/dist/ee/render.js.map +1 -0
  87. package/dist/ee/render.test.d.ts +1 -0
  88. package/dist/ee/render.test.js +61 -0
  89. package/dist/ee/render.test.js.map +1 -0
  90. package/dist/ee/scope.d.ts +6 -0
  91. package/dist/ee/scope.js +92 -0
  92. package/dist/ee/scope.js.map +1 -0
  93. package/dist/ee/scope.test.d.ts +1 -0
  94. package/dist/ee/scope.test.js +97 -0
  95. package/dist/ee/scope.test.js.map +1 -0
  96. package/dist/ee/tenant.d.ts +2 -0
  97. package/dist/ee/tenant.js +13 -0
  98. package/dist/ee/tenant.js.map +1 -0
  99. package/dist/ee/touch.test.d.ts +1 -0
  100. package/dist/ee/touch.test.js +60 -0
  101. package/dist/ee/touch.test.js.map +1 -0
  102. package/dist/ee/types.d.ts +300 -0
  103. package/dist/ee/types.js +14 -0
  104. package/dist/ee/types.js.map +1 -0
  105. package/dist/flow/__tests__/migration.test.d.ts +1 -0
  106. package/dist/flow/__tests__/migration.test.js +105 -0
  107. package/dist/flow/__tests__/migration.test.js.map +1 -0
  108. package/dist/flow/__tests__/parser.test.d.ts +1 -0
  109. package/dist/flow/__tests__/parser.test.js +68 -0
  110. package/dist/flow/__tests__/parser.test.js.map +1 -0
  111. package/dist/flow/__tests__/run-manager.test.d.ts +1 -0
  112. package/dist/flow/__tests__/run-manager.test.js +83 -0
  113. package/dist/flow/__tests__/run-manager.test.js.map +1 -0
  114. package/dist/flow/__tests__/scaffold.test.d.ts +1 -0
  115. package/dist/flow/__tests__/scaffold.test.js +47 -0
  116. package/dist/flow/__tests__/scaffold.test.js.map +1 -0
  117. package/dist/flow/__tests__/warning-persist.test.d.ts +5 -0
  118. package/dist/flow/__tests__/warning-persist.test.js +96 -0
  119. package/dist/flow/__tests__/warning-persist.test.js.map +1 -0
  120. package/dist/flow/artifact-io.d.ts +16 -0
  121. package/dist/flow/artifact-io.js +35 -0
  122. package/dist/flow/artifact-io.js.map +1 -0
  123. package/dist/flow/compaction/__tests__/compress.test.d.ts +1 -0
  124. package/dist/flow/compaction/__tests__/compress.test.js +63 -0
  125. package/dist/flow/compaction/__tests__/compress.test.js.map +1 -0
  126. package/dist/flow/compaction/__tests__/extract.test.d.ts +1 -0
  127. package/dist/flow/compaction/__tests__/extract.test.js +66 -0
  128. package/dist/flow/compaction/__tests__/extract.test.js.map +1 -0
  129. package/dist/flow/compaction/__tests__/preserve.test.d.ts +1 -0
  130. package/dist/flow/compaction/__tests__/preserve.test.js +62 -0
  131. package/dist/flow/compaction/__tests__/preserve.test.js.map +1 -0
  132. package/dist/flow/compaction/compress.d.ts +22 -0
  133. package/dist/flow/compaction/compress.js +47 -0
  134. package/dist/flow/compaction/compress.js.map +1 -0
  135. package/dist/flow/compaction/extract.d.ts +23 -0
  136. package/dist/flow/compaction/extract.js +46 -0
  137. package/dist/flow/compaction/extract.js.map +1 -0
  138. package/dist/flow/compaction/index.d.ts +23 -0
  139. package/dist/flow/compaction/index.js +63 -0
  140. package/dist/flow/compaction/index.js.map +1 -0
  141. package/dist/flow/compaction/preserve.d.ts +24 -0
  142. package/dist/flow/compaction/preserve.js +35 -0
  143. package/dist/flow/compaction/preserve.js.map +1 -0
  144. package/dist/flow/index.d.ts +12 -0
  145. package/dist/flow/index.js +16 -0
  146. package/dist/flow/index.js.map +1 -0
  147. package/dist/flow/migration.d.ts +23 -0
  148. package/dist/flow/migration.js +126 -0
  149. package/dist/flow/migration.js.map +1 -0
  150. package/dist/flow/parser.d.ts +27 -0
  151. package/dist/flow/parser.js +68 -0
  152. package/dist/flow/parser.js.map +1 -0
  153. package/dist/flow/run-manager.d.ts +36 -0
  154. package/dist/flow/run-manager.js +110 -0
  155. package/dist/flow/run-manager.js.map +1 -0
  156. package/dist/flow/scaffold.d.ts +22 -0
  157. package/dist/flow/scaffold.js +47 -0
  158. package/dist/flow/scaffold.js.map +1 -0
  159. package/dist/flow/warning-persist.d.ts +9 -0
  160. package/dist/flow/warning-persist.js +75 -0
  161. package/dist/flow/warning-persist.js.map +1 -0
  162. package/dist/gsd/__tests__/types.test.d.ts +1 -0
  163. package/dist/gsd/__tests__/types.test.js +65 -0
  164. package/dist/gsd/__tests__/types.test.js.map +1 -0
  165. package/dist/gsd/index.d.ts +1 -0
  166. package/dist/gsd/index.js +2 -0
  167. package/dist/gsd/index.js.map +1 -0
  168. package/dist/gsd/types.d.ts +4 -0
  169. package/dist/gsd/types.js +39 -0
  170. package/dist/gsd/types.js.map +1 -0
  171. package/dist/headless/output.d.ts +68 -0
  172. package/dist/headless/output.js +206 -0
  173. package/dist/headless/output.js.map +1 -0
  174. package/dist/headless/output.test.d.ts +1 -0
  175. package/dist/headless/output.test.js +178 -0
  176. package/dist/headless/output.test.js.map +1 -0
  177. package/dist/hooks/config.d.ts +18 -0
  178. package/dist/hooks/config.js +39 -0
  179. package/dist/hooks/config.js.map +1 -0
  180. package/dist/hooks/index.d.ts +44 -0
  181. package/dist/hooks/index.js +187 -0
  182. package/dist/hooks/index.js.map +1 -0
  183. package/dist/hooks/types.d.ts +130 -0
  184. package/dist/hooks/types.js +47 -0
  185. package/dist/hooks/types.js.map +1 -0
  186. package/dist/index.d.ts +2 -0
  187. package/dist/index.js +512 -0
  188. package/dist/index.js.map +1 -0
  189. package/dist/lsp/builtins.d.ts +9 -0
  190. package/dist/lsp/builtins.js +351 -0
  191. package/dist/lsp/builtins.js.map +1 -0
  192. package/dist/lsp/builtins.test.d.ts +1 -0
  193. package/dist/lsp/builtins.test.js +91 -0
  194. package/dist/lsp/builtins.test.js.map +1 -0
  195. package/dist/lsp/client.d.ts +20 -0
  196. package/dist/lsp/client.js +290 -0
  197. package/dist/lsp/client.js.map +1 -0
  198. package/dist/lsp/manager.d.ts +20 -0
  199. package/dist/lsp/manager.js +235 -0
  200. package/dist/lsp/manager.js.map +1 -0
  201. package/dist/lsp/manager.test.d.ts +1 -0
  202. package/dist/lsp/manager.test.js +133 -0
  203. package/dist/lsp/manager.test.js.map +1 -0
  204. package/dist/lsp/npm-cache.d.ts +2 -0
  205. package/dist/lsp/npm-cache.js +105 -0
  206. package/dist/lsp/npm-cache.js.map +1 -0
  207. package/dist/lsp/npm-cache.test.d.ts +1 -0
  208. package/dist/lsp/npm-cache.test.js +53 -0
  209. package/dist/lsp/npm-cache.test.js.map +1 -0
  210. package/dist/lsp/runtime.d.ts +6 -0
  211. package/dist/lsp/runtime.js +53 -0
  212. package/dist/lsp/runtime.js.map +1 -0
  213. package/dist/lsp/smoke.test.d.ts +1 -0
  214. package/dist/lsp/smoke.test.js +56 -0
  215. package/dist/lsp/smoke.test.js.map +1 -0
  216. package/dist/lsp/types.d.ts +83 -0
  217. package/dist/lsp/types.js +12 -0
  218. package/dist/lsp/types.js.map +1 -0
  219. package/dist/mcp/auto-setup.d.ts +2 -0
  220. package/dist/mcp/auto-setup.js +76 -0
  221. package/dist/mcp/auto-setup.js.map +1 -0
  222. package/dist/mcp/catalog.d.ts +10 -0
  223. package/dist/mcp/catalog.js +121 -0
  224. package/dist/mcp/catalog.js.map +1 -0
  225. package/dist/mcp/oauth-callback.d.ts +9 -0
  226. package/dist/mcp/oauth-callback.js +49 -0
  227. package/dist/mcp/oauth-callback.js.map +1 -0
  228. package/dist/mcp/oauth-provider.d.ts +33 -0
  229. package/dist/mcp/oauth-provider.js +94 -0
  230. package/dist/mcp/oauth-provider.js.map +1 -0
  231. package/dist/mcp/parse-headers.d.ts +2 -0
  232. package/dist/mcp/parse-headers.js +33 -0
  233. package/dist/mcp/parse-headers.js.map +1 -0
  234. package/dist/mcp/parse-headers.test.d.ts +1 -0
  235. package/dist/mcp/parse-headers.test.js +43 -0
  236. package/dist/mcp/parse-headers.test.js.map +1 -0
  237. package/dist/mcp/runtime.d.ts +11 -0
  238. package/dist/mcp/runtime.js +81 -0
  239. package/dist/mcp/runtime.js.map +1 -0
  240. package/dist/mcp/smoke.test.d.ts +1 -0
  241. package/dist/mcp/smoke.test.js +159 -0
  242. package/dist/mcp/smoke.test.js.map +1 -0
  243. package/dist/mcp/validate.d.ts +9 -0
  244. package/dist/mcp/validate.js +39 -0
  245. package/dist/mcp/validate.js.map +1 -0
  246. package/dist/models/__tests__/registry.test.d.ts +1 -0
  247. package/dist/models/__tests__/registry.test.js +74 -0
  248. package/dist/models/__tests__/registry.test.js.map +1 -0
  249. package/dist/models/catalog-client.d.ts +21 -0
  250. package/dist/models/catalog-client.js +53 -0
  251. package/dist/models/catalog-client.js.map +1 -0
  252. package/dist/models/classify-tier.d.ts +2 -0
  253. package/dist/models/classify-tier.js +34 -0
  254. package/dist/models/classify-tier.js.map +1 -0
  255. package/dist/models/index.d.ts +1 -0
  256. package/dist/models/index.js +2 -0
  257. package/dist/models/index.js.map +1 -0
  258. package/dist/models/registry.d.ts +19 -0
  259. package/dist/models/registry.js +65 -0
  260. package/dist/models/registry.js.map +1 -0
  261. package/dist/ops/bug-report.d.ts +28 -0
  262. package/dist/ops/bug-report.js +67 -0
  263. package/dist/ops/bug-report.js.map +1 -0
  264. package/dist/ops/bug-report.test.d.ts +1 -0
  265. package/dist/ops/bug-report.test.js +148 -0
  266. package/dist/ops/bug-report.test.js.map +1 -0
  267. package/dist/ops/doctor.d.ts +16 -0
  268. package/dist/ops/doctor.js +162 -0
  269. package/dist/ops/doctor.js.map +1 -0
  270. package/dist/ops/doctor.test.d.ts +1 -0
  271. package/dist/ops/doctor.test.js +95 -0
  272. package/dist/ops/doctor.test.js.map +1 -0
  273. package/dist/orchestrator/__tests__/flow-resume.test.d.ts +5 -0
  274. package/dist/orchestrator/__tests__/flow-resume.test.js +61 -0
  275. package/dist/orchestrator/__tests__/flow-resume.test.js.map +1 -0
  276. package/dist/orchestrator/__tests__/route-feedback.test.d.ts +1 -0
  277. package/dist/orchestrator/__tests__/route-feedback.test.js +47 -0
  278. package/dist/orchestrator/__tests__/route-feedback.test.js.map +1 -0
  279. package/dist/orchestrator/abort.d.ts +29 -0
  280. package/dist/orchestrator/abort.js +31 -0
  281. package/dist/orchestrator/abort.js.map +1 -0
  282. package/dist/orchestrator/abort.test.d.ts +1 -0
  283. package/dist/orchestrator/abort.test.js +34 -0
  284. package/dist/orchestrator/abort.test.js.map +1 -0
  285. package/dist/orchestrator/agent.test.d.ts +1 -0
  286. package/dist/orchestrator/agent.test.js +126 -0
  287. package/dist/orchestrator/agent.test.js.map +1 -0
  288. package/dist/orchestrator/cleanup.test.d.ts +1 -0
  289. package/dist/orchestrator/cleanup.test.js +67 -0
  290. package/dist/orchestrator/cleanup.test.js.map +1 -0
  291. package/dist/orchestrator/compaction.d.ts +36 -0
  292. package/dist/orchestrator/compaction.js +375 -0
  293. package/dist/orchestrator/compaction.js.map +1 -0
  294. package/dist/orchestrator/compaction.test.d.ts +1 -0
  295. package/dist/orchestrator/compaction.test.js +105 -0
  296. package/dist/orchestrator/compaction.test.js.map +1 -0
  297. package/dist/orchestrator/delegations.d.ts +49 -0
  298. package/dist/orchestrator/delegations.js +283 -0
  299. package/dist/orchestrator/delegations.js.map +1 -0
  300. package/dist/orchestrator/delegations.test.d.ts +1 -0
  301. package/dist/orchestrator/delegations.test.js +107 -0
  302. package/dist/orchestrator/delegations.test.js.map +1 -0
  303. package/dist/orchestrator/flow-resume.d.ts +25 -0
  304. package/dist/orchestrator/flow-resume.js +53 -0
  305. package/dist/orchestrator/flow-resume.js.map +1 -0
  306. package/dist/orchestrator/orchestrator.d.ts +239 -0
  307. package/dist/orchestrator/orchestrator.js +3209 -0
  308. package/dist/orchestrator/orchestrator.js.map +1 -0
  309. package/dist/orchestrator/pending-calls.d.ts +75 -0
  310. package/dist/orchestrator/pending-calls.js +178 -0
  311. package/dist/orchestrator/pending-calls.js.map +1 -0
  312. package/dist/orchestrator/pending-calls.test.d.ts +1 -0
  313. package/dist/orchestrator/pending-calls.test.js +188 -0
  314. package/dist/orchestrator/pending-calls.test.js.map +1 -0
  315. package/dist/orchestrator/reasoning.d.ts +3 -0
  316. package/dist/orchestrator/reasoning.js +53 -0
  317. package/dist/orchestrator/reasoning.js.map +1 -0
  318. package/dist/orchestrator/reasoning.test.d.ts +1 -0
  319. package/dist/orchestrator/reasoning.test.js +26 -0
  320. package/dist/orchestrator/reasoning.test.js.map +1 -0
  321. package/dist/orchestrator/sandbox.test.d.ts +1 -0
  322. package/dist/orchestrator/sandbox.test.js +94 -0
  323. package/dist/orchestrator/sandbox.test.js.map +1 -0
  324. package/dist/pil/__tests__/budget.test.d.ts +1 -0
  325. package/dist/pil/__tests__/budget.test.js +33 -0
  326. package/dist/pil/__tests__/budget.test.js.map +1 -0
  327. package/dist/pil/__tests__/layer1-intent.test.d.ts +1 -0
  328. package/dist/pil/__tests__/layer1-intent.test.js +199 -0
  329. package/dist/pil/__tests__/layer1-intent.test.js.map +1 -0
  330. package/dist/pil/__tests__/layer2-personality.test.d.ts +1 -0
  331. package/dist/pil/__tests__/layer2-personality.test.js +57 -0
  332. package/dist/pil/__tests__/layer2-personality.test.js.map +1 -0
  333. package/dist/pil/__tests__/layer3-ee-injection.test.d.ts +1 -0
  334. package/dist/pil/__tests__/layer3-ee-injection.test.js +96 -0
  335. package/dist/pil/__tests__/layer3-ee-injection.test.js.map +1 -0
  336. package/dist/pil/__tests__/layer4-gsd.test.d.ts +1 -0
  337. package/dist/pil/__tests__/layer4-gsd.test.js +68 -0
  338. package/dist/pil/__tests__/layer4-gsd.test.js.map +1 -0
  339. package/dist/pil/__tests__/layer5-context.test.d.ts +1 -0
  340. package/dist/pil/__tests__/layer5-context.test.js +100 -0
  341. package/dist/pil/__tests__/layer5-context.test.js.map +1 -0
  342. package/dist/pil/__tests__/layer6-output.test.d.ts +1 -0
  343. package/dist/pil/__tests__/layer6-output.test.js +115 -0
  344. package/dist/pil/__tests__/layer6-output.test.js.map +1 -0
  345. package/dist/pil/__tests__/ollama-classify.test.d.ts +1 -0
  346. package/dist/pil/__tests__/ollama-classify.test.js +68 -0
  347. package/dist/pil/__tests__/ollama-classify.test.js.map +1 -0
  348. package/dist/pil/__tests__/orchestrator-integration.test.d.ts +10 -0
  349. package/dist/pil/__tests__/orchestrator-integration.test.js +98 -0
  350. package/dist/pil/__tests__/orchestrator-integration.test.js.map +1 -0
  351. package/dist/pil/__tests__/pipeline.test.d.ts +1 -0
  352. package/dist/pil/__tests__/pipeline.test.js +150 -0
  353. package/dist/pil/__tests__/pipeline.test.js.map +1 -0
  354. package/dist/pil/__tests__/response-tools.test.d.ts +1 -0
  355. package/dist/pil/__tests__/response-tools.test.js +133 -0
  356. package/dist/pil/__tests__/response-tools.test.js.map +1 -0
  357. package/dist/pil/__tests__/schema.test.d.ts +1 -0
  358. package/dist/pil/__tests__/schema.test.js +112 -0
  359. package/dist/pil/__tests__/schema.test.js.map +1 -0
  360. package/dist/pil/__tests__/store.test.d.ts +1 -0
  361. package/dist/pil/__tests__/store.test.js +44 -0
  362. package/dist/pil/__tests__/store.test.js.map +1 -0
  363. package/dist/pil/__tests__/task-tier-map.test.d.ts +1 -0
  364. package/dist/pil/__tests__/task-tier-map.test.js +33 -0
  365. package/dist/pil/__tests__/task-tier-map.test.js.map +1 -0
  366. package/dist/pil/budget.d.ts +8 -0
  367. package/dist/pil/budget.js +17 -0
  368. package/dist/pil/budget.js.map +1 -0
  369. package/dist/pil/index.d.ts +11 -0
  370. package/dist/pil/index.js +11 -0
  371. package/dist/pil/index.js.map +1 -0
  372. package/dist/pil/layer1-intent.d.ts +13 -0
  373. package/dist/pil/layer1-intent.js +142 -0
  374. package/dist/pil/layer1-intent.js.map +1 -0
  375. package/dist/pil/layer2-personality.d.ts +2 -0
  376. package/dist/pil/layer2-personality.js +29 -0
  377. package/dist/pil/layer2-personality.js.map +1 -0
  378. package/dist/pil/layer3-ee-injection.d.ts +10 -0
  379. package/dist/pil/layer3-ee-injection.js +72 -0
  380. package/dist/pil/layer3-ee-injection.js.map +1 -0
  381. package/dist/pil/layer4-gsd.d.ts +2 -0
  382. package/dist/pil/layer4-gsd.js +64 -0
  383. package/dist/pil/layer4-gsd.js.map +1 -0
  384. package/dist/pil/layer5-context.d.ts +2 -0
  385. package/dist/pil/layer5-context.js +124 -0
  386. package/dist/pil/layer5-context.js.map +1 -0
  387. package/dist/pil/layer6-output.d.ts +18 -0
  388. package/dist/pil/layer6-output.js +105 -0
  389. package/dist/pil/layer6-output.js.map +1 -0
  390. package/dist/pil/ollama-classify.d.ts +13 -0
  391. package/dist/pil/ollama-classify.js +38 -0
  392. package/dist/pil/ollama-classify.js.map +1 -0
  393. package/dist/pil/pipeline.d.ts +16 -0
  394. package/dist/pil/pipeline.js +96 -0
  395. package/dist/pil/pipeline.js.map +1 -0
  396. package/dist/pil/response-tools.d.ts +63 -0
  397. package/dist/pil/response-tools.js +87 -0
  398. package/dist/pil/response-tools.js.map +1 -0
  399. package/dist/pil/schema.d.ts +80 -0
  400. package/dist/pil/schema.js +43 -0
  401. package/dist/pil/schema.js.map +1 -0
  402. package/dist/pil/store.d.ts +12 -0
  403. package/dist/pil/store.js +21 -0
  404. package/dist/pil/store.js.map +1 -0
  405. package/dist/pil/task-tier-map.d.ts +30 -0
  406. package/dist/pil/task-tier-map.js +83 -0
  407. package/dist/pil/task-tier-map.js.map +1 -0
  408. package/dist/pil/timeout.d.ts +7 -0
  409. package/dist/pil/timeout.js +10 -0
  410. package/dist/pil/timeout.js.map +1 -0
  411. package/dist/pil/types.d.ts +39 -0
  412. package/dist/pil/types.js +7 -0
  413. package/dist/pil/types.js.map +1 -0
  414. package/dist/providers/__test-utils__/load-fixture.d.ts +9 -0
  415. package/dist/providers/__test-utils__/load-fixture.js +34 -0
  416. package/dist/providers/__test-utils__/load-fixture.js.map +1 -0
  417. package/dist/providers/__tests__/runtime-integration.test.d.ts +1 -0
  418. package/dist/providers/__tests__/runtime-integration.test.js +71 -0
  419. package/dist/providers/__tests__/runtime-integration.test.js.map +1 -0
  420. package/dist/providers/__tests__/runtime.test.d.ts +1 -0
  421. package/dist/providers/__tests__/runtime.test.js +76 -0
  422. package/dist/providers/__tests__/runtime.test.js.map +1 -0
  423. package/dist/providers/adapter.d.ts +15 -0
  424. package/dist/providers/adapter.js +45 -0
  425. package/dist/providers/adapter.js.map +1 -0
  426. package/dist/providers/adapter.test.d.ts +1 -0
  427. package/dist/providers/adapter.test.js +19 -0
  428. package/dist/providers/adapter.test.js.map +1 -0
  429. package/dist/providers/anthropic.d.ts +53 -0
  430. package/dist/providers/anthropic.js +141 -0
  431. package/dist/providers/anthropic.js.map +1 -0
  432. package/dist/providers/errors.d.ts +18 -0
  433. package/dist/providers/errors.js +36 -0
  434. package/dist/providers/errors.js.map +1 -0
  435. package/dist/providers/errors.test.d.ts +1 -0
  436. package/dist/providers/errors.test.js +66 -0
  437. package/dist/providers/errors.test.js.map +1 -0
  438. package/dist/providers/gemini.d.ts +11 -0
  439. package/dist/providers/gemini.js +33 -0
  440. package/dist/providers/gemini.js.map +1 -0
  441. package/dist/providers/gemini.test.d.ts +1 -0
  442. package/dist/providers/gemini.test.js +37 -0
  443. package/dist/providers/gemini.test.js.map +1 -0
  444. package/dist/providers/index.d.ts +11 -0
  445. package/dist/providers/index.js +15 -0
  446. package/dist/providers/index.js.map +1 -0
  447. package/dist/providers/keychain.d.ts +32 -0
  448. package/dist/providers/keychain.js +127 -0
  449. package/dist/providers/keychain.js.map +1 -0
  450. package/dist/providers/keychain.test.d.ts +1 -0
  451. package/dist/providers/keychain.test.js +80 -0
  452. package/dist/providers/keychain.test.js.map +1 -0
  453. package/dist/providers/ollama.d.ts +13 -0
  454. package/dist/providers/ollama.js +33 -0
  455. package/dist/providers/ollama.js.map +1 -0
  456. package/dist/providers/ollama.test.d.ts +1 -0
  457. package/dist/providers/ollama.test.js +37 -0
  458. package/dist/providers/ollama.test.js.map +1 -0
  459. package/dist/providers/openai-compatible.d.ts +15 -0
  460. package/dist/providers/openai-compatible.js +45 -0
  461. package/dist/providers/openai-compatible.js.map +1 -0
  462. package/dist/providers/openai-compatible.test.d.ts +1 -0
  463. package/dist/providers/openai-compatible.test.js +53 -0
  464. package/dist/providers/openai-compatible.test.js.map +1 -0
  465. package/dist/providers/openai.d.ts +11 -0
  466. package/dist/providers/openai.js +33 -0
  467. package/dist/providers/openai.js.map +1 -0
  468. package/dist/providers/openai.test.d.ts +1 -0
  469. package/dist/providers/openai.test.js +53 -0
  470. package/dist/providers/openai.test.js.map +1 -0
  471. package/dist/providers/patch-zod-schema.d.ts +24 -0
  472. package/dist/providers/patch-zod-schema.js +121 -0
  473. package/dist/providers/patch-zod-schema.js.map +1 -0
  474. package/dist/providers/pricing.d.ts +21 -0
  475. package/dist/providers/pricing.js +50 -0
  476. package/dist/providers/pricing.js.map +1 -0
  477. package/dist/providers/pricing.test.d.ts +1 -0
  478. package/dist/providers/pricing.test.js +47 -0
  479. package/dist/providers/pricing.test.js.map +1 -0
  480. package/dist/providers/runtime.d.ts +21 -0
  481. package/dist/providers/runtime.js +83 -0
  482. package/dist/providers/runtime.js.map +1 -0
  483. package/dist/providers/stream-loop.d.ts +16 -0
  484. package/dist/providers/stream-loop.js +63 -0
  485. package/dist/providers/stream-loop.js.map +1 -0
  486. package/dist/providers/types.d.ts +106 -0
  487. package/dist/providers/types.js +12 -0
  488. package/dist/providers/types.js.map +1 -0
  489. package/dist/providers/vision-proxy.d.ts +23 -0
  490. package/dist/providers/vision-proxy.js +152 -0
  491. package/dist/providers/vision-proxy.js.map +1 -0
  492. package/dist/providers/vision-proxy.test.d.ts +1 -0
  493. package/dist/providers/vision-proxy.test.js +136 -0
  494. package/dist/providers/vision-proxy.test.js.map +1 -0
  495. package/dist/router/classifier/grammars.d.ts +3 -0
  496. package/dist/router/classifier/grammars.js +14 -0
  497. package/dist/router/classifier/grammars.js.map +1 -0
  498. package/dist/router/classifier/index.d.ts +3 -0
  499. package/dist/router/classifier/index.js +19 -0
  500. package/dist/router/classifier/index.js.map +1 -0
  501. package/dist/router/classifier/index.test.d.ts +1 -0
  502. package/dist/router/classifier/index.test.js +29 -0
  503. package/dist/router/classifier/index.test.js.map +1 -0
  504. package/dist/router/classifier/regex.d.ts +2 -0
  505. package/dist/router/classifier/regex.js +45 -0
  506. package/dist/router/classifier/regex.js.map +1 -0
  507. package/dist/router/classifier/regex.test.d.ts +1 -0
  508. package/dist/router/classifier/regex.test.js +42 -0
  509. package/dist/router/classifier/regex.test.js.map +1 -0
  510. package/dist/router/classifier/tree-sitter.d.ts +5 -0
  511. package/dist/router/classifier/tree-sitter.js +84 -0
  512. package/dist/router/classifier/tree-sitter.js.map +1 -0
  513. package/dist/router/classifier/tree-sitter.test.d.ts +1 -0
  514. package/dist/router/classifier/tree-sitter.test.js +23 -0
  515. package/dist/router/classifier/tree-sitter.test.js.map +1 -0
  516. package/dist/router/cold.d.ts +7 -0
  517. package/dist/router/cold.js +21 -0
  518. package/dist/router/cold.js.map +1 -0
  519. package/dist/router/cold.test.d.ts +1 -0
  520. package/dist/router/cold.test.js +56 -0
  521. package/dist/router/cold.test.js.map +1 -0
  522. package/dist/router/decide.d.ts +42 -0
  523. package/dist/router/decide.js +300 -0
  524. package/dist/router/decide.js.map +1 -0
  525. package/dist/router/decide.test.d.ts +1 -0
  526. package/dist/router/decide.test.js +116 -0
  527. package/dist/router/decide.test.js.map +1 -0
  528. package/dist/router/health.d.ts +10 -0
  529. package/dist/router/health.js +44 -0
  530. package/dist/router/health.js.map +1 -0
  531. package/dist/router/health.test.d.ts +1 -0
  532. package/dist/router/health.test.js +52 -0
  533. package/dist/router/health.test.js.map +1 -0
  534. package/dist/router/store.d.ts +24 -0
  535. package/dist/router/store.js +27 -0
  536. package/dist/router/store.js.map +1 -0
  537. package/dist/router/types.d.ts +18 -0
  538. package/dist/router/types.js +2 -0
  539. package/dist/router/types.js.map +1 -0
  540. package/dist/router/warm.d.ts +7 -0
  541. package/dist/router/warm.js +40 -0
  542. package/dist/router/warm.js.map +1 -0
  543. package/dist/router/warm.test.d.ts +1 -0
  544. package/dist/router/warm.test.js +144 -0
  545. package/dist/router/warm.test.js.map +1 -0
  546. package/dist/storage/__tests__/migrations.test.d.ts +12 -0
  547. package/dist/storage/__tests__/migrations.test.js +357 -0
  548. package/dist/storage/__tests__/migrations.test.js.map +1 -0
  549. package/dist/storage/atomic-io.d.ts +18 -0
  550. package/dist/storage/atomic-io.js +65 -0
  551. package/dist/storage/atomic-io.js.map +1 -0
  552. package/dist/storage/atomic-io.test.d.ts +1 -0
  553. package/dist/storage/atomic-io.test.js +49 -0
  554. package/dist/storage/atomic-io.test.js.map +1 -0
  555. package/dist/storage/config.d.ts +22 -0
  556. package/dist/storage/config.js +35 -0
  557. package/dist/storage/config.js.map +1 -0
  558. package/dist/storage/config.test.d.ts +1 -0
  559. package/dist/storage/config.test.js +29 -0
  560. package/dist/storage/config.test.js.map +1 -0
  561. package/dist/storage/db.d.ts +18 -0
  562. package/dist/storage/db.js +71 -0
  563. package/dist/storage/db.js.map +1 -0
  564. package/dist/storage/index.d.ts +8 -0
  565. package/dist/storage/index.js +10 -0
  566. package/dist/storage/index.js.map +1 -0
  567. package/dist/storage/migrations.d.ts +2 -0
  568. package/dist/storage/migrations.js +138 -0
  569. package/dist/storage/migrations.js.map +1 -0
  570. package/dist/storage/session-dir.d.ts +27 -0
  571. package/dist/storage/session-dir.js +36 -0
  572. package/dist/storage/session-dir.js.map +1 -0
  573. package/dist/storage/sessions.d.ts +16 -0
  574. package/dist/storage/sessions.js +142 -0
  575. package/dist/storage/sessions.js.map +1 -0
  576. package/dist/storage/tool-results.d.ts +4 -0
  577. package/dist/storage/tool-results.js +50 -0
  578. package/dist/storage/tool-results.js.map +1 -0
  579. package/dist/storage/transcript-view.d.ts +14 -0
  580. package/dist/storage/transcript-view.js +23 -0
  581. package/dist/storage/transcript-view.js.map +1 -0
  582. package/dist/storage/transcript.d.ts +12 -0
  583. package/dist/storage/transcript.js +269 -0
  584. package/dist/storage/transcript.js.map +1 -0
  585. package/dist/storage/transcript.test.d.ts +1 -0
  586. package/dist/storage/transcript.test.js +22 -0
  587. package/dist/storage/transcript.test.js.map +1 -0
  588. package/dist/storage/usage-cap.d.ts +34 -0
  589. package/dist/storage/usage-cap.js +54 -0
  590. package/dist/storage/usage-cap.js.map +1 -0
  591. package/dist/storage/usage-cap.test.d.ts +1 -0
  592. package/dist/storage/usage-cap.test.js +51 -0
  593. package/dist/storage/usage-cap.test.js.map +1 -0
  594. package/dist/storage/usage.d.ts +11 -0
  595. package/dist/storage/usage.js +65 -0
  596. package/dist/storage/usage.js.map +1 -0
  597. package/dist/storage/workspaces.d.ts +9 -0
  598. package/dist/storage/workspaces.js +60 -0
  599. package/dist/storage/workspaces.js.map +1 -0
  600. package/dist/tools/bash.d.ts +46 -0
  601. package/dist/tools/bash.js +541 -0
  602. package/dist/tools/bash.js.map +1 -0
  603. package/dist/tools/bash.test.d.ts +1 -0
  604. package/dist/tools/bash.test.js +240 -0
  605. package/dist/tools/bash.test.js.map +1 -0
  606. package/dist/tools/computer.d.ts +88 -0
  607. package/dist/tools/computer.js +443 -0
  608. package/dist/tools/computer.js.map +1 -0
  609. package/dist/tools/computer.test.d.ts +1 -0
  610. package/dist/tools/computer.test.js +142 -0
  611. package/dist/tools/computer.test.js.map +1 -0
  612. package/dist/tools/file.d.ts +17 -0
  613. package/dist/tools/file.js +101 -0
  614. package/dist/tools/file.js.map +1 -0
  615. package/dist/tools/file.test.d.ts +1 -0
  616. package/dist/tools/file.test.js +58 -0
  617. package/dist/tools/file.test.js.map +1 -0
  618. package/dist/tools/grep.d.ts +8 -0
  619. package/dist/tools/grep.js +144 -0
  620. package/dist/tools/grep.js.map +1 -0
  621. package/dist/tools/registry.d.ts +19 -0
  622. package/dist/tools/registry.js +245 -0
  623. package/dist/tools/registry.js.map +1 -0
  624. package/dist/tools/schedule.d.ts +85 -0
  625. package/dist/tools/schedule.js +498 -0
  626. package/dist/tools/schedule.js.map +1 -0
  627. package/dist/tools/schedule.test.d.ts +1 -0
  628. package/dist/tools/schedule.test.js +118 -0
  629. package/dist/tools/schedule.test.js.map +1 -0
  630. package/dist/types/index.d.ts +279 -0
  631. package/dist/types/index.js +6 -0
  632. package/dist/types/index.js.map +1 -0
  633. package/dist/ui/agents-modal.d.ts +36 -0
  634. package/dist/ui/agents-modal.js +54 -0
  635. package/dist/ui/agents-modal.js.map +1 -0
  636. package/dist/ui/app.d.ts +31 -0
  637. package/dist/ui/app.js +3957 -0
  638. package/dist/ui/app.js.map +1 -0
  639. package/dist/ui/components/SuggestionOverlay.d.ts +6 -0
  640. package/dist/ui/components/SuggestionOverlay.js +12 -0
  641. package/dist/ui/components/SuggestionOverlay.js.map +1 -0
  642. package/dist/ui/components/btw-overlay.d.ts +11 -0
  643. package/dist/ui/components/btw-overlay.js +16 -0
  644. package/dist/ui/components/btw-overlay.js.map +1 -0
  645. package/dist/ui/hooks/useTypeahead.d.ts +18 -0
  646. package/dist/ui/hooks/useTypeahead.js +111 -0
  647. package/dist/ui/hooks/useTypeahead.js.map +1 -0
  648. package/dist/ui/markdown.d.ts +5 -0
  649. package/dist/ui/markdown.js +38 -0
  650. package/dist/ui/markdown.js.map +1 -0
  651. package/dist/ui/mcp-modal-types.d.ts +24 -0
  652. package/dist/ui/mcp-modal-types.js +13 -0
  653. package/dist/ui/mcp-modal-types.js.map +1 -0
  654. package/dist/ui/mcp-modal.d.ts +33 -0
  655. package/dist/ui/mcp-modal.js +94 -0
  656. package/dist/ui/mcp-modal.js.map +1 -0
  657. package/dist/ui/plan.d.ts +24 -0
  658. package/dist/ui/plan.js +122 -0
  659. package/dist/ui/plan.js.map +1 -0
  660. package/dist/ui/schedule-modal.d.ts +15 -0
  661. package/dist/ui/schedule-modal.js +36 -0
  662. package/dist/ui/schedule-modal.js.map +1 -0
  663. package/dist/ui/slash/__tests__/clear.test.d.ts +1 -0
  664. package/dist/ui/slash/__tests__/clear.test.js +58 -0
  665. package/dist/ui/slash/__tests__/clear.test.js.map +1 -0
  666. package/dist/ui/slash/__tests__/compact.test.d.ts +1 -0
  667. package/dist/ui/slash/__tests__/compact.test.js +43 -0
  668. package/dist/ui/slash/__tests__/compact.test.js.map +1 -0
  669. package/dist/ui/slash/__tests__/cost.test.d.ts +1 -0
  670. package/dist/ui/slash/__tests__/cost.test.js +54 -0
  671. package/dist/ui/slash/__tests__/cost.test.js.map +1 -0
  672. package/dist/ui/slash/__tests__/discuss.test.d.ts +1 -0
  673. package/dist/ui/slash/__tests__/discuss.test.js +83 -0
  674. package/dist/ui/slash/__tests__/discuss.test.js.map +1 -0
  675. package/dist/ui/slash/__tests__/execute.test.d.ts +1 -0
  676. package/dist/ui/slash/__tests__/execute.test.js +71 -0
  677. package/dist/ui/slash/__tests__/execute.test.js.map +1 -0
  678. package/dist/ui/slash/__tests__/expand.test.d.ts +1 -0
  679. package/dist/ui/slash/__tests__/expand.test.js +67 -0
  680. package/dist/ui/slash/__tests__/expand.test.js.map +1 -0
  681. package/dist/ui/slash/__tests__/optimize.test.d.ts +1 -0
  682. package/dist/ui/slash/__tests__/optimize.test.js +130 -0
  683. package/dist/ui/slash/__tests__/optimize.test.js.map +1 -0
  684. package/dist/ui/slash/__tests__/plan.test.d.ts +1 -0
  685. package/dist/ui/slash/__tests__/plan.test.js +79 -0
  686. package/dist/ui/slash/__tests__/plan.test.js.map +1 -0
  687. package/dist/ui/slash/clear.d.ts +11 -0
  688. package/dist/ui/slash/clear.js +77 -0
  689. package/dist/ui/slash/clear.js.map +1 -0
  690. package/dist/ui/slash/compact.d.ts +11 -0
  691. package/dist/ui/slash/compact.js +40 -0
  692. package/dist/ui/slash/compact.js.map +1 -0
  693. package/dist/ui/slash/cost.d.ts +11 -0
  694. package/dist/ui/slash/cost.js +55 -0
  695. package/dist/ui/slash/cost.js.map +1 -0
  696. package/dist/ui/slash/council.d.ts +2 -0
  697. package/dist/ui/slash/council.js +22 -0
  698. package/dist/ui/slash/council.js.map +1 -0
  699. package/dist/ui/slash/debug.d.ts +45 -0
  700. package/dist/ui/slash/debug.js +111 -0
  701. package/dist/ui/slash/debug.js.map +1 -0
  702. package/dist/ui/slash/discuss.d.ts +11 -0
  703. package/dist/ui/slash/discuss.js +59 -0
  704. package/dist/ui/slash/discuss.js.map +1 -0
  705. package/dist/ui/slash/ee.d.ts +10 -0
  706. package/dist/ui/slash/ee.js +247 -0
  707. package/dist/ui/slash/ee.js.map +1 -0
  708. package/dist/ui/slash/execute.d.ts +12 -0
  709. package/dist/ui/slash/execute.js +36 -0
  710. package/dist/ui/slash/execute.js.map +1 -0
  711. package/dist/ui/slash/expand.d.ts +11 -0
  712. package/dist/ui/slash/expand.js +42 -0
  713. package/dist/ui/slash/expand.js.map +1 -0
  714. package/dist/ui/slash/optimize.d.ts +12 -0
  715. package/dist/ui/slash/optimize.js +37 -0
  716. package/dist/ui/slash/optimize.js.map +1 -0
  717. package/dist/ui/slash/plan.d.ts +11 -0
  718. package/dist/ui/slash/plan.js +48 -0
  719. package/dist/ui/slash/plan.js.map +1 -0
  720. package/dist/ui/slash/registry.d.ts +23 -0
  721. package/dist/ui/slash/registry.js +26 -0
  722. package/dist/ui/slash/registry.js.map +1 -0
  723. package/dist/ui/slash/route.d.ts +12 -0
  724. package/dist/ui/slash/route.js +35 -0
  725. package/dist/ui/slash/route.js.map +1 -0
  726. package/dist/ui/slash/route.test.d.ts +1 -0
  727. package/dist/ui/slash/route.test.js +70 -0
  728. package/dist/ui/slash/route.test.js.map +1 -0
  729. package/dist/ui/status-bar/index.d.ts +14 -0
  730. package/dist/ui/status-bar/index.js +74 -0
  731. package/dist/ui/status-bar/index.js.map +1 -0
  732. package/dist/ui/status-bar/index.test.d.ts +1 -0
  733. package/dist/ui/status-bar/index.test.js +80 -0
  734. package/dist/ui/status-bar/index.test.js.map +1 -0
  735. package/dist/ui/status-bar/store.d.ts +38 -0
  736. package/dist/ui/status-bar/store.js +144 -0
  737. package/dist/ui/status-bar/store.js.map +1 -0
  738. package/dist/ui/status-bar/store.test.d.ts +1 -0
  739. package/dist/ui/status-bar/store.test.js +116 -0
  740. package/dist/ui/status-bar/store.test.js.map +1 -0
  741. package/dist/ui/status-bar/tier-badge.d.ts +11 -0
  742. package/dist/ui/status-bar/tier-badge.js +19 -0
  743. package/dist/ui/status-bar/tier-badge.js.map +1 -0
  744. package/dist/ui/status-bar/tier-badge.test.d.ts +1 -0
  745. package/dist/ui/status-bar/tier-badge.test.js +34 -0
  746. package/dist/ui/status-bar/tier-badge.test.js.map +1 -0
  747. package/dist/ui/status-bar/usd-meter.d.ts +13 -0
  748. package/dist/ui/status-bar/usd-meter.js +13 -0
  749. package/dist/ui/status-bar/usd-meter.js.map +1 -0
  750. package/dist/ui/status-bar/usd-meter.test.d.ts +1 -0
  751. package/dist/ui/status-bar/usd-meter.test.js +32 -0
  752. package/dist/ui/status-bar/usd-meter.test.js.map +1 -0
  753. package/dist/ui/terminal-selection-text.d.ts +23 -0
  754. package/dist/ui/terminal-selection-text.js +59 -0
  755. package/dist/ui/terminal-selection-text.js.map +1 -0
  756. package/dist/ui/theme.d.ts +53 -0
  757. package/dist/ui/theme.js +53 -0
  758. package/dist/ui/theme.js.map +1 -0
  759. package/dist/usage/downgrade.d.ts +37 -0
  760. package/dist/usage/downgrade.js +49 -0
  761. package/dist/usage/downgrade.js.map +1 -0
  762. package/dist/usage/downgrade.test.d.ts +1 -0
  763. package/dist/usage/downgrade.test.js +67 -0
  764. package/dist/usage/downgrade.test.js.map +1 -0
  765. package/dist/usage/estimator.d.ts +17 -0
  766. package/dist/usage/estimator.js +28 -0
  767. package/dist/usage/estimator.js.map +1 -0
  768. package/dist/usage/estimator.test.d.ts +1 -0
  769. package/dist/usage/estimator.test.js +38 -0
  770. package/dist/usage/estimator.test.js.map +1 -0
  771. package/dist/usage/ledger.d.ts +42 -0
  772. package/dist/usage/ledger.js +181 -0
  773. package/dist/usage/ledger.js.map +1 -0
  774. package/dist/usage/ledger.test.d.ts +1 -0
  775. package/dist/usage/ledger.test.js +171 -0
  776. package/dist/usage/ledger.test.js.map +1 -0
  777. package/dist/usage/midstream.d.ts +24 -0
  778. package/dist/usage/midstream.js +45 -0
  779. package/dist/usage/midstream.js.map +1 -0
  780. package/dist/usage/midstream.test.d.ts +1 -0
  781. package/dist/usage/midstream.test.js +47 -0
  782. package/dist/usage/midstream.test.js.map +1 -0
  783. package/dist/usage/thresholds.d.ts +38 -0
  784. package/dist/usage/thresholds.js +54 -0
  785. package/dist/usage/thresholds.js.map +1 -0
  786. package/dist/usage/thresholds.test.d.ts +1 -0
  787. package/dist/usage/thresholds.test.js +77 -0
  788. package/dist/usage/thresholds.test.js.map +1 -0
  789. package/dist/usage/types.d.ts +30 -0
  790. package/dist/usage/types.js +21 -0
  791. package/dist/usage/types.js.map +1 -0
  792. package/dist/utils/at-mentions.d.ts +12 -0
  793. package/dist/utils/at-mentions.js +92 -0
  794. package/dist/utils/at-mentions.js.map +1 -0
  795. package/dist/utils/clipboard-image.d.ts +13 -0
  796. package/dist/utils/clipboard-image.js +121 -0
  797. package/dist/utils/clipboard-image.js.map +1 -0
  798. package/dist/utils/file-index.d.ts +13 -0
  799. package/dist/utils/file-index.js +143 -0
  800. package/dist/utils/file-index.js.map +1 -0
  801. package/dist/utils/git-root.d.ts +1 -0
  802. package/dist/utils/git-root.js +16 -0
  803. package/dist/utils/git-root.js.map +1 -0
  804. package/dist/utils/host-clipboard.d.ts +4 -0
  805. package/dist/utils/host-clipboard.js +32 -0
  806. package/dist/utils/host-clipboard.js.map +1 -0
  807. package/dist/utils/install-manager.d.ts +56 -0
  808. package/dist/utils/install-manager.js +340 -0
  809. package/dist/utils/install-manager.js.map +1 -0
  810. package/dist/utils/install-manager.test.d.ts +1 -0
  811. package/dist/utils/install-manager.test.js +127 -0
  812. package/dist/utils/install-manager.test.js.map +1 -0
  813. package/dist/utils/instructions.d.ts +3 -0
  814. package/dist/utils/instructions.js +107 -0
  815. package/dist/utils/instructions.js.map +1 -0
  816. package/dist/utils/instructions.test.d.ts +1 -0
  817. package/dist/utils/instructions.test.js +68 -0
  818. package/dist/utils/instructions.test.js.map +1 -0
  819. package/dist/utils/permission-mode.d.ts +24 -0
  820. package/dist/utils/permission-mode.js +29 -0
  821. package/dist/utils/permission-mode.js.map +1 -0
  822. package/dist/utils/permission-mode.test.d.ts +1 -0
  823. package/dist/utils/permission-mode.test.js +97 -0
  824. package/dist/utils/permission-mode.test.js.map +1 -0
  825. package/dist/utils/redactor.d.ts +57 -0
  826. package/dist/utils/redactor.js +179 -0
  827. package/dist/utils/redactor.js.map +1 -0
  828. package/dist/utils/redactor.test.d.ts +1 -0
  829. package/dist/utils/redactor.test.js +84 -0
  830. package/dist/utils/redactor.test.js.map +1 -0
  831. package/dist/utils/settings.d.ts +179 -0
  832. package/dist/utils/settings.js +579 -0
  833. package/dist/utils/settings.js.map +1 -0
  834. package/dist/utils/settings.test.d.ts +1 -0
  835. package/dist/utils/settings.test.js +160 -0
  836. package/dist/utils/settings.test.js.map +1 -0
  837. package/dist/utils/side-question.d.ts +10 -0
  838. package/dist/utils/side-question.js +24 -0
  839. package/dist/utils/side-question.js.map +1 -0
  840. package/dist/utils/skills.d.ts +20 -0
  841. package/dist/utils/skills.js +194 -0
  842. package/dist/utils/skills.js.map +1 -0
  843. package/dist/utils/skills.test.d.ts +1 -0
  844. package/dist/utils/skills.test.js +45 -0
  845. package/dist/utils/skills.test.js.map +1 -0
  846. package/dist/utils/subagent-display.d.ts +1 -0
  847. package/dist/utils/subagent-display.js +20 -0
  848. package/dist/utils/subagent-display.js.map +1 -0
  849. package/dist/utils/subagent-display.test.d.ts +1 -0
  850. package/dist/utils/subagent-display.test.js +21 -0
  851. package/dist/utils/subagent-display.test.js.map +1 -0
  852. package/dist/utils/subagents-settings.test.d.ts +1 -0
  853. package/dist/utils/subagents-settings.test.js +58 -0
  854. package/dist/utils/subagents-settings.test.js.map +1 -0
  855. package/dist/utils/telegram-audio-settings.test.d.ts +1 -0
  856. package/dist/utils/telegram-audio-settings.test.js +39 -0
  857. package/dist/utils/telegram-audio-settings.test.js.map +1 -0
  858. package/dist/utils/update-checker.d.ts +11 -0
  859. package/dist/utils/update-checker.js +22 -0
  860. package/dist/utils/update-checker.js.map +1 -0
  861. package/dist/utils/update-checker.test.d.ts +1 -0
  862. package/dist/utils/update-checker.test.js +125 -0
  863. package/dist/utils/update-checker.test.js.map +1 -0
  864. package/dist/verify/checkpoint.d.ts +11 -0
  865. package/dist/verify/checkpoint.js +202 -0
  866. package/dist/verify/checkpoint.js.map +1 -0
  867. package/dist/verify/checkpoint.test.d.ts +1 -0
  868. package/dist/verify/checkpoint.test.js +160 -0
  869. package/dist/verify/checkpoint.test.js.map +1 -0
  870. package/dist/verify/entrypoint.d.ts +30 -0
  871. package/dist/verify/entrypoint.js +349 -0
  872. package/dist/verify/entrypoint.js.map +1 -0
  873. package/dist/verify/entrypoint.test.d.ts +1 -0
  874. package/dist/verify/entrypoint.test.js +233 -0
  875. package/dist/verify/entrypoint.test.js.map +1 -0
  876. package/dist/verify/environment.d.ts +9 -0
  877. package/dist/verify/environment.js +116 -0
  878. package/dist/verify/environment.js.map +1 -0
  879. package/dist/verify/environment.test.d.ts +1 -0
  880. package/dist/verify/environment.test.js +94 -0
  881. package/dist/verify/environment.test.js.map +1 -0
  882. package/dist/verify/evidence.d.ts +10 -0
  883. package/dist/verify/evidence.js +94 -0
  884. package/dist/verify/evidence.js.map +1 -0
  885. package/dist/verify/orchestrator.d.ts +25 -0
  886. package/dist/verify/orchestrator.js +87 -0
  887. package/dist/verify/orchestrator.js.map +1 -0
  888. package/dist/verify/orchestrator.test.d.ts +1 -0
  889. package/dist/verify/orchestrator.test.js +126 -0
  890. package/dist/verify/orchestrator.test.js.map +1 -0
  891. package/dist/verify/recipes.d.ts +20 -0
  892. package/dist/verify/recipes.js +451 -0
  893. package/dist/verify/recipes.js.map +1 -0
  894. package/dist/verify/retry.d.ts +4 -0
  895. package/dist/verify/retry.js +50 -0
  896. package/dist/verify/retry.js.map +1 -0
  897. package/dist/verify/runtime-prep.test.d.ts +1 -0
  898. package/dist/verify/runtime-prep.test.js +38 -0
  899. package/dist/verify/runtime-prep.test.js.map +1 -0
  900. package/package.json +93 -0
  901. package/src/__test-stubs__/ee-server.ts +173 -0
  902. package/src/billing/index.ts +5 -0
  903. package/src/bun-sqlite.d.ts +15 -0
  904. package/src/cloud/index.ts +5 -0
  905. package/src/daemon/scheduler.test.ts +128 -0
  906. package/src/daemon/scheduler.ts +152 -0
  907. package/src/ee/.gitkeep +0 -0
  908. package/src/ee/__tests__/pipeline.integration.test.ts +193 -0
  909. package/src/ee/auth.test.ts +76 -0
  910. package/src/ee/auth.ts +59 -0
  911. package/src/ee/bridge.test.ts +290 -0
  912. package/src/ee/bridge.ts +254 -0
  913. package/src/ee/client.test.ts +171 -0
  914. package/src/ee/client.ts +512 -0
  915. package/src/ee/embedding-cache.ts +42 -0
  916. package/src/ee/extract-session.test.ts +236 -0
  917. package/src/ee/extract-session.ts +69 -0
  918. package/src/ee/health.ts +83 -0
  919. package/src/ee/index.ts +32 -0
  920. package/src/ee/intercept.test.ts +191 -0
  921. package/src/ee/intercept.ts +132 -0
  922. package/src/ee/judge.test.ts +157 -0
  923. package/src/ee/judge.ts +68 -0
  924. package/src/ee/offline-queue.test.ts +351 -0
  925. package/src/ee/offline-queue.ts +212 -0
  926. package/src/ee/posttool.test.ts +81 -0
  927. package/src/ee/posttool.ts +16 -0
  928. package/src/ee/prompt-stale.test.ts +87 -0
  929. package/src/ee/prompt-stale.ts +39 -0
  930. package/src/ee/render.test.ts +71 -0
  931. package/src/ee/render.ts +47 -0
  932. package/src/ee/scope.test.ts +112 -0
  933. package/src/ee/scope.ts +93 -0
  934. package/src/ee/tenant.ts +14 -0
  935. package/src/ee/touch.test.ts +71 -0
  936. package/src/ee/types.ts +322 -0
  937. package/src/flow/.gitkeep +0 -0
  938. package/src/flow/__tests__/migration.test.ts +133 -0
  939. package/src/flow/__tests__/parser.test.ts +77 -0
  940. package/src/flow/__tests__/run-manager.test.ts +95 -0
  941. package/src/flow/__tests__/scaffold.test.ts +57 -0
  942. package/src/flow/__tests__/warning-persist.test.ts +112 -0
  943. package/src/flow/artifact-io.ts +41 -0
  944. package/src/flow/compaction/__tests__/compress.test.ts +69 -0
  945. package/src/flow/compaction/__tests__/extract.test.ts +74 -0
  946. package/src/flow/compaction/__tests__/preserve.test.ts +69 -0
  947. package/src/flow/compaction/compress.ts +67 -0
  948. package/src/flow/compaction/extract.ts +60 -0
  949. package/src/flow/compaction/index.ts +86 -0
  950. package/src/flow/compaction/preserve.ts +48 -0
  951. package/src/flow/index.ts +18 -0
  952. package/src/flow/migration.ts +139 -0
  953. package/src/flow/parser.ts +78 -0
  954. package/src/flow/run-manager.ts +129 -0
  955. package/src/flow/scaffold.ts +52 -0
  956. package/src/flow/warning-persist.ts +84 -0
  957. package/src/gsd/.gitkeep +0 -0
  958. package/src/gsd/__tests__/types.test.ts +77 -0
  959. package/src/gsd/index.ts +1 -0
  960. package/src/gsd/types.ts +47 -0
  961. package/src/headless/output.test.ts +201 -0
  962. package/src/headless/output.ts +312 -0
  963. package/src/hooks/config.ts +41 -0
  964. package/src/hooks/index.ts +250 -0
  965. package/src/hooks/types.ts +221 -0
  966. package/src/index.ts +655 -0
  967. package/src/lsp/builtins.test.ts +104 -0
  968. package/src/lsp/builtins.ts +409 -0
  969. package/src/lsp/client.ts +342 -0
  970. package/src/lsp/manager.test.ts +164 -0
  971. package/src/lsp/manager.ts +293 -0
  972. package/src/lsp/npm-cache.test.ts +68 -0
  973. package/src/lsp/npm-cache.ts +108 -0
  974. package/src/lsp/runtime.ts +70 -0
  975. package/src/lsp/smoke.test.ts +72 -0
  976. package/src/lsp/types.ts +116 -0
  977. package/src/mcp/auto-setup.ts +80 -0
  978. package/src/mcp/catalog.ts +138 -0
  979. package/src/mcp/oauth-callback.ts +63 -0
  980. package/src/mcp/oauth-provider.ts +130 -0
  981. package/src/mcp/parse-headers.test.ts +54 -0
  982. package/src/mcp/parse-headers.ts +35 -0
  983. package/src/mcp/runtime.ts +113 -0
  984. package/src/mcp/smoke.test.ts +170 -0
  985. package/src/mcp/validate.ts +48 -0
  986. package/src/models/__tests__/registry.test.ts +95 -0
  987. package/src/models/catalog-client.ts +83 -0
  988. package/src/models/catalog.json +314 -0
  989. package/src/models/classify-tier.ts +37 -0
  990. package/src/models/index.ts +9 -0
  991. package/src/models/registry.ts +73 -0
  992. package/src/ops/bug-report.test.ts +172 -0
  993. package/src/ops/bug-report.ts +80 -0
  994. package/src/ops/doctor.test.ts +107 -0
  995. package/src/ops/doctor.ts +172 -0
  996. package/src/orchestrator/__tests__/flow-resume.test.ts +71 -0
  997. package/src/orchestrator/__tests__/route-feedback.test.ts +55 -0
  998. package/src/orchestrator/abort.test.ts +37 -0
  999. package/src/orchestrator/abort.ts +51 -0
  1000. package/src/orchestrator/agent.test.ts +138 -0
  1001. package/src/orchestrator/cleanup.test.ts +88 -0
  1002. package/src/orchestrator/compaction.test.ts +134 -0
  1003. package/src/orchestrator/compaction.ts +487 -0
  1004. package/src/orchestrator/delegations.test.ts +145 -0
  1005. package/src/orchestrator/delegations.ts +364 -0
  1006. package/src/orchestrator/flow-resume.ts +55 -0
  1007. package/src/orchestrator/orchestrator.ts +3965 -0
  1008. package/src/orchestrator/pending-calls.test.ts +226 -0
  1009. package/src/orchestrator/pending-calls.ts +240 -0
  1010. package/src/orchestrator/reasoning.test.ts +29 -0
  1011. package/src/orchestrator/reasoning.ts +64 -0
  1012. package/src/orchestrator/sandbox.test.ts +115 -0
  1013. package/src/pil/__tests__/budget.test.ts +39 -0
  1014. package/src/pil/__tests__/layer1-intent.test.ts +243 -0
  1015. package/src/pil/__tests__/layer2-personality.test.ts +63 -0
  1016. package/src/pil/__tests__/layer3-ee-injection.test.ts +117 -0
  1017. package/src/pil/__tests__/layer4-gsd.test.ts +76 -0
  1018. package/src/pil/__tests__/layer5-context.test.ts +116 -0
  1019. package/src/pil/__tests__/layer6-output.test.ts +139 -0
  1020. package/src/pil/__tests__/ollama-classify.test.ts +81 -0
  1021. package/src/pil/__tests__/orchestrator-integration.test.ts +107 -0
  1022. package/src/pil/__tests__/pipeline.test.ts +173 -0
  1023. package/src/pil/__tests__/response-tools.test.ts +165 -0
  1024. package/src/pil/__tests__/schema.test.ts +128 -0
  1025. package/src/pil/__tests__/store.test.ts +49 -0
  1026. package/src/pil/__tests__/task-tier-map.test.ts +41 -0
  1027. package/src/pil/budget.ts +18 -0
  1028. package/src/pil/index.ts +12 -0
  1029. package/src/pil/layer1-intent.ts +155 -0
  1030. package/src/pil/layer2-personality.ts +37 -0
  1031. package/src/pil/layer3-ee-injection.ts +79 -0
  1032. package/src/pil/layer4-gsd.ts +77 -0
  1033. package/src/pil/layer5-context.ts +125 -0
  1034. package/src/pil/layer6-output.ts +113 -0
  1035. package/src/pil/ollama-classify.ts +49 -0
  1036. package/src/pil/pipeline.ts +112 -0
  1037. package/src/pil/response-tools.ts +110 -0
  1038. package/src/pil/schema.ts +49 -0
  1039. package/src/pil/store.ts +29 -0
  1040. package/src/pil/task-tier-map.ts +90 -0
  1041. package/src/pil/timeout.ts +10 -0
  1042. package/src/pil/types.ts +42 -0
  1043. package/src/providers/.gitkeep +0 -0
  1044. package/src/providers/__test-utils__/load-fixture.ts +36 -0
  1045. package/src/providers/__tests__/runtime-integration.test.ts +80 -0
  1046. package/src/providers/__tests__/runtime.test.ts +86 -0
  1047. package/src/providers/adapter.test.ts +21 -0
  1048. package/src/providers/adapter.ts +48 -0
  1049. package/src/providers/anthropic.ts +169 -0
  1050. package/src/providers/errors.test.ts +76 -0
  1051. package/src/providers/errors.ts +46 -0
  1052. package/src/providers/gemini.test.ts +46 -0
  1053. package/src/providers/gemini.ts +37 -0
  1054. package/src/providers/index.ts +32 -0
  1055. package/src/providers/keychain.test.ts +95 -0
  1056. package/src/providers/keychain.ts +133 -0
  1057. package/src/providers/ollama.test.ts +46 -0
  1058. package/src/providers/ollama.ts +36 -0
  1059. package/src/providers/openai-compatible.test.ts +63 -0
  1060. package/src/providers/openai-compatible.ts +50 -0
  1061. package/src/providers/openai.test.ts +65 -0
  1062. package/src/providers/openai.ts +37 -0
  1063. package/src/providers/patch-zod-schema.ts +129 -0
  1064. package/src/providers/pricing.test.ts +56 -0
  1065. package/src/providers/pricing.ts +55 -0
  1066. package/src/providers/runtime.ts +111 -0
  1067. package/src/providers/stream-loop.ts +69 -0
  1068. package/src/providers/types.ts +111 -0
  1069. package/src/providers/vision-proxy.test.ts +167 -0
  1070. package/src/providers/vision-proxy.ts +209 -0
  1071. package/src/router/.gitkeep +0 -0
  1072. package/src/router/classifier/grammars.ts +17 -0
  1073. package/src/router/classifier/index.test.ts +33 -0
  1074. package/src/router/classifier/index.ts +21 -0
  1075. package/src/router/classifier/regex.test.ts +47 -0
  1076. package/src/router/classifier/regex.ts +54 -0
  1077. package/src/router/classifier/tree-sitter.test.ts +26 -0
  1078. package/src/router/classifier/tree-sitter.ts +87 -0
  1079. package/src/router/cold.test.ts +62 -0
  1080. package/src/router/cold.ts +27 -0
  1081. package/src/router/decide.test.ts +135 -0
  1082. package/src/router/decide.ts +354 -0
  1083. package/src/router/health.test.ts +59 -0
  1084. package/src/router/health.ts +49 -0
  1085. package/src/router/store.ts +47 -0
  1086. package/src/router/types.ts +20 -0
  1087. package/src/router/warm.test.ts +167 -0
  1088. package/src/router/warm.ts +47 -0
  1089. package/src/storage/__tests__/migrations.test.ts +395 -0
  1090. package/src/storage/atomic-io.test.ts +61 -0
  1091. package/src/storage/atomic-io.ts +62 -0
  1092. package/src/storage/config.test.ts +33 -0
  1093. package/src/storage/config.ts +49 -0
  1094. package/src/storage/db.ts +95 -0
  1095. package/src/storage/index.ts +19 -0
  1096. package/src/storage/migrations.ts +143 -0
  1097. package/src/storage/session-dir.ts +37 -0
  1098. package/src/storage/sessions.ts +178 -0
  1099. package/src/storage/tool-results.ts +56 -0
  1100. package/src/storage/transcript-view.ts +45 -0
  1101. package/src/storage/transcript.test.ts +24 -0
  1102. package/src/storage/transcript.ts +358 -0
  1103. package/src/storage/usage-cap.test.ts +59 -0
  1104. package/src/storage/usage-cap.ts +81 -0
  1105. package/src/storage/usage.ts +115 -0
  1106. package/src/storage/workspaces.ts +84 -0
  1107. package/src/tools/bash.test.ts +336 -0
  1108. package/src/tools/bash.ts +612 -0
  1109. package/src/tools/computer.test.ts +187 -0
  1110. package/src/tools/computer.ts +632 -0
  1111. package/src/tools/file.test.ts +95 -0
  1112. package/src/tools/file.ts +128 -0
  1113. package/src/tools/grep.ts +187 -0
  1114. package/src/tools/registry.ts +282 -0
  1115. package/src/tools/schedule.test.ts +143 -0
  1116. package/src/tools/schedule.ts +610 -0
  1117. package/src/types/index.ts +311 -0
  1118. package/src/ui/agents-modal.tsx +272 -0
  1119. package/src/ui/app.tsx +6277 -0
  1120. package/src/ui/components/SuggestionOverlay.tsx +38 -0
  1121. package/src/ui/components/btw-overlay.tsx +66 -0
  1122. package/src/ui/hooks/useTypeahead.ts +146 -0
  1123. package/src/ui/markdown.tsx +49 -0
  1124. package/src/ui/mcp-modal-types.ts +33 -0
  1125. package/src/ui/mcp-modal.tsx +456 -0
  1126. package/src/ui/plan.tsx +346 -0
  1127. package/src/ui/schedule-modal.tsx +126 -0
  1128. package/src/ui/slash/__tests__/clear.test.ts +86 -0
  1129. package/src/ui/slash/__tests__/compact.test.ts +56 -0
  1130. package/src/ui/slash/__tests__/cost.test.ts +62 -0
  1131. package/src/ui/slash/__tests__/discuss.test.ts +101 -0
  1132. package/src/ui/slash/__tests__/execute.test.ts +86 -0
  1133. package/src/ui/slash/__tests__/expand.test.ts +86 -0
  1134. package/src/ui/slash/__tests__/optimize.test.ts +155 -0
  1135. package/src/ui/slash/__tests__/plan.test.ts +95 -0
  1136. package/src/ui/slash/clear.ts +89 -0
  1137. package/src/ui/slash/compact.ts +46 -0
  1138. package/src/ui/slash/cost.ts +59 -0
  1139. package/src/ui/slash/council.ts +27 -0
  1140. package/src/ui/slash/debug.ts +153 -0
  1141. package/src/ui/slash/discuss.ts +71 -0
  1142. package/src/ui/slash/ee.ts +271 -0
  1143. package/src/ui/slash/execute.ts +44 -0
  1144. package/src/ui/slash/expand.ts +51 -0
  1145. package/src/ui/slash/optimize.ts +47 -0
  1146. package/src/ui/slash/plan.ts +62 -0
  1147. package/src/ui/slash/registry.ts +38 -0
  1148. package/src/ui/slash/route.test.ts +82 -0
  1149. package/src/ui/slash/route.ts +43 -0
  1150. package/src/ui/status-bar/index.test.tsx +90 -0
  1151. package/src/ui/status-bar/index.tsx +94 -0
  1152. package/src/ui/status-bar/store.test.ts +131 -0
  1153. package/src/ui/status-bar/store.ts +166 -0
  1154. package/src/ui/status-bar/tier-badge.test.tsx +38 -0
  1155. package/src/ui/status-bar/tier-badge.tsx +29 -0
  1156. package/src/ui/status-bar/usd-meter.test.tsx +37 -0
  1157. package/src/ui/status-bar/usd-meter.tsx +22 -0
  1158. package/src/ui/terminal-selection-text.ts +72 -0
  1159. package/src/ui/theme.ts +54 -0
  1160. package/src/usage/.gitkeep +0 -0
  1161. package/src/usage/downgrade.test.ts +82 -0
  1162. package/src/usage/downgrade.ts +70 -0
  1163. package/src/usage/estimator.test.ts +43 -0
  1164. package/src/usage/estimator.ts +34 -0
  1165. package/src/usage/ledger.test.ts +200 -0
  1166. package/src/usage/ledger.ts +213 -0
  1167. package/src/usage/midstream.test.ts +55 -0
  1168. package/src/usage/midstream.ts +51 -0
  1169. package/src/usage/thresholds.test.ts +83 -0
  1170. package/src/usage/thresholds.ts +74 -0
  1171. package/src/usage/types.ts +40 -0
  1172. package/src/utils/at-mentions.ts +120 -0
  1173. package/src/utils/clipboard-image.ts +114 -0
  1174. package/src/utils/file-index.ts +152 -0
  1175. package/src/utils/git-root.ts +17 -0
  1176. package/src/utils/host-clipboard.ts +30 -0
  1177. package/src/utils/install-manager.test.ts +167 -0
  1178. package/src/utils/install-manager.ts +429 -0
  1179. package/src/utils/instructions.test.ts +84 -0
  1180. package/src/utils/instructions.ts +116 -0
  1181. package/src/utils/permission-mode.test.ts +121 -0
  1182. package/src/utils/permission-mode.ts +37 -0
  1183. package/src/utils/redactor.test.ts +100 -0
  1184. package/src/utils/redactor.ts +223 -0
  1185. package/src/utils/settings.test.ts +181 -0
  1186. package/src/utils/settings.ts +787 -0
  1187. package/src/utils/side-question.ts +39 -0
  1188. package/src/utils/skills.test.ts +58 -0
  1189. package/src/utils/skills.ts +207 -0
  1190. package/src/utils/subagent-display.test.ts +23 -0
  1191. package/src/utils/subagent-display.ts +11 -0
  1192. package/src/utils/subagents-settings.test.ts +77 -0
  1193. package/src/utils/telegram-audio-settings.test.ts +44 -0
  1194. package/src/utils/update-checker.test.ts +182 -0
  1195. package/src/utils/update-checker.ts +33 -0
  1196. package/src/verify/checkpoint.test.ts +186 -0
  1197. package/src/verify/checkpoint.ts +239 -0
  1198. package/src/verify/entrypoint.test.ts +293 -0
  1199. package/src/verify/entrypoint.ts +439 -0
  1200. package/src/verify/environment.test.ts +119 -0
  1201. package/src/verify/environment.ts +115 -0
  1202. package/src/verify/evidence.ts +104 -0
  1203. package/src/verify/orchestrator.test.ts +159 -0
  1204. package/src/verify/orchestrator.ts +129 -0
  1205. package/src/verify/recipes.ts +516 -0
  1206. package/src/verify/retry.ts +62 -0
  1207. package/src/verify/runtime-prep.test.ts +47 -0
@@ -0,0 +1,30 @@
1
+ import type { TaskRequest, VerifyRecipe } from "../types/index";
2
+ import type { SandboxSettings } from "../utils/settings";
3
+ import { type PreparedVerifyCheckpoint } from "./checkpoint";
4
+ import { type VerifyProjectProfile } from "./recipes";
5
+ export declare const VERIFY_SUBAGENT_ID = "verify";
6
+ export declare const VERIFY_TASK_DESCRIPTION = "Run local verification";
7
+ export interface VerifyRuntimeConfig {
8
+ sandboxMode: "shuru";
9
+ sandboxSettings: SandboxSettings;
10
+ taskRequest: TaskRequest;
11
+ profile: VerifyProjectProfile;
12
+ checkpointCreated?: boolean;
13
+ }
14
+ export interface PreparedVerifySandbox {
15
+ profile: VerifyProjectProfile;
16
+ sandboxSettings: SandboxSettings;
17
+ checkpoint?: PreparedVerifyCheckpoint;
18
+ }
19
+ export declare function buildVerifyTaskPrompt(cwd: string, settings?: SandboxSettings, recipeOverride?: VerifyRecipe | null): string;
20
+ export declare function createVerifyTaskRequest(cwd: string, settings?: SandboxSettings, recipeOverride?: VerifyRecipe | null): TaskRequest;
21
+ export declare function buildVerifyDetectPrompt(cwd: string, settings?: SandboxSettings): string;
22
+ export declare function createVerifyRuntimeConfig(cwd: string, baseSettings?: SandboxSettings, recipeOverride?: VerifyRecipe | null): VerifyRuntimeConfig;
23
+ export declare function prepareVerifySandbox(cwd: string, baseSettings?: SandboxSettings, recipeOverride?: VerifyRecipe | null, onProgress?: (detail: string) => void): Promise<PreparedVerifySandbox>;
24
+ export declare function buildVerifyPrompt(cwd: string): string;
25
+ export declare const VERIFY_PROMPT = "__DYNAMIC__";
26
+ export declare function getVerifyCliError(options: {
27
+ hasPrompt?: boolean;
28
+ hasMessageArgs?: boolean;
29
+ }): string | null;
30
+ export { defaultShellInit, inferVerifyProjectProfile, inferVerifySmokeUrl, normalizeVerifyRecipe, type VerifyProjectProfile, } from "./recipes";
@@ -0,0 +1,349 @@
1
+ import { ensureVerifyCheckpoint } from "./checkpoint";
2
+ import { loadVerifyEnvironment } from "./environment";
3
+ import { buildBrowserGuidance, buildEvidenceGuidance, buildReadinessGuidance } from "./evidence";
4
+ import { defaultShellInit, detectPackageManager, getNodeWebBootstrapCommands, getNodeWebShellInitCommands, inferVerifyProjectProfile, normalizeVerifyAppKind, } from "./recipes";
5
+ import { buildRetryGuidance } from "./retry";
6
+ export const VERIFY_SUBAGENT_ID = "verify";
7
+ export const VERIFY_TASK_DESCRIPTION = "Run local verification";
8
+ function dedupe(values) {
9
+ return [...new Set(values.map((v) => v?.trim()).filter((v) => Boolean(v)))];
10
+ }
11
+ function formatRecipeCommands(title, commands) {
12
+ return commands.length > 0 ? `- ${title}: ${commands.join(" ; ")}` : `- ${title}: (none inferred)`;
13
+ }
14
+ function buildProjectContextLines(profile) {
15
+ const lines = [`- Detected app type: ${profile.appLabel}.`, `- Recipe ecosystem: ${profile.recipe.ecosystem}.`];
16
+ if (profile.packageManager) {
17
+ lines.push(`- Likely package manager: ${profile.packageManager}.`);
18
+ }
19
+ if (profile.availableScripts.length > 0) {
20
+ lines.push(`- Available package.json scripts: ${profile.availableScripts.join(", ")}.`);
21
+ }
22
+ lines.push(...profile.recipe.evidence.map((evidence) => `- Evidence: ${evidence}.`));
23
+ lines.push(formatRecipeCommands("Shell init", profile.recipe.shellInitCommands));
24
+ lines.push(formatRecipeCommands("Bootstrap commands", profile.recipe.bootstrapCommands));
25
+ lines.push(formatRecipeCommands("Install commands", profile.recipe.installCommands));
26
+ lines.push(formatRecipeCommands("Build commands", profile.recipe.buildCommands));
27
+ lines.push(formatRecipeCommands("Test commands", profile.recipe.testCommands));
28
+ lines.push(`- Start command: ${profile.recipe.startCommand ?? "(none inferred)"}.`);
29
+ if (profile.recipe.smokeTarget) {
30
+ lines.push(`- Smoke target: ${profile.recipe.smokeTarget}.`);
31
+ }
32
+ lines.push(...profile.recipe.notes.map((note) => `- Note: ${note}`));
33
+ return lines;
34
+ }
35
+ export function buildVerifyTaskPrompt(cwd, settings, recipeOverride) {
36
+ const manifest = recipeOverride ? null : loadVerifyEnvironment(cwd, settings);
37
+ const effectiveSettings = manifest?.sandboxSettings ?? settings;
38
+ const profile = inferVerifyProjectProfile(cwd, effectiveSettings, recipeOverride ?? manifest?.recipe ?? null);
39
+ const checkpoint = profile.sandboxSettings.from?.trim();
40
+ const network = profile.sandboxSettings.allowNet
41
+ ? profile.sandboxSettings.allowedHosts?.length
42
+ ? `enabled but restricted to: ${profile.sandboxSettings.allowedHosts.join(", ")}`
43
+ : "enabled"
44
+ : "disabled";
45
+ return [
46
+ "Run a local verification pass for the current workspace.",
47
+ "",
48
+ "Goals:",
49
+ "- Prove the current changes work as well as possible in phase 1.",
50
+ "- First derive and sanity-check a runnable verification recipe from the repository.",
51
+ "- Then execute that recipe inside the active Shuru sandbox and report the result.",
52
+ "",
53
+ "Detected project context and inferred recipe:",
54
+ ...(manifest ? [`- Verify environment manifest: ${manifest.path}.`] : []),
55
+ ...buildProjectContextLines(profile),
56
+ "",
57
+ "Environment:",
58
+ "- Sandbox mode should be Shuru with workspace mounted at /workspace.",
59
+ `- Network is ${network}.`,
60
+ checkpoint
61
+ ? `- Start from the configured Shuru checkpoint: ${checkpoint}.`
62
+ : "- No Shuru checkpoint is configured; use the current sandbox settings as-is.",
63
+ "- Shuru runs are ephemeral in this version. Shell-side workspace edits do not persist back to the host.",
64
+ "",
65
+ "MANDATORY workflow (do ALL steps in order, do NOT stop after build/lint):",
66
+ "",
67
+ "Phase 1 — Setup:",
68
+ "- Probe the sandbox for runtimes (`command -v node`, `command -v npm`, etc). Only install what is missing.",
69
+ "- Ephemeral installs are allowed. Chain install + build in the same sandbox command if no checkpoint provides deps.",
70
+ "",
71
+ "Phase 2 — Build and test:",
72
+ "- Run installCommands, buildCommands, and testCommands from the recipe.",
73
+ "",
74
+ "Phase 3 — Start the app (REQUIRED, do not skip):",
75
+ "- Start the app using startCommand from the recipe, running it in the background.",
76
+ "- Wait for the app to be ready: use a curl readiness loop or `agent-browser wait --load networkidle`.",
77
+ "- If the app fails to start, report the error but still attempt to capture evidence (logs, screenshots).",
78
+ "",
79
+ "Phase 4 — Browser QA testing (REQUIRED, do not skip):",
80
+ "- You are a QA tester. Open the app in the browser and test it like a human would.",
81
+ "- agent-browser commands run on the HOST, not the sandbox. They WILL work. Do not skip them.",
82
+ "- Record a video of the entire browser session.",
83
+ "- Navigate the app: click links, buttons, menus. Verify pages load correctly.",
84
+ "- Check for JavaScript console errors.",
85
+ "- Spend 3-5 interactions testing the critical path. Take screenshots after each.",
86
+ "- This is the most important phase. Build/lint passing means nothing if the app doesn't actually work.",
87
+ "",
88
+ "Phase 5 — Teardown:",
89
+ "- Stop recording, close browser, THEN stop the dev server.",
90
+ ...buildReadinessGuidance(profile),
91
+ ...buildBrowserGuidance(profile),
92
+ ...buildRetryGuidance(profile),
93
+ ...buildEvidenceGuidance(),
94
+ "",
95
+ "Reporting requirements:",
96
+ "- Return a concise structured report with these sections only:",
97
+ " Summary",
98
+ " Results",
99
+ " Evidence",
100
+ " Blockers",
101
+ " Residual Risk",
102
+ "- Keep the report compact: prefer 1-3 short bullets per section, and do not paste large command logs unless they are essential blockers.",
103
+ "- The Summary must say what recipe/source of truth you used and whether you changed the inferred/default one.",
104
+ "- Evidence is mandatory even on failure. If you captured screenshots, video, or logs, include their exact workspace-relative file paths in the Evidence section.",
105
+ "- Use markdown links for artifact paths when practical, otherwise include the plain relative paths.",
106
+ ].join("\n");
107
+ }
108
+ export function createVerifyTaskRequest(cwd, settings, recipeOverride) {
109
+ return {
110
+ agent: VERIFY_SUBAGENT_ID,
111
+ description: VERIFY_TASK_DESCRIPTION,
112
+ prompt: buildVerifyTaskPrompt(cwd, settings, recipeOverride),
113
+ };
114
+ }
115
+ export function buildVerifyDetectPrompt(cwd, settings) {
116
+ const manifest = loadVerifyEnvironment(cwd, settings);
117
+ const fallbackProfile = inferVerifyProjectProfile(cwd, manifest?.sandboxSettings ?? settings, manifest?.recipe ?? null);
118
+ return [
119
+ "Inspect this repository and produce a structured verification recipe.",
120
+ "",
121
+ "Your job:",
122
+ "- Read the codebase, config files, and any relevant docs or AGENTS guidance.",
123
+ "- If environment.json or .muonroi-cli/environment.json exists, treat it as the highest-priority source of truth and only fill in missing details.",
124
+ "- Infer how the project should be installed, built, tested, and started.",
125
+ "- Infer whether verification should use HTTP/browser smoke checks, CLI checks, or no runtime smoke step.",
126
+ "- Prefer concrete commands that are likely to work in a fresh Debian Linux environment.",
127
+ "- Design the recipe so verification probes for runtimes/tools first and only installs missing dependencies or toolchains when necessary.",
128
+ "- Use the fallback hints below only as clues, not as the final answer.",
129
+ "",
130
+ "IMPORTANT for shellInitCommands and bootstrapCommands:",
131
+ "- The sandbox is a fresh Debian Linux VM with almost nothing pre-installed.",
132
+ '- shellInitCommands run before every bash command. Use them for PATH exports (e.g. export PATH="$HOME/.bun/bin:$PATH").',
133
+ "- bootstrapCommands run once during checkpoint creation to install runtimes and tools.",
134
+ "- You MUST include bootstrap commands to install any runtime the project needs (e.g. bun, node, npm, python3, go, cargo, java).",
135
+ "- Example for a Bun + Next.js project: bootstrapCommands should install both bun AND node/npm, since Next.js calls npm internally.",
136
+ '- Example: ["apt-get update && apt-get install -y curl unzip ca-certificates && curl -fsSL https://bun.sh/install | bash", "apt-get install -y nodejs npm"]',
137
+ "",
138
+ "Fallback hints from static detection:",
139
+ ...(manifest ? [`- Detected verify environment manifest: ${manifest.path}.`] : []),
140
+ ...buildProjectContextLines(fallbackProfile),
141
+ "",
142
+ "Return ONLY valid JSON with this exact shape:",
143
+ "{",
144
+ ' "ecosystem": string,',
145
+ ' "appKind": string,',
146
+ ' "appLabel": string,',
147
+ ' "shellInitCommands": string[],',
148
+ ' "bootstrapCommands": string[],',
149
+ ' "installCommands": string[],',
150
+ ' "buildCommands": string[],',
151
+ ' "testCommands": string[],',
152
+ ' "startCommand": string | undefined,',
153
+ ' "startPort": string | undefined,',
154
+ ' "smokeKind": "http" | "cli" | "none",',
155
+ ' "smokeTarget": string | undefined,',
156
+ ' "evidence": string[],',
157
+ ' "notes": string[]',
158
+ "}",
159
+ "",
160
+ "Rules:",
161
+ "- Do not wrap the JSON in markdown.",
162
+ "- Do not include explanatory prose outside the JSON.",
163
+ "- If you are uncertain, put that uncertainty into `notes` and `evidence`.",
164
+ ].join("\n");
165
+ }
166
+ const NODE_ECOSYSTEMS = new Set(["node", "nodejs", "npm", "bun", "yarn", "pnpm"]);
167
+ const PYTHON_ECOSYSTEMS = new Set(["python", "django", "fastapi"]);
168
+ const GO_ECOSYSTEMS = new Set(["go", "golang"]);
169
+ const RUST_ECOSYSTEMS = new Set(["rust", "cargo"]);
170
+ function inferBootstrapFromEcosystem(ecosystem, packageManager) {
171
+ const eco = ecosystem.toLowerCase();
172
+ if (NODE_ECOSYSTEMS.has(eco) ||
173
+ eco.includes("node") ||
174
+ eco.includes("next") ||
175
+ eco.includes("react") ||
176
+ eco.includes("vite")) {
177
+ const bootstrap = [
178
+ "apt-get update && apt-get install -y curl unzip ca-certificates git python3 make g++ pkg-config nodejs npm",
179
+ ];
180
+ const shellInit = [...defaultShellInit()];
181
+ if (packageManager === "bun") {
182
+ bootstrap.push("curl -fsSL https://bun.sh/install | bash");
183
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: shell variable, not JS template
184
+ shellInit.push('export BUN_INSTALL="${HOME}/.bun"');
185
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: shell variable, not JS template
186
+ shellInit.push('export PATH="${BUN_INSTALL}/bin:$PATH"');
187
+ }
188
+ return { bootstrap, shellInit };
189
+ }
190
+ if (PYTHON_ECOSYSTEMS.has(eco) || eco.includes("python") || eco.includes("django") || eco.includes("flask")) {
191
+ return {
192
+ bootstrap: ["apt-get update && apt-get install -y python3 python3-pip python3-venv ca-certificates git"],
193
+ shellInit: defaultShellInit(),
194
+ };
195
+ }
196
+ if (GO_ECOSYSTEMS.has(eco) || eco.includes("go")) {
197
+ return {
198
+ bootstrap: ["apt-get update && apt-get install -y golang ca-certificates git"],
199
+ shellInit: defaultShellInit(),
200
+ };
201
+ }
202
+ if (RUST_ECOSYSTEMS.has(eco) || eco.includes("rust")) {
203
+ return {
204
+ bootstrap: [
205
+ "apt-get update && apt-get install -y curl ca-certificates git build-essential && curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y",
206
+ ],
207
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: shell variable, not JS template
208
+ shellInit: [...defaultShellInit(), 'export PATH="${HOME}/.cargo/bin:$PATH"'],
209
+ };
210
+ }
211
+ return { bootstrap: [], shellInit: [] };
212
+ }
213
+ function ensureBootstrapCommands(cwd, recipe) {
214
+ if (recipe.bootstrapCommands.length > 0)
215
+ return recipe;
216
+ if (recipe.installCommands.length === 0)
217
+ return recipe;
218
+ const packageManager = detectPackageManager(cwd);
219
+ const appKind = normalizeVerifyAppKind(recipe.appKind);
220
+ const webBootstrap = getNodeWebBootstrapCommands(packageManager, appKind);
221
+ if (webBootstrap.length > 0) {
222
+ const webShellInit = getNodeWebShellInitCommands(packageManager, appKind);
223
+ return {
224
+ ...recipe,
225
+ bootstrapCommands: webBootstrap,
226
+ shellInitCommands: dedupe([...recipe.shellInitCommands, ...webShellInit]),
227
+ };
228
+ }
229
+ const { bootstrap, shellInit } = inferBootstrapFromEcosystem(recipe.ecosystem, packageManager);
230
+ if (bootstrap.length === 0)
231
+ return recipe;
232
+ return {
233
+ ...recipe,
234
+ bootstrapCommands: bootstrap,
235
+ shellInitCommands: dedupe([...recipe.shellInitCommands, ...shellInit]),
236
+ };
237
+ }
238
+ export function createVerifyRuntimeConfig(cwd, baseSettings = {}, recipeOverride) {
239
+ const manifest = recipeOverride ? null : loadVerifyEnvironment(cwd, baseSettings);
240
+ const profile = inferVerifyProjectProfile(cwd, manifest?.sandboxSettings ?? baseSettings, recipeOverride ?? manifest?.recipe ?? null);
241
+ profile.recipe = ensureBootstrapCommands(cwd, profile.recipe);
242
+ const sandboxSettings = {
243
+ ...profile.sandboxSettings,
244
+ allowNet: true,
245
+ allowedHosts: undefined,
246
+ allowEphemeralInstall: true,
247
+ hostBrowserCommandsOnHost: true,
248
+ };
249
+ sandboxSettings.shellInit = dedupe([...(sandboxSettings.shellInit ?? []), ...profile.recipe.shellInitCommands]);
250
+ return {
251
+ sandboxMode: "shuru",
252
+ sandboxSettings,
253
+ taskRequest: createVerifyTaskRequest(cwd, sandboxSettings, profile.recipe),
254
+ profile: { ...profile, sandboxSettings },
255
+ };
256
+ }
257
+ export async function prepareVerifySandbox(cwd, baseSettings = {}, recipeOverride, onProgress) {
258
+ const runtime = createVerifyRuntimeConfig(cwd, baseSettings, recipeOverride);
259
+ onProgress?.("Preparing verify checkpoint");
260
+ const checkpoint = await ensureVerifyCheckpoint(cwd, runtime.profile, runtime.sandboxSettings, onProgress);
261
+ if (checkpoint.checkpointName) {
262
+ runtime.sandboxSettings.from = checkpoint.checkpointName;
263
+ if (checkpoint.guestWorkdir) {
264
+ runtime.sandboxSettings.guestWorkdir = checkpoint.guestWorkdir;
265
+ runtime.sandboxSettings.syncHostWorkspace = true;
266
+ }
267
+ onProgress?.(checkpoint.created
268
+ ? `Created verify checkpoint: ${checkpoint.checkpointName}`
269
+ : `Using verify checkpoint: ${checkpoint.checkpointName}`);
270
+ }
271
+ else {
272
+ onProgress?.("No verify checkpoint needed");
273
+ }
274
+ return {
275
+ profile: runtime.profile,
276
+ sandboxSettings: runtime.sandboxSettings,
277
+ checkpoint,
278
+ };
279
+ }
280
+ export function buildVerifyPrompt(cwd) {
281
+ const profile = inferVerifyProjectProfile(cwd);
282
+ const recipe = ensureBootstrapCommands(cwd, profile.recipe);
283
+ const draftJson = JSON.stringify({
284
+ recipe: {
285
+ ecosystem: recipe.ecosystem,
286
+ appKind: recipe.appKind,
287
+ appLabel: recipe.appLabel,
288
+ shellInitCommands: recipe.shellInitCommands,
289
+ bootstrapCommands: recipe.bootstrapCommands,
290
+ installCommands: recipe.installCommands,
291
+ buildCommands: recipe.buildCommands,
292
+ testCommands: recipe.testCommands,
293
+ startCommand: recipe.startCommand,
294
+ startPort: recipe.startPort,
295
+ smokeKind: recipe.smokeKind,
296
+ smokeTarget: recipe.smokeTarget,
297
+ evidence: recipe.evidence,
298
+ notes: recipe.notes,
299
+ },
300
+ }, null, 2);
301
+ return [
302
+ "Verify this project locally. Follow these steps in order using the `task` tool:",
303
+ "",
304
+ "Step 1: Run the `verify-manifest` sub-agent to create or update `.muonroi-cli/environment.json`.",
305
+ "- agent: verify-manifest",
306
+ '- description: "Create verify manifest"',
307
+ "- Include this draft manifest JSON directly in the prompt so the sub-agent can refine and write it quickly:",
308
+ "",
309
+ "```json",
310
+ draftJson,
311
+ "```",
312
+ "",
313
+ "- Tell the sub-agent: Review this draft recipe against package.json and key config files. Adjust if needed, then write .muonroi-cli/environment.json. If the draft looks correct, write it as-is. Do not over-research.",
314
+ "- IMPORTANT: The Shuru sandbox is Debian 13 trixie on aarch64 (ARM64) with NOTHING pre-installed. bootstrapCommands MUST install every runtime from scratch (e.g. nodejs, npm, python3, go, cargo).",
315
+ "",
316
+ "Step 2: After the manifest is written, run the `verify` sub-agent.",
317
+ "- agent: verify",
318
+ '- description: "Run local verification"',
319
+ "- Tell it to use `.muonroi-cli/environment.json` as the source of truth.",
320
+ "- Include these execution instructions:",
321
+ " - Runs inside a Shuru sandbox (Debian 13 trixie, aarch64/ARM64) with full network access.",
322
+ " - The sandbox has NOTHING pre-installed unless bootstrapCommands in the manifest already ran during checkpoint creation.",
323
+ " - Ephemeral installs allowed.",
324
+ " - Probe for runtimes first (`command -v node`, etc), only install what is missing.",
325
+ " - agent-browser runs on the HOST, not the sandbox. It WILL work.",
326
+ " - If recipe has startCommand + startPort, start app in background and run browser smoke tests.",
327
+ " - Use `agent-browser record start .muonroi-cli/verify-artifacts/verify-smoke.webm` before opening the page.",
328
+ " - Use `agent-browser --screenshot-dir .muonroi-cli/verify-artifacts screenshot` after the page loads.",
329
+ " - CRITICAL: Stop the recording (`agent-browser record stop`) and close the browser (`agent-browser close`) BEFORE stopping the dev server. The server must stay alive until all browser commands finish.",
330
+ " - Return a concise report: Summary, Results, Evidence (mandatory), Blockers, Residual Risk.",
331
+ "",
332
+ "Important:",
333
+ "- Do NOT perform verification work yourself. Delegate each step via `task`.",
334
+ "- Run step 1 first, then step 2.",
335
+ "- After step 2, relay the verification report to the user.",
336
+ ].join("\n");
337
+ }
338
+ export const VERIFY_PROMPT = "__DYNAMIC__";
339
+ export function getVerifyCliError(options) {
340
+ if (options.hasPrompt) {
341
+ return "Cannot combine --verify with --prompt.";
342
+ }
343
+ if (options.hasMessageArgs) {
344
+ return "Cannot combine --verify with an opening message.";
345
+ }
346
+ return null;
347
+ }
348
+ export { defaultShellInit, inferVerifyProjectProfile, inferVerifySmokeUrl, normalizeVerifyRecipe, } from "./recipes";
349
+ //# sourceMappingURL=entrypoint.js.map
@@ -0,0 +1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C;IAED,IAAI,OAAO,CAAC,cAAc,EAAE,CAAC;QAC3B,OAAO,kDAAkD,CAAC;IAC5D,CAAC;IAED,OAAO,IAAI,CAAC;AACd,CAAC;AAED,OAAO,EACL,gBAAgB,EAChB,yBAAyB,EACzB,mBAAmB,EACnB,qBAAqB,GAEtB,MAAM,WAAW,CAAC"}
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,233 @@
1
+ import fs from "node:fs";
2
+ import os from "node:os";
3
+ import path from "node:path";
4
+ import { afterEach, describe, expect, it } from "vitest";
5
+ import { buildVerifyDetectPrompt, buildVerifyPrompt, buildVerifyTaskPrompt, createVerifyRuntimeConfig, getVerifyCliError, inferVerifyProjectProfile, inferVerifySmokeUrl, } from "./entrypoint";
6
+ const tempDirs = [];
7
+ function makeTempDir(prefix) {
8
+ const dir = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
9
+ tempDirs.push(dir);
10
+ return dir;
11
+ }
12
+ afterEach(() => {
13
+ for (const dir of tempDirs.splice(0)) {
14
+ fs.rmSync(dir, { recursive: true, force: true });
15
+ }
16
+ });
17
+ describe("verify entrypoint helpers", () => {
18
+ it("infers a localhost smoke URL from a single forwarded port", () => {
19
+ expect(inferVerifySmokeUrl({ ports: ["3000:3000"] })).toBe("http://127.0.0.1:3000");
20
+ });
21
+ it("does not infer a smoke URL when multiple ports are configured", () => {
22
+ expect(inferVerifySmokeUrl({ ports: ["3000:3000", "4173:4173"] })).toBeNull();
23
+ });
24
+ it("detects a nextjs app and infers a default port", () => {
25
+ const dir = makeTempDir("muonroi-verify-next-");
26
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({
27
+ dependencies: { next: "15.0.0", react: "19.0.0" },
28
+ scripts: { dev: "next dev", build: "next build", lint: "next lint" },
29
+ }, null, 2));
30
+ fs.writeFileSync(path.join(dir, "package-lock.json"), "");
31
+ const profile = inferVerifyProjectProfile(dir);
32
+ expect(profile.appKind).toBe("nextjs");
33
+ expect(profile.packageManager).toBe("npm");
34
+ expect(profile.sandboxSettings.ports).toEqual(["3000:3000"]);
35
+ expect(profile.availableScripts).toEqual(["dev", "build", "lint"]);
36
+ expect(profile.recipe.bootstrapCommands).toEqual([
37
+ "apt-get update && apt-get install -y curl unzip ca-certificates git python3 make g++ pkg-config nodejs npm",
38
+ ]);
39
+ expect(profile.recipe.shellInitCommands).toEqual(["export DEBIAN_FRONTEND=noninteractive"]);
40
+ expect(profile.recipe.startCommand).toBe("npm run dev");
41
+ expect(profile.recipe.testCommands).toContain("npm run lint");
42
+ });
43
+ it("detects bun as package manager and bootstraps bun plus node tooling for web apps", () => {
44
+ const dir = makeTempDir("muonroi-verify-bun-");
45
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ dependencies: { next: "15.0.0" }, scripts: { dev: "next dev" } }, null, 2));
46
+ fs.writeFileSync(path.join(dir, "bun.lock"), "");
47
+ const profile = inferVerifyProjectProfile(dir);
48
+ expect(profile.packageManager).toBe("bun");
49
+ expect(profile.recipe.bootstrapCommands).toEqual([
50
+ "apt-get update && apt-get install -y curl unzip ca-certificates git python3 make g++ pkg-config nodejs npm",
51
+ "curl -fsSL https://bun.sh/install | bash",
52
+ ]);
53
+ expect(profile.recipe.shellInitCommands).toEqual([
54
+ "export DEBIAN_FRONTEND=noninteractive",
55
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: shell variable in test assertion
56
+ 'export BUN_INSTALL="${HOME}/.bun"',
57
+ // biome-ignore lint/suspicious/noTemplateCurlyInString: shell variable in test assertion
58
+ 'export PATH="${BUN_INSTALL}/bin:$PATH"',
59
+ ]);
60
+ expect(profile.recipe.installCommands).toContain("bun install");
61
+ });
62
+ it("enables ephemeral installs in the verify runtime config", () => {
63
+ const dir = makeTempDir("muonroi-verify-runtime-");
64
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { test: "vitest run" } }, null, 2));
65
+ const runtime = createVerifyRuntimeConfig(dir);
66
+ expect(runtime.sandboxMode).toBe("shuru");
67
+ expect(runtime.sandboxSettings.allowEphemeralInstall).toBe(true);
68
+ expect(runtime.sandboxSettings.allowNet).toBe(true);
69
+ });
70
+ it("forces full network in verify mode and ignores inherited allowlists", () => {
71
+ const dir = makeTempDir("muonroi-verify-network-");
72
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { dev: "next dev" } }, null, 2));
73
+ const runtime = createVerifyRuntimeConfig(dir, {
74
+ allowNet: false,
75
+ allowedHosts: ["registry.npmjs.org"],
76
+ ports: ["3000:3000"],
77
+ });
78
+ expect(runtime.sandboxSettings.allowNet).toBe(true);
79
+ expect(runtime.sandboxSettings.allowedHosts).toBeUndefined();
80
+ expect(runtime.sandboxSettings.ports).toEqual(["3000:3000"]);
81
+ });
82
+ it("preserves explicit sandbox ports over inferred defaults", () => {
83
+ const dir = makeTempDir("muonroi-verify-override-");
84
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ dependencies: { next: "15.0.0" } }, null, 2));
85
+ const profile = inferVerifyProjectProfile(dir, { ports: ["4444:4444"], from: "web-env" });
86
+ expect(profile.sandboxSettings.ports).toEqual(["4444:4444"]);
87
+ expect(profile.sandboxSettings.from).toBe("web-env");
88
+ });
89
+ it("uses an override recipe as the primary source of truth", () => {
90
+ const dir = makeTempDir("muonroi-verify-override-recipe-");
91
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ dependencies: { next: "15.0.0" } }, null, 2));
92
+ const overrideRecipe = {
93
+ ecosystem: "custom",
94
+ appKind: "node",
95
+ appLabel: "Custom app",
96
+ shellInitCommands: ["export FOO=bar"],
97
+ bootstrapCommands: ["echo bootstrap"],
98
+ installCommands: ["echo install"],
99
+ buildCommands: ["echo build"],
100
+ testCommands: ["echo test"],
101
+ startCommand: "echo start",
102
+ startPort: "9999",
103
+ smokeKind: "http",
104
+ smokeTarget: "http://127.0.0.1:9999",
105
+ evidence: ["custom detector"],
106
+ notes: ["override"],
107
+ };
108
+ const profile = inferVerifyProjectProfile(dir, {}, overrideRecipe);
109
+ expect(profile.recipe.ecosystem).toBe("custom");
110
+ expect(profile.appLabel).toBe("Custom app");
111
+ expect(profile.sandboxSettings.ports).toEqual(["9999:9999"]);
112
+ });
113
+ it("builds a generic python recipe", () => {
114
+ const dir = makeTempDir("muonroi-verify-python-");
115
+ fs.writeFileSync(path.join(dir, "pyproject.toml"), "[project]\nname = 'demo'\n");
116
+ fs.mkdirSync(path.join(dir, "tests"));
117
+ const profile = inferVerifyProjectProfile(dir);
118
+ expect(profile.recipe.ecosystem).toBe("python");
119
+ expect(profile.recipe.installCommands[0]).toContain("pip");
120
+ expect(profile.recipe.testCommands[0]).toBe("pytest");
121
+ expect(profile.recipe.smokeKind).toBe("none");
122
+ });
123
+ it("builds a go recipe from go.mod", () => {
124
+ const dir = makeTempDir("muonroi-verify-go-");
125
+ fs.writeFileSync(path.join(dir, "go.mod"), "module example.com/demo\n");
126
+ fs.writeFileSync(path.join(dir, "main.go"), "package main\nfunc main() {}\n");
127
+ const profile = inferVerifyProjectProfile(dir);
128
+ expect(profile.recipe.ecosystem).toBe("go");
129
+ expect(profile.recipe.buildCommands).toEqual(["go build ./..."]);
130
+ expect(profile.recipe.testCommands).toEqual(["go test ./..."]);
131
+ expect(profile.recipe.startCommand).toBe("go run .");
132
+ });
133
+ it("builds a task prompt with detected project context and browser guidance", () => {
134
+ const dir = makeTempDir("muonroi-verify-prompt-");
135
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({
136
+ dependencies: { next: "15.0.0" },
137
+ scripts: { dev: "next dev", build: "next build" },
138
+ }, null, 2));
139
+ const prompt = buildVerifyTaskPrompt(dir, {
140
+ from: "web-env",
141
+ allowNet: true,
142
+ allowedHosts: ["registry.npmjs.org"],
143
+ });
144
+ expect(prompt).toContain("Detected app type: Next.js.");
145
+ expect(prompt).toContain("Recipe ecosystem: node.");
146
+ expect(prompt).toContain("web-env");
147
+ expect(prompt).toContain("registry.npmjs.org");
148
+ expect(prompt).toContain("http://127.0.0.1:3000");
149
+ expect(prompt).toContain("Available package.json scripts: dev, build.");
150
+ expect(prompt).toContain("Bootstrap commands:");
151
+ expect(prompt).toContain("Install commands:");
152
+ expect(prompt).toContain("MUST run browser smoke tests");
153
+ expect(prompt).toContain("record start");
154
+ expect(prompt).toContain("record stop");
155
+ expect(prompt).toContain("Results");
156
+ expect(prompt).toContain("Evidence");
157
+ expect(prompt).toContain("Blockers");
158
+ expect(prompt).toContain("Ephemeral installs are allowed");
159
+ expect(prompt).toContain("Probe the sandbox for runtimes");
160
+ expect(prompt).toContain("Only install what is missing");
161
+ expect(prompt).toContain("MANDATORY workflow");
162
+ expect(prompt).toContain("Phase 4");
163
+ expect(prompt).toContain("QA tester");
164
+ expect(prompt).toContain(".muonroi-cli/verify-artifacts");
165
+ expect(prompt).toContain("Keep the report compact");
166
+ expect(prompt).toContain("Evidence is mandatory even on failure");
167
+ });
168
+ it("builds a detector prompt that requests JSON output", () => {
169
+ const dir = makeTempDir("muonroi-verify-detect-");
170
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { dev: "next dev" } }, null, 2));
171
+ const prompt = buildVerifyDetectPrompt(dir);
172
+ expect(prompt).toContain("Return ONLY valid JSON");
173
+ expect(prompt).toContain('"bootstrapCommands": string[]');
174
+ expect(prompt).toContain("Fallback hints from static detection");
175
+ expect(prompt).toContain("probes for runtimes/tools first");
176
+ });
177
+ it("explains ambiguous browser setup when multiple ports exist", () => {
178
+ const dir = makeTempDir("muonroi-verify-ambiguous-");
179
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ scripts: { dev: "node server.js" } }, null, 2));
180
+ const prompt = buildVerifyTaskPrompt(dir, { ports: ["3000:3000", "8080:8080"] });
181
+ expect(prompt).toContain("Multiple forwarded ports are configured");
182
+ expect(prompt).toContain("Skip browser checks unless the user clearly identifies");
183
+ });
184
+ it("buildVerifyPrompt drives both sub-agents with a draft recipe", () => {
185
+ const dir = makeTempDir("muonroi-verify-prompt-dynamic-");
186
+ fs.writeFileSync(path.join(dir, "package.json"), JSON.stringify({ dependencies: { next: "15.0.0" }, scripts: { dev: "next dev", build: "next build" } }, null, 2));
187
+ fs.writeFileSync(path.join(dir, "package-lock.json"), "");
188
+ const prompt = buildVerifyPrompt(dir);
189
+ expect(prompt).toContain("verify-manifest");
190
+ expect(prompt).toContain("Step 1");
191
+ expect(prompt).toContain("Step 2");
192
+ expect(prompt).toContain("task");
193
+ expect(prompt).toContain(".muonroi-cli/environment.json");
194
+ expect(prompt).toContain('"ecosystem"');
195
+ expect(prompt).toContain('"bootstrapCommands"');
196
+ expect(prompt).toContain("apt-get");
197
+ expect(prompt).toContain("nodejs npm");
198
+ });
199
+ it("uses an override recipe when creating the runtime config", () => {
200
+ const dir = makeTempDir("muonroi-verify-runtime-override-");
201
+ const overrideRecipe = {
202
+ ecosystem: "custom",
203
+ appKind: "node",
204
+ appLabel: "Custom app",
205
+ shellInitCommands: ["export FOO=bar"],
206
+ bootstrapCommands: [],
207
+ installCommands: [],
208
+ buildCommands: [],
209
+ testCommands: [],
210
+ startCommand: undefined,
211
+ startPort: undefined,
212
+ smokeKind: "none",
213
+ evidence: ["custom detector"],
214
+ notes: [],
215
+ };
216
+ const runtime = createVerifyRuntimeConfig(dir, {}, overrideRecipe);
217
+ expect(runtime.profile.recipe.ecosystem).toBe("custom");
218
+ expect(runtime.sandboxSettings.shellInit).toEqual(["export FOO=bar"]);
219
+ });
220
+ it("adds notes for unknown projects instead of pretending it knows the recipe", () => {
221
+ const dir = makeTempDir("muonroi-verify-unknown-");
222
+ const profile = inferVerifyProjectProfile(dir);
223
+ const recipe = profile.recipe;
224
+ expect(recipe.appKind).toBe("unknown");
225
+ expect(recipe.notes[0]).toContain("inspect the repo directly");
226
+ });
227
+ it("validates CLI conflicts", () => {
228
+ expect(getVerifyCliError({})).toBeNull();
229
+ expect(getVerifyCliError({ hasPrompt: true })).toBe("Cannot combine --verify with --prompt.");
230
+ expect(getVerifyCliError({ hasMessageArgs: true })).toBe("Cannot combine --verify with an opening message.");
231
+ });
232
+ });
233
+ //# sourceMappingURL=entrypoint.test.js.map