muonroi-cli 1.8.0 → 1.8.3

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 (975) hide show
  1. package/dist/src/agent-harness/mock-model.js +112 -4
  2. package/dist/src/cli/cost-forensics.js +7 -4
  3. package/dist/src/flow/compaction/index.d.ts +1 -0
  4. package/dist/src/flow/compaction/index.js +4 -0
  5. package/dist/src/generated/version.d.ts +1 -1
  6. package/dist/src/generated/version.js +1 -1
  7. package/dist/src/index.js +4 -2
  8. package/dist/src/lsp/manager.js +11 -3
  9. package/dist/src/mcp/auto-setup.js +0 -8
  10. package/dist/src/mcp/self-verify-jobs.d.ts +1 -0
  11. package/dist/src/mcp/self-verify-runner.js +1 -1
  12. package/dist/src/mcp/setup-guide-text.d.ts +1 -1
  13. package/dist/src/mcp/setup-guide-text.js +3 -1
  14. package/dist/src/orchestrator/auto-commit.js +9 -7
  15. package/dist/src/orchestrator/message-processor.d.ts +2 -0
  16. package/dist/src/orchestrator/message-processor.js +7 -0
  17. package/dist/src/orchestrator/orchestrator.d.ts +3 -0
  18. package/dist/src/orchestrator/orchestrator.js +371 -28
  19. package/dist/src/orchestrator/pending-calls.js +2 -1
  20. package/dist/src/orchestrator/preprocessor.js +3 -2
  21. package/dist/src/orchestrator/prompts.d.ts +8 -0
  22. package/dist/src/orchestrator/prompts.js +224 -177
  23. package/dist/src/orchestrator/sub-agent-cap.d.ts +2 -0
  24. package/dist/src/orchestrator/sub-agent-cap.js +12 -4
  25. package/dist/src/orchestrator/subagent-compactor.d.ts +7 -0
  26. package/dist/src/orchestrator/subagent-compactor.js +65 -14
  27. package/dist/src/orchestrator/tool-engine.d.ts +2 -0
  28. package/dist/src/orchestrator/tool-engine.js +80 -21
  29. package/dist/src/orchestrator/turn-runner-deps.d.ts +2 -0
  30. package/dist/src/pil/llm-classify.d.ts +11 -0
  31. package/dist/src/pil/llm-classify.js +193 -0
  32. package/dist/src/self-qa/agentic-loop.js +30 -21
  33. package/dist/src/storage/index.d.ts +1 -1
  34. package/dist/src/storage/index.js +1 -1
  35. package/dist/src/storage/migrations.js +13 -1
  36. package/dist/src/storage/transcript.d.ts +2 -0
  37. package/dist/src/storage/transcript.js +304 -178
  38. package/dist/src/storage/usage.js +22 -5
  39. package/dist/src/tools/native-tools.js +10 -1
  40. package/dist/src/tools/registry.d.ts +1 -0
  41. package/dist/src/tools/registry.js +30 -2
  42. package/dist/src/types/index.d.ts +1 -1
  43. package/dist/src/ui/app.js +0 -0
  44. package/dist/src/ui/slash/expand.js +14 -1
  45. package/dist/src/ui/use-app-logic.js +0 -0
  46. package/dist/src/utils/install-manager.d.ts +2 -0
  47. package/dist/src/utils/install-manager.js +105 -7
  48. package/dist/src/utils/logger.d.ts +28 -0
  49. package/dist/src/utils/logger.js +171 -0
  50. package/dist/src/utils/settings.d.ts +9 -1
  51. package/dist/src/utils/settings.js +59 -22
  52. package/dist/src/utils/update-checker.js +12 -2
  53. package/package.json +8 -1
  54. package/dist/src/__test-helpers__/catalog-fixtures.d.ts +0 -22
  55. package/dist/src/__test-helpers__/catalog-fixtures.js +0 -55
  56. package/dist/src/__test-stubs__/ee-server.d.ts +0 -27
  57. package/dist/src/__test-stubs__/ee-server.js +0 -138
  58. package/dist/src/__test-stubs__/vitest-setup.d.ts +0 -1
  59. package/dist/src/__test-stubs__/vitest-setup.js +0 -38
  60. package/dist/src/__tests__/council/bubble-layout.test.d.ts +0 -1
  61. package/dist/src/__tests__/council/bubble-layout.test.js +0 -39
  62. package/dist/src/__tests__/council/code-block-truncate.test.d.ts +0 -1
  63. package/dist/src/__tests__/council/code-block-truncate.test.js +0 -45
  64. package/dist/src/__tests__/council/role-palette.test.d.ts +0 -1
  65. package/dist/src/__tests__/council/role-palette.test.js +0 -59
  66. package/dist/src/__tests__/first-run-wizard.test.d.ts +0 -1
  67. package/dist/src/__tests__/first-run-wizard.test.js +0 -9
  68. package/dist/src/agent-harness/__tests__/cli-flags.spec.d.ts +0 -1
  69. package/dist/src/agent-harness/__tests__/cli-flags.spec.js +0 -33
  70. package/dist/src/agent-harness/__tests__/driver.spec.d.ts +0 -1
  71. package/dist/src/agent-harness/__tests__/driver.spec.js +0 -141
  72. package/dist/src/agent-harness/__tests__/idle.spec.d.ts +0 -1
  73. package/dist/src/agent-harness/__tests__/idle.spec.js +0 -84
  74. package/dist/src/agent-harness/__tests__/mock-llm.spec.d.ts +0 -1
  75. package/dist/src/agent-harness/__tests__/mock-llm.spec.js +0 -91
  76. package/dist/src/agent-harness/__tests__/mock-model.spec.d.ts +0 -5
  77. package/dist/src/agent-harness/__tests__/mock-model.spec.js +0 -270
  78. package/dist/src/agent-harness/__tests__/predicate.spec.d.ts +0 -1
  79. package/dist/src/agent-harness/__tests__/predicate.spec.js +0 -27
  80. package/dist/src/agent-harness/__tests__/protocol.spec.d.ts +0 -1
  81. package/dist/src/agent-harness/__tests__/protocol.spec.js +0 -56
  82. package/dist/src/agent-harness/__tests__/schema.spec.d.ts +0 -1
  83. package/dist/src/agent-harness/__tests__/schema.spec.js +0 -76
  84. package/dist/src/agent-harness/__tests__/selector.spec.d.ts +0 -1
  85. package/dist/src/agent-harness/__tests__/selector.spec.js +0 -70
  86. package/dist/src/agent-harness/__tests__/sidechannel.spec.d.ts +0 -1
  87. package/dist/src/agent-harness/__tests__/sidechannel.spec.js +0 -29
  88. package/dist/src/agent-harness/__tests__/spec-helpers.spec.d.ts +0 -1
  89. package/dist/src/agent-harness/__tests__/spec-helpers.spec.js +0 -68
  90. package/dist/src/chat/__tests__/broadcast-bus.test.d.ts +0 -1
  91. package/dist/src/chat/__tests__/broadcast-bus.test.js +0 -81
  92. package/dist/src/chat/__tests__/channel-manager.test.d.ts +0 -1
  93. package/dist/src/chat/__tests__/channel-manager.test.js +0 -133
  94. package/dist/src/chat/__tests__/client.test.d.ts +0 -1
  95. package/dist/src/chat/__tests__/client.test.js +0 -109
  96. package/dist/src/chat/__tests__/discord-integration.test.d.ts +0 -1
  97. package/dist/src/chat/__tests__/discord-integration.test.js +0 -153
  98. package/dist/src/chat/__tests__/intent-prompt.test.d.ts +0 -1
  99. package/dist/src/chat/__tests__/intent-prompt.test.js +0 -80
  100. package/dist/src/chat/__tests__/verdict-resolver.test.d.ts +0 -1
  101. package/dist/src/chat/__tests__/verdict-resolver.test.js +0 -308
  102. package/dist/src/cli/__tests__/bw-vault.test.d.ts +0 -1
  103. package/dist/src/cli/__tests__/bw-vault.test.js +0 -87
  104. package/dist/src/cli/__tests__/keys-bundle.test.d.ts +0 -1
  105. package/dist/src/cli/__tests__/keys-bundle.test.js +0 -40
  106. package/dist/src/cli/__tests__/share-cmd.test.d.ts +0 -1
  107. package/dist/src/cli/__tests__/share-cmd.test.js +0 -175
  108. package/dist/src/cli/config/__tests__/model-picker.test.d.ts +0 -1
  109. package/dist/src/cli/config/__tests__/model-picker.test.js +0 -56
  110. package/dist/src/cli/config/__tests__/provider-fetch.test.d.ts +0 -1
  111. package/dist/src/cli/config/__tests__/provider-fetch.test.js +0 -38
  112. package/dist/src/cli/cost-forensics.test.d.ts +0 -1
  113. package/dist/src/cli/cost-forensics.test.js +0 -223
  114. package/dist/src/cli/experience-report.test.d.ts +0 -5
  115. package/dist/src/cli/experience-report.test.js +0 -63
  116. package/dist/src/cli/keys.test.d.ts +0 -1
  117. package/dist/src/cli/keys.test.js +0 -86
  118. package/dist/src/council/__tests__/abort-threading.test.d.ts +0 -1
  119. package/dist/src/council/__tests__/abort-threading.test.js +0 -193
  120. package/dist/src/council/__tests__/accounting.test.d.ts +0 -1
  121. package/dist/src/council/__tests__/accounting.test.js +0 -66
  122. package/dist/src/council/__tests__/audit-replay.test.d.ts +0 -1
  123. package/dist/src/council/__tests__/audit-replay.test.js +0 -241
  124. package/dist/src/council/__tests__/clarification-prompt.test.d.ts +0 -1
  125. package/dist/src/council/__tests__/clarification-prompt.test.js +0 -71
  126. package/dist/src/council/__tests__/clarifier-max-rounds.test.d.ts +0 -1
  127. package/dist/src/council/__tests__/clarifier-max-rounds.test.js +0 -46
  128. package/dist/src/council/__tests__/clarifier-options.test.d.ts +0 -1
  129. package/dist/src/council/__tests__/clarifier-options.test.js +0 -54
  130. package/dist/src/council/__tests__/clarifier-ready-gate.test.d.ts +0 -1
  131. package/dist/src/council/__tests__/clarifier-ready-gate.test.js +0 -265
  132. package/dist/src/council/__tests__/cost-aware.test.d.ts +0 -1
  133. package/dist/src/council/__tests__/cost-aware.test.js +0 -49
  134. package/dist/src/council/__tests__/council-turn-length-emit.test.d.ts +0 -1
  135. package/dist/src/council/__tests__/council-turn-length-emit.test.js +0 -130
  136. package/dist/src/council/__tests__/debate-planner-structured.test.d.ts +0 -1
  137. package/dist/src/council/__tests__/debate-planner-structured.test.js +0 -209
  138. package/dist/src/council/__tests__/debate-round-budget.test.d.ts +0 -1
  139. package/dist/src/council/__tests__/debate-round-budget.test.js +0 -45
  140. package/dist/src/council/__tests__/decisions-lock.test.d.ts +0 -6
  141. package/dist/src/council/__tests__/decisions-lock.test.js +0 -352
  142. package/dist/src/council/__tests__/evaluator-metrics.test.d.ts +0 -1
  143. package/dist/src/council/__tests__/evaluator-metrics.test.js +0 -463
  144. package/dist/src/council/__tests__/oauth-reachable.test.d.ts +0 -1
  145. package/dist/src/council/__tests__/oauth-reachable.test.js +0 -31
  146. package/dist/src/council/__tests__/parse-outcome-fallback.test.d.ts +0 -1
  147. package/dist/src/council/__tests__/parse-outcome-fallback.test.js +0 -114
  148. package/dist/src/council/__tests__/post-debate-recommendation.test.d.ts +0 -1
  149. package/dist/src/council/__tests__/post-debate-recommendation.test.js +0 -58
  150. package/dist/src/council/__tests__/research-tools.test.d.ts +0 -1
  151. package/dist/src/council/__tests__/research-tools.test.js +0 -214
  152. package/dist/src/council/__tests__/round-tools.test.d.ts +0 -1
  153. package/dist/src/council/__tests__/round-tools.test.js +0 -306
  154. package/dist/src/council/__tests__/tool-trace.test.d.ts +0 -1
  155. package/dist/src/council/__tests__/tool-trace.test.js +0 -131
  156. package/dist/src/council/__tests__/types-contract.test.d.ts +0 -9
  157. package/dist/src/council/__tests__/types-contract.test.js +0 -82
  158. package/dist/src/council/clarifier-question-cap.test.d.ts +0 -12
  159. package/dist/src/council/clarifier-question-cap.test.js +0 -73
  160. package/dist/src/daemon/scheduler.test.d.ts +0 -1
  161. package/dist/src/daemon/scheduler.test.js +0 -103
  162. package/dist/src/ee/__tests__/bb-design.test.d.ts +0 -14
  163. package/dist/src/ee/__tests__/bb-design.test.js +0 -180
  164. package/dist/src/ee/__tests__/ee-onboarding.test.d.ts +0 -1
  165. package/dist/src/ee/__tests__/ee-onboarding.test.js +0 -32
  166. package/dist/src/ee/__tests__/export-transcripts.test.d.ts +0 -11
  167. package/dist/src/ee/__tests__/export-transcripts.test.js +0 -200
  168. package/dist/src/ee/__tests__/pil-context-bridge.test.d.ts +0 -1
  169. package/dist/src/ee/__tests__/pil-context-bridge.test.js +0 -54
  170. package/dist/src/ee/__tests__/pipeline.integration.test.d.ts +0 -14
  171. package/dist/src/ee/__tests__/pipeline.integration.test.js +0 -151
  172. package/dist/src/ee/__tests__/recall-format.test.d.ts +0 -10
  173. package/dist/src/ee/__tests__/recall-format.test.js +0 -57
  174. package/dist/src/ee/__tests__/recall-ledger.test.d.ts +0 -1
  175. package/dist/src/ee/__tests__/recall-ledger.test.js +0 -45
  176. package/dist/src/ee/__tests__/render-sink-wiring.test.d.ts +0 -1
  177. package/dist/src/ee/__tests__/render-sink-wiring.test.js +0 -74
  178. package/dist/src/ee/artifact-cache.test.d.ts +0 -1
  179. package/dist/src/ee/artifact-cache.test.js +0 -69
  180. package/dist/src/ee/auth.test.d.ts +0 -1
  181. package/dist/src/ee/auth.test.js +0 -59
  182. package/dist/src/ee/bridge.test.d.ts +0 -1
  183. package/dist/src/ee/bridge.test.js +0 -230
  184. package/dist/src/ee/client.test.d.ts +0 -1
  185. package/dist/src/ee/client.test.js +0 -181
  186. package/dist/src/ee/extract-session.test.d.ts +0 -1
  187. package/dist/src/ee/extract-session.test.js +0 -192
  188. package/dist/src/ee/intercept.test.d.ts +0 -1
  189. package/dist/src/ee/intercept.test.js +0 -171
  190. package/dist/src/ee/judge.test.d.ts +0 -1
  191. package/dist/src/ee/judge.test.js +0 -190
  192. package/dist/src/ee/mistake-detector.test.d.ts +0 -1
  193. package/dist/src/ee/mistake-detector.test.js +0 -221
  194. package/dist/src/ee/offline-queue.test.d.ts +0 -1
  195. package/dist/src/ee/offline-queue.test.js +0 -246
  196. package/dist/src/ee/phase-outcome.test.d.ts +0 -1
  197. package/dist/src/ee/phase-outcome.test.js +0 -94
  198. package/dist/src/ee/phase-tracker.test.d.ts +0 -1
  199. package/dist/src/ee/phase-tracker.test.js +0 -142
  200. package/dist/src/ee/posttool.test.d.ts +0 -1
  201. package/dist/src/ee/posttool.test.js +0 -70
  202. package/dist/src/ee/prompt-stale.test.d.ts +0 -8
  203. package/dist/src/ee/prompt-stale.test.js +0 -76
  204. package/dist/src/ee/recall-mirror.test.d.ts +0 -1
  205. package/dist/src/ee/recall-mirror.test.js +0 -65
  206. package/dist/src/ee/render.test.d.ts +0 -1
  207. package/dist/src/ee/render.test.js +0 -63
  208. package/dist/src/ee/scope.test.d.ts +0 -1
  209. package/dist/src/ee/scope.test.js +0 -97
  210. package/dist/src/ee/search.test.d.ts +0 -1
  211. package/dist/src/ee/search.test.js +0 -23
  212. package/dist/src/ee/session-trajectory.test.d.ts +0 -1
  213. package/dist/src/ee/session-trajectory.test.js +0 -120
  214. package/dist/src/ee/touch.test.d.ts +0 -1
  215. package/dist/src/ee/touch.test.js +0 -62
  216. package/dist/src/ee/who-am-i.test.d.ts +0 -1
  217. package/dist/src/ee/who-am-i.test.js +0 -101
  218. package/dist/src/flow/__tests__/migration.test.d.ts +0 -1
  219. package/dist/src/flow/__tests__/migration.test.js +0 -105
  220. package/dist/src/flow/__tests__/parser.test.d.ts +0 -1
  221. package/dist/src/flow/__tests__/parser.test.js +0 -68
  222. package/dist/src/flow/__tests__/run-manager-product.test.d.ts +0 -1
  223. package/dist/src/flow/__tests__/run-manager-product.test.js +0 -49
  224. package/dist/src/flow/__tests__/run-manager.test.d.ts +0 -1
  225. package/dist/src/flow/__tests__/run-manager.test.js +0 -83
  226. package/dist/src/flow/__tests__/scaffold-checkpoint.test.d.ts +0 -1
  227. package/dist/src/flow/__tests__/scaffold-checkpoint.test.js +0 -93
  228. package/dist/src/flow/__tests__/scaffold.test.d.ts +0 -1
  229. package/dist/src/flow/__tests__/scaffold.test.js +0 -47
  230. package/dist/src/flow/__tests__/warning-persist.test.d.ts +0 -5
  231. package/dist/src/flow/__tests__/warning-persist.test.js +0 -96
  232. package/dist/src/flow/compaction/__tests__/compress.test.d.ts +0 -1
  233. package/dist/src/flow/compaction/__tests__/compress.test.js +0 -63
  234. package/dist/src/flow/compaction/__tests__/extract.test.d.ts +0 -1
  235. package/dist/src/flow/compaction/__tests__/extract.test.js +0 -66
  236. package/dist/src/flow/compaction/__tests__/preserve.test.d.ts +0 -1
  237. package/dist/src/flow/compaction/__tests__/preserve.test.js +0 -62
  238. package/dist/src/gsd/__tests__/gray-areas.test.d.ts +0 -1
  239. package/dist/src/gsd/__tests__/gray-areas.test.js +0 -29
  240. package/dist/src/gsd/__tests__/types.test.d.ts +0 -1
  241. package/dist/src/gsd/__tests__/types.test.js +0 -78
  242. package/dist/src/headless/__tests__/council-answers.test.d.ts +0 -1
  243. package/dist/src/headless/__tests__/council-answers.test.js +0 -251
  244. package/dist/src/headless/output.test.d.ts +0 -1
  245. package/dist/src/headless/output.test.js +0 -239
  246. package/dist/src/lsp/builtins.test.d.ts +0 -1
  247. package/dist/src/lsp/builtins.test.js +0 -112
  248. package/dist/src/lsp/client-normalize.test.d.ts +0 -12
  249. package/dist/src/lsp/client-normalize.test.js +0 -34
  250. package/dist/src/lsp/manager.test.d.ts +0 -1
  251. package/dist/src/lsp/manager.test.js +0 -155
  252. package/dist/src/lsp/npm-cache.test.d.ts +0 -1
  253. package/dist/src/lsp/npm-cache.test.js +0 -53
  254. package/dist/src/lsp/smoke.test.d.ts +0 -1
  255. package/dist/src/lsp/smoke.test.js +0 -56
  256. package/dist/src/maintain/__tests__/codebase-intel.test.d.ts +0 -5
  257. package/dist/src/maintain/__tests__/codebase-intel.test.js +0 -237
  258. package/dist/src/maintain/__tests__/gh-create-pr.test.d.ts +0 -11
  259. package/dist/src/maintain/__tests__/gh-create-pr.test.js +0 -160
  260. package/dist/src/maintain/__tests__/pr-builder.test.d.ts +0 -10
  261. package/dist/src/maintain/__tests__/pr-builder.test.js +0 -229
  262. package/dist/src/maintain/__tests__/repo-map.test.d.ts +0 -5
  263. package/dist/src/maintain/__tests__/repo-map.test.js +0 -90
  264. package/dist/src/maintain/__tests__/task-runner.test.d.ts +0 -11
  265. package/dist/src/maintain/__tests__/task-runner.test.js +0 -281
  266. package/dist/src/mcp/__tests__/auto-setup.test.d.ts +0 -1
  267. package/dist/src/mcp/__tests__/auto-setup.test.js +0 -155
  268. package/dist/src/mcp/__tests__/cap-tool-result.test.d.ts +0 -1
  269. package/dist/src/mcp/__tests__/cap-tool-result.test.js +0 -58
  270. package/dist/src/mcp/__tests__/client-pool.spec.d.ts +0 -1
  271. package/dist/src/mcp/__tests__/client-pool.spec.js +0 -169
  272. package/dist/src/mcp/__tests__/ee-tools.test.d.ts +0 -1
  273. package/dist/src/mcp/__tests__/ee-tools.test.js +0 -226
  274. package/dist/src/mcp/__tests__/forensics-tools.test.d.ts +0 -1
  275. package/dist/src/mcp/__tests__/forensics-tools.test.js +0 -54
  276. package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.d.ts +0 -1
  277. package/dist/src/mcp/__tests__/harness-driver-action-tools.spec.js +0 -103
  278. package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.d.ts +0 -1
  279. package/dist/src/mcp/__tests__/harness-driver-async-tools.spec.js +0 -112
  280. package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.d.ts +0 -1
  281. package/dist/src/mcp/__tests__/harness-driver-read-tools.spec.js +0 -124
  282. package/dist/src/mcp/__tests__/harness-driver-security.spec.d.ts +0 -1
  283. package/dist/src/mcp/__tests__/harness-driver-security.spec.js +0 -61
  284. package/dist/src/mcp/__tests__/harness-driver.spec.d.ts +0 -1
  285. package/dist/src/mcp/__tests__/harness-driver.spec.js +0 -20
  286. package/dist/src/mcp/__tests__/lazy-schema.spec.d.ts +0 -1
  287. package/dist/src/mcp/__tests__/lazy-schema.spec.js +0 -152
  288. package/dist/src/mcp/__tests__/lsp-tools.test.d.ts +0 -1
  289. package/dist/src/mcp/__tests__/lsp-tools.test.js +0 -56
  290. package/dist/src/mcp/__tests__/mcp-keychain.test.d.ts +0 -1
  291. package/dist/src/mcp/__tests__/mcp-keychain.test.js +0 -40
  292. package/dist/src/mcp/__tests__/parallel-build.spec.d.ts +0 -1
  293. package/dist/src/mcp/__tests__/parallel-build.spec.js +0 -67
  294. package/dist/src/mcp/__tests__/research-onboarding.test.d.ts +0 -1
  295. package/dist/src/mcp/__tests__/research-onboarding.test.js +0 -148
  296. package/dist/src/mcp/__tests__/runtime-hydration.test.d.ts +0 -1
  297. package/dist/src/mcp/__tests__/runtime-hydration.test.js +0 -78
  298. package/dist/src/mcp/__tests__/runtime-output-cap.test.d.ts +0 -1
  299. package/dist/src/mcp/__tests__/runtime-output-cap.test.js +0 -42
  300. package/dist/src/mcp/__tests__/runtime-sanitize.test.d.ts +0 -1
  301. package/dist/src/mcp/__tests__/runtime-sanitize.test.js +0 -40
  302. package/dist/src/mcp/__tests__/self-verify-jobs.test.d.ts +0 -1
  303. package/dist/src/mcp/__tests__/self-verify-jobs.test.js +0 -92
  304. package/dist/src/mcp/__tests__/smart-filter.test.d.ts +0 -1
  305. package/dist/src/mcp/__tests__/smart-filter.test.js +0 -177
  306. package/dist/src/mcp/__tests__/tools-server.smoke.test.d.ts +0 -1
  307. package/dist/src/mcp/__tests__/tools-server.smoke.test.js +0 -42
  308. package/dist/src/mcp/parse-headers.test.d.ts +0 -1
  309. package/dist/src/mcp/parse-headers.test.js +0 -43
  310. package/dist/src/mcp/smoke.test.d.ts +0 -1
  311. package/dist/src/mcp/smoke.test.js +0 -159
  312. package/dist/src/models/__tests__/registry.test.d.ts +0 -1
  313. package/dist/src/models/__tests__/registry.test.js +0 -74
  314. package/dist/src/models/catalog-gemini.test.d.ts +0 -1
  315. package/dist/src/models/catalog-gemini.test.js +0 -48
  316. package/dist/src/models/catalog-url.test.d.ts +0 -1
  317. package/dist/src/models/catalog-url.test.js +0 -26
  318. package/dist/src/models/catalog-validation.test.d.ts +0 -1
  319. package/dist/src/models/catalog-validation.test.js +0 -63
  320. package/dist/src/ops/__tests__/doctor-council-mcp.test.d.ts +0 -1
  321. package/dist/src/ops/__tests__/doctor-council-mcp.test.js +0 -139
  322. package/dist/src/ops/__tests__/doctor-ee-health.test.d.ts +0 -1
  323. package/dist/src/ops/__tests__/doctor-ee-health.test.js +0 -134
  324. package/dist/src/ops/bug-report.test.d.ts +0 -1
  325. package/dist/src/ops/bug-report.test.js +0 -148
  326. package/dist/src/ops/doctor.test.d.ts +0 -1
  327. package/dist/src/ops/doctor.test.js +0 -97
  328. package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.d.ts +0 -1
  329. package/dist/src/orchestrator/__tests__/agent-base-url-switch.test.js +0 -77
  330. package/dist/src/orchestrator/__tests__/auto-commit.test.d.ts +0 -1
  331. package/dist/src/orchestrator/__tests__/auto-commit.test.js +0 -142
  332. package/dist/src/orchestrator/__tests__/batch-turn-runner.test.d.ts +0 -1
  333. package/dist/src/orchestrator/__tests__/batch-turn-runner.test.js +0 -163
  334. package/dist/src/orchestrator/__tests__/council-manager.test.d.ts +0 -1
  335. package/dist/src/orchestrator/__tests__/council-manager.test.js +0 -148
  336. package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.d.ts +0 -1
  337. package/dist/src/orchestrator/__tests__/cross-turn-dedup.test.js +0 -175
  338. package/dist/src/orchestrator/__tests__/current-call-id.test.d.ts +0 -16
  339. package/dist/src/orchestrator/__tests__/current-call-id.test.js +0 -138
  340. package/dist/src/orchestrator/__tests__/delegations.test.d.ts +0 -1
  341. package/dist/src/orchestrator/__tests__/delegations.test.js +0 -96
  342. package/dist/src/orchestrator/__tests__/error-forensics.test.d.ts +0 -1
  343. package/dist/src/orchestrator/__tests__/error-forensics.test.js +0 -93
  344. package/dist/src/orchestrator/__tests__/flow-resume.test.d.ts +0 -5
  345. package/dist/src/orchestrator/__tests__/flow-resume.test.js +0 -61
  346. package/dist/src/orchestrator/__tests__/humanize-api-error.test.d.ts +0 -1
  347. package/dist/src/orchestrator/__tests__/humanize-api-error.test.js +0 -68
  348. package/dist/src/orchestrator/__tests__/mcp-capability-block.test.d.ts +0 -1
  349. package/dist/src/orchestrator/__tests__/mcp-capability-block.test.js +0 -39
  350. package/dist/src/orchestrator/__tests__/message-processor.test.d.ts +0 -1
  351. package/dist/src/orchestrator/__tests__/message-processor.test.js +0 -188
  352. package/dist/src/orchestrator/__tests__/message-write-ahead.test.d.ts +0 -22
  353. package/dist/src/orchestrator/__tests__/message-write-ahead.test.js +0 -149
  354. package/dist/src/orchestrator/__tests__/project-stack.test.d.ts +0 -1
  355. package/dist/src/orchestrator/__tests__/project-stack.test.js +0 -65
  356. package/dist/src/orchestrator/__tests__/read-path-budget.test.d.ts +0 -1
  357. package/dist/src/orchestrator/__tests__/read-path-budget.test.js +0 -156
  358. package/dist/src/orchestrator/__tests__/retry-classifier.test.d.ts +0 -1
  359. package/dist/src/orchestrator/__tests__/retry-classifier.test.js +0 -112
  360. package/dist/src/orchestrator/__tests__/retry-stream.test.d.ts +0 -1
  361. package/dist/src/orchestrator/__tests__/retry-stream.test.js +0 -151
  362. package/dist/src/orchestrator/__tests__/route-feedback.test.d.ts +0 -1
  363. package/dist/src/orchestrator/__tests__/route-feedback.test.js +0 -47
  364. package/dist/src/orchestrator/__tests__/stream-runner.test.d.ts +0 -1
  365. package/dist/src/orchestrator/__tests__/stream-runner.test.js +0 -202
  366. package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.d.ts +0 -1
  367. package/dist/src/orchestrator/__tests__/sub-agent-model-tier.test.js +0 -45
  368. package/dist/src/orchestrator/__tests__/usage-events-shape.test.d.ts +0 -8
  369. package/dist/src/orchestrator/__tests__/usage-events-shape.test.js +0 -58
  370. package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.d.ts +0 -21
  371. package/dist/src/orchestrator/__tests__/usage-normalizer-c1.test.js +0 -155
  372. package/dist/src/orchestrator/__tests__/usage-shape-threading.test.d.ts +0 -1
  373. package/dist/src/orchestrator/__tests__/usage-shape-threading.test.js +0 -98
  374. package/dist/src/orchestrator/__tests__/write-ahead.test.d.ts +0 -20
  375. package/dist/src/orchestrator/__tests__/write-ahead.test.js +0 -134
  376. package/dist/src/orchestrator/abort.test.d.ts +0 -1
  377. package/dist/src/orchestrator/abort.test.js +0 -34
  378. package/dist/src/orchestrator/agent.test.d.ts +0 -1
  379. package/dist/src/orchestrator/agent.test.js +0 -178
  380. package/dist/src/orchestrator/cleanup.test.d.ts +0 -1
  381. package/dist/src/orchestrator/cleanup.test.js +0 -67
  382. package/dist/src/orchestrator/compaction.test.d.ts +0 -1
  383. package/dist/src/orchestrator/compaction.test.js +0 -187
  384. package/dist/src/orchestrator/delegations.test.d.ts +0 -1
  385. package/dist/src/orchestrator/delegations.test.js +0 -107
  386. package/dist/src/orchestrator/grounding-check.test.d.ts +0 -1
  387. package/dist/src/orchestrator/grounding-check.test.js +0 -94
  388. package/dist/src/orchestrator/interrupted-turn.test.d.ts +0 -1
  389. package/dist/src/orchestrator/interrupted-turn.test.js +0 -34
  390. package/dist/src/orchestrator/message-seq.test.d.ts +0 -1
  391. package/dist/src/orchestrator/message-seq.test.js +0 -24
  392. package/dist/src/orchestrator/pending-calls.test.d.ts +0 -1
  393. package/dist/src/orchestrator/pending-calls.test.js +0 -188
  394. package/dist/src/orchestrator/provider-options-shape.spec.d.ts +0 -1
  395. package/dist/src/orchestrator/provider-options-shape.spec.js +0 -63
  396. package/dist/src/orchestrator/reasoning.test.d.ts +0 -1
  397. package/dist/src/orchestrator/reasoning.test.js +0 -101
  398. package/dist/src/orchestrator/repetition-detector.test.d.ts +0 -1
  399. package/dist/src/orchestrator/repetition-detector.test.js +0 -103
  400. package/dist/src/orchestrator/sandbox.test.d.ts +0 -1
  401. package/dist/src/orchestrator/sandbox.test.js +0 -99
  402. package/dist/src/orchestrator/scope-ceiling.test.d.ts +0 -13
  403. package/dist/src/orchestrator/scope-ceiling.test.js +0 -181
  404. package/dist/src/orchestrator/scope-reminder.test.d.ts +0 -15
  405. package/dist/src/orchestrator/scope-reminder.test.js +0 -225
  406. package/dist/src/orchestrator/session-experience.test.d.ts +0 -6
  407. package/dist/src/orchestrator/session-experience.test.js +0 -72
  408. package/dist/src/orchestrator/stall-rescue.test.d.ts +0 -1
  409. package/dist/src/orchestrator/stall-rescue.test.js +0 -117
  410. package/dist/src/orchestrator/stall-watchdog.test.d.ts +0 -1
  411. package/dist/src/orchestrator/stall-watchdog.test.js +0 -153
  412. package/dist/src/orchestrator/steer-inbox.test.d.ts +0 -1
  413. package/dist/src/orchestrator/steer-inbox.test.js +0 -33
  414. package/dist/src/orchestrator/sub-agent-cap.test.d.ts +0 -1
  415. package/dist/src/orchestrator/sub-agent-cap.test.js +0 -208
  416. package/dist/src/orchestrator/subagent-compactor.spec.d.ts +0 -1
  417. package/dist/src/orchestrator/subagent-compactor.spec.js +0 -520
  418. package/dist/src/orchestrator/text-tool-call-detector.test.d.ts +0 -1
  419. package/dist/src/orchestrator/text-tool-call-detector.test.js +0 -147
  420. package/dist/src/orchestrator/token-counter.test.d.ts +0 -1
  421. package/dist/src/orchestrator/token-counter.test.js +0 -57
  422. package/dist/src/orchestrator/tool-args-hash.test.d.ts +0 -1
  423. package/dist/src/orchestrator/tool-args-hash.test.js +0 -105
  424. package/dist/src/orchestrator/tool-args-repair.test.d.ts +0 -1
  425. package/dist/src/orchestrator/tool-args-repair.test.js +0 -136
  426. package/dist/src/orchestrator/tool-loop-askcard.test.d.ts +0 -1
  427. package/dist/src/orchestrator/tool-loop-askcard.test.js +0 -71
  428. package/dist/src/orchestrator/tool-loop-cap.test.d.ts +0 -1
  429. package/dist/src/orchestrator/tool-loop-cap.test.js +0 -176
  430. package/dist/src/orchestrator/tool-repetition-detector.test.d.ts +0 -1
  431. package/dist/src/orchestrator/tool-repetition-detector.test.js +0 -101
  432. package/dist/src/pil/__tests__/budget.test.d.ts +0 -1
  433. package/dist/src/pil/__tests__/budget.test.js +0 -33
  434. package/dist/src/pil/__tests__/clarity-gate.test.d.ts +0 -1
  435. package/dist/src/pil/__tests__/clarity-gate.test.js +0 -37
  436. package/dist/src/pil/__tests__/config.test.d.ts +0 -1
  437. package/dist/src/pil/__tests__/config.test.js +0 -57
  438. package/dist/src/pil/__tests__/discovery-cache.test.d.ts +0 -1
  439. package/dist/src/pil/__tests__/discovery-cache.test.js +0 -38
  440. package/dist/src/pil/__tests__/discovery-types.test.d.ts +0 -1
  441. package/dist/src/pil/__tests__/discovery-types.test.js +0 -65
  442. package/dist/src/pil/__tests__/discovery.test.d.ts +0 -1
  443. package/dist/src/pil/__tests__/discovery.test.js +0 -178
  444. package/dist/src/pil/__tests__/dual-run.test.d.ts +0 -1
  445. package/dist/src/pil/__tests__/dual-run.test.js +0 -51
  446. package/dist/src/pil/__tests__/layer1-intent-trace.test.d.ts +0 -1
  447. package/dist/src/pil/__tests__/layer1-intent-trace.test.js +0 -138
  448. package/dist/src/pil/__tests__/layer1-intent.test.d.ts +0 -1
  449. package/dist/src/pil/__tests__/layer1-intent.test.js +0 -329
  450. package/dist/src/pil/__tests__/layer15-context-scan.test.d.ts +0 -1
  451. package/dist/src/pil/__tests__/layer15-context-scan.test.js +0 -64
  452. package/dist/src/pil/__tests__/layer16-clarity.test.d.ts +0 -1
  453. package/dist/src/pil/__tests__/layer16-clarity.test.js +0 -72
  454. package/dist/src/pil/__tests__/layer17-feasibility.test.d.ts +0 -1
  455. package/dist/src/pil/__tests__/layer17-feasibility.test.js +0 -36
  456. package/dist/src/pil/__tests__/layer18-acceptance.test.d.ts +0 -1
  457. package/dist/src/pil/__tests__/layer18-acceptance.test.js +0 -18
  458. package/dist/src/pil/__tests__/layer2-personality.test.d.ts +0 -1
  459. package/dist/src/pil/__tests__/layer2-personality.test.js +0 -57
  460. package/dist/src/pil/__tests__/layer2_5-ponytail.test.d.ts +0 -1
  461. package/dist/src/pil/__tests__/layer2_5-ponytail.test.js +0 -53
  462. package/dist/src/pil/__tests__/layer3-ee-injection.test.d.ts +0 -1
  463. package/dist/src/pil/__tests__/layer3-ee-injection.test.js +0 -221
  464. package/dist/src/pil/__tests__/layer3-injected-chunk.test.d.ts +0 -1
  465. package/dist/src/pil/__tests__/layer3-injected-chunk.test.js +0 -134
  466. package/dist/src/pil/__tests__/layer4-gsd.test.d.ts +0 -1
  467. package/dist/src/pil/__tests__/layer4-gsd.test.js +0 -191
  468. package/dist/src/pil/__tests__/layer5-context.test.d.ts +0 -1
  469. package/dist/src/pil/__tests__/layer5-context.test.js +0 -175
  470. package/dist/src/pil/__tests__/layer6-output.test.d.ts +0 -1
  471. package/dist/src/pil/__tests__/layer6-output.test.js +0 -465
  472. package/dist/src/pil/__tests__/llm-classify.test.d.ts +0 -1
  473. package/dist/src/pil/__tests__/llm-classify.test.js +0 -197
  474. package/dist/src/pil/__tests__/native-capabilities-workbook.test.d.ts +0 -1
  475. package/dist/src/pil/__tests__/native-capabilities-workbook.test.js +0 -40
  476. package/dist/src/pil/__tests__/ollama-classify.test.d.ts +0 -1
  477. package/dist/src/pil/__tests__/ollama-classify.test.js +0 -68
  478. package/dist/src/pil/__tests__/orchestrator-integration.test.d.ts +0 -10
  479. package/dist/src/pil/__tests__/orchestrator-integration.test.js +0 -100
  480. package/dist/src/pil/__tests__/pipeline.test.d.ts +0 -1
  481. package/dist/src/pil/__tests__/pipeline.test.js +0 -188
  482. package/dist/src/pil/__tests__/renderer-coverage.test.d.ts +0 -7
  483. package/dist/src/pil/__tests__/renderer-coverage.test.js +0 -42
  484. package/dist/src/pil/__tests__/response-tools.test.d.ts +0 -1
  485. package/dist/src/pil/__tests__/response-tools.test.js +0 -242
  486. package/dist/src/pil/__tests__/schema.test.d.ts +0 -1
  487. package/dist/src/pil/__tests__/schema.test.js +0 -202
  488. package/dist/src/pil/__tests__/scoreComplexity.test.d.ts +0 -1
  489. package/dist/src/pil/__tests__/scoreComplexity.test.js +0 -119
  490. package/dist/src/pil/__tests__/scoreSufficiency.test.d.ts +0 -8
  491. package/dist/src/pil/__tests__/scoreSufficiency.test.js +0 -89
  492. package/dist/src/pil/__tests__/store.test.d.ts +0 -1
  493. package/dist/src/pil/__tests__/store.test.js +0 -44
  494. package/dist/src/pil/__tests__/surface-compaction-artifacts.test.d.ts +0 -1
  495. package/dist/src/pil/__tests__/surface-compaction-artifacts.test.js +0 -112
  496. package/dist/src/pil/__tests__/task-tier-map.test.d.ts +0 -1
  497. package/dist/src/pil/__tests__/task-tier-map.test.js +0 -33
  498. package/dist/src/pil/agent-operating-contract.test.d.ts +0 -1
  499. package/dist/src/pil/agent-operating-contract.test.js +0 -80
  500. package/dist/src/pil/cheap-model-playbook.test.d.ts +0 -1
  501. package/dist/src/pil/cheap-model-playbook.test.js +0 -160
  502. package/dist/src/pil/cheap-model-workbooks.test.d.ts +0 -1
  503. package/dist/src/pil/cheap-model-workbooks.test.js +0 -129
  504. package/dist/src/pil/layer1-intent.test.d.ts +0 -1
  505. package/dist/src/pil/layer1-intent.test.js +0 -764
  506. package/dist/src/pil/layer1_5-complexity-size.test.d.ts +0 -10
  507. package/dist/src/pil/layer1_5-complexity-size.test.js +0 -248
  508. package/dist/src/pil/session-experience-injection.test.d.ts +0 -6
  509. package/dist/src/pil/session-experience-injection.test.js +0 -79
  510. package/dist/src/pil/session-state.test.d.ts +0 -1
  511. package/dist/src/pil/session-state.test.js +0 -73
  512. package/dist/src/playbook/__tests__/directives.test.d.ts +0 -1
  513. package/dist/src/playbook/__tests__/directives.test.js +0 -115
  514. package/dist/src/product-loop/__tests__/artifact-io.test.d.ts +0 -1
  515. package/dist/src/product-loop/__tests__/artifact-io.test.js +0 -83
  516. package/dist/src/product-loop/__tests__/assumption-ledger.test.d.ts +0 -1
  517. package/dist/src/product-loop/__tests__/assumption-ledger.test.js +0 -261
  518. package/dist/src/product-loop/__tests__/backlog-builder.test.d.ts +0 -10
  519. package/dist/src/product-loop/__tests__/backlog-builder.test.js +0 -175
  520. package/dist/src/product-loop/__tests__/backlog-store.test.d.ts +0 -4
  521. package/dist/src/product-loop/__tests__/backlog-store.test.js +0 -96
  522. package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.d.ts +0 -13
  523. package/dist/src/product-loop/__tests__/cb2-retry-bonus.test.js +0 -158
  524. package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.d.ts +0 -1
  525. package/dist/src/product-loop/__tests__/circuit-breakers-coverage.test.js +0 -67
  526. package/dist/src/product-loop/__tests__/circuit-breakers.test.d.ts +0 -1
  527. package/dist/src/product-loop/__tests__/circuit-breakers.test.js +0 -79
  528. package/dist/src/product-loop/__tests__/complexity-routing.spec.d.ts +0 -11
  529. package/dist/src/product-loop/__tests__/complexity-routing.spec.js +0 -240
  530. package/dist/src/product-loop/__tests__/context-policy.test.d.ts +0 -1
  531. package/dist/src/product-loop/__tests__/context-policy.test.js +0 -266
  532. package/dist/src/product-loop/__tests__/cost-preview.test.d.ts +0 -1
  533. package/dist/src/product-loop/__tests__/cost-preview.test.js +0 -111
  534. package/dist/src/product-loop/__tests__/cost-scoper.test.d.ts +0 -1
  535. package/dist/src/product-loop/__tests__/cost-scoper.test.js +0 -50
  536. package/dist/src/product-loop/__tests__/cross-run-memory.test.d.ts +0 -1
  537. package/dist/src/product-loop/__tests__/cross-run-memory.test.js +0 -168
  538. package/dist/src/product-loop/__tests__/design-output.spec.d.ts +0 -1
  539. package/dist/src/product-loop/__tests__/design-output.spec.js +0 -36
  540. package/dist/src/product-loop/__tests__/discover.test.d.ts +0 -1
  541. package/dist/src/product-loop/__tests__/discover.test.js +0 -83
  542. package/dist/src/product-loop/__tests__/discovery-context-format.test.d.ts +0 -13
  543. package/dist/src/product-loop/__tests__/discovery-context-format.test.js +0 -100
  544. package/dist/src/product-loop/__tests__/discovery-council-runner.test.d.ts +0 -1
  545. package/dist/src/product-loop/__tests__/discovery-council-runner.test.js +0 -13
  546. package/dist/src/product-loop/__tests__/discovery-detection.test.d.ts +0 -1
  547. package/dist/src/product-loop/__tests__/discovery-detection.test.js +0 -151
  548. package/dist/src/product-loop/__tests__/discovery-ecosystem.test.d.ts +0 -8
  549. package/dist/src/product-loop/__tests__/discovery-ecosystem.test.js +0 -209
  550. package/dist/src/product-loop/__tests__/discovery-integration.test.d.ts +0 -1
  551. package/dist/src/product-loop/__tests__/discovery-integration.test.js +0 -126
  552. package/dist/src/product-loop/__tests__/discovery-interview.test.d.ts +0 -1
  553. package/dist/src/product-loop/__tests__/discovery-interview.test.js +0 -394
  554. package/dist/src/product-loop/__tests__/discovery-migrations.test.d.ts +0 -1
  555. package/dist/src/product-loop/__tests__/discovery-migrations.test.js +0 -69
  556. package/dist/src/product-loop/__tests__/discovery-persistence.test.d.ts +0 -1
  557. package/dist/src/product-loop/__tests__/discovery-persistence.test.js +0 -146
  558. package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.d.ts +0 -1
  559. package/dist/src/product-loop/__tests__/discovery-prompt-parser.test.js +0 -65
  560. package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.d.ts +0 -1
  561. package/dist/src/product-loop/__tests__/discovery-prompt-specificity.test.js +0 -55
  562. package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.d.ts +0 -9
  563. package/dist/src/product-loop/__tests__/discovery-recommender-ecosystem.test.js +0 -178
  564. package/dist/src/product-loop/__tests__/discovery-recommender.test.d.ts +0 -1
  565. package/dist/src/product-loop/__tests__/discovery-recommender.test.js +0 -316
  566. package/dist/src/product-loop/__tests__/discovery-schema.test.d.ts +0 -1
  567. package/dist/src/product-loop/__tests__/discovery-schema.test.js +0 -77
  568. package/dist/src/product-loop/__tests__/done-gate-coverage.test.d.ts +0 -1
  569. package/dist/src/product-loop/__tests__/done-gate-coverage.test.js +0 -135
  570. package/dist/src/product-loop/__tests__/done-gate.test.d.ts +0 -1
  571. package/dist/src/product-loop/__tests__/done-gate.test.js +0 -122
  572. package/dist/src/product-loop/__tests__/ee-extract-wiring.test.d.ts +0 -8
  573. package/dist/src/product-loop/__tests__/ee-extract-wiring.test.js +0 -186
  574. package/dist/src/product-loop/__tests__/extract-to-ee.test.d.ts +0 -1
  575. package/dist/src/product-loop/__tests__/extract-to-ee.test.js +0 -161
  576. package/dist/src/product-loop/__tests__/feedback-routing.test.d.ts +0 -1
  577. package/dist/src/product-loop/__tests__/feedback-routing.test.js +0 -83
  578. package/dist/src/product-loop/__tests__/gather-selectable-alts.test.d.ts +0 -15
  579. package/dist/src/product-loop/__tests__/gather-selectable-alts.test.js +0 -143
  580. package/dist/src/product-loop/__tests__/hot-path.spec.d.ts +0 -11
  581. package/dist/src/product-loop/__tests__/hot-path.spec.js +0 -146
  582. package/dist/src/product-loop/__tests__/integration.test.d.ts +0 -7
  583. package/dist/src/product-loop/__tests__/integration.test.js +0 -301
  584. package/dist/src/product-loop/__tests__/loop-driver-audit.test.d.ts +0 -1
  585. package/dist/src/product-loop/__tests__/loop-driver-audit.test.js +0 -269
  586. package/dist/src/product-loop/__tests__/loop-driver.test.d.ts +0 -1
  587. package/dist/src/product-loop/__tests__/loop-driver.test.js +0 -225
  588. package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.d.ts +0 -8
  589. package/dist/src/product-loop/__tests__/maintenance-task-synthesis.test.js +0 -67
  590. package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.d.ts +0 -13
  591. package/dist/src/product-loop/__tests__/phase-a1-a3-sprint-runner.test.js +0 -268
  592. package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.d.ts +0 -8
  593. package/dist/src/product-loop/__tests__/phase-a2-backlog-build.test.js +0 -162
  594. package/dist/src/product-loop/__tests__/phase-budget.test.d.ts +0 -1
  595. package/dist/src/product-loop/__tests__/phase-budget.test.js +0 -149
  596. package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.d.ts +0 -1
  597. package/dist/src/product-loop/__tests__/phase-orchestrator-integration.test.js +0 -138
  598. package/dist/src/product-loop/__tests__/phase-plan.test.d.ts +0 -1
  599. package/dist/src/product-loop/__tests__/phase-plan.test.js +0 -208
  600. package/dist/src/product-loop/__tests__/phase-rituals.test.d.ts +0 -1
  601. package/dist/src/product-loop/__tests__/phase-rituals.test.js +0 -174
  602. package/dist/src/product-loop/__tests__/phase-runner.test.d.ts +0 -1
  603. package/dist/src/product-loop/__tests__/phase-runner.test.js +0 -414
  604. package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.d.ts +0 -1
  605. package/dist/src/product-loop/__tests__/phase-tracker-bridge.test.js +0 -67
  606. package/dist/src/product-loop/__tests__/pick-backend-stack.test.d.ts +0 -11
  607. package/dist/src/product-loop/__tests__/pick-backend-stack.test.js +0 -95
  608. package/dist/src/product-loop/__tests__/product-identity.test.d.ts +0 -1
  609. package/dist/src/product-loop/__tests__/product-identity.test.js +0 -40
  610. package/dist/src/product-loop/__tests__/progress-snapshot.test.d.ts +0 -8
  611. package/dist/src/product-loop/__tests__/progress-snapshot.test.js +0 -152
  612. package/dist/src/product-loop/__tests__/reality-anchor.test.d.ts +0 -1
  613. package/dist/src/product-loop/__tests__/reality-anchor.test.js +0 -49
  614. package/dist/src/product-loop/__tests__/repo-audit.test.d.ts +0 -1
  615. package/dist/src/product-loop/__tests__/repo-audit.test.js +0 -97
  616. package/dist/src/product-loop/__tests__/repo-brief.test.d.ts +0 -9
  617. package/dist/src/product-loop/__tests__/repo-brief.test.js +0 -132
  618. package/dist/src/product-loop/__tests__/role-memory.test.d.ts +0 -1
  619. package/dist/src/product-loop/__tests__/role-memory.test.js +0 -56
  620. package/dist/src/product-loop/__tests__/role-registry.test.d.ts +0 -1
  621. package/dist/src/product-loop/__tests__/role-registry.test.js +0 -222
  622. package/dist/src/product-loop/__tests__/role-routing-ee.test.d.ts +0 -1
  623. package/dist/src/product-loop/__tests__/role-routing-ee.test.js +0 -79
  624. package/dist/src/product-loop/__tests__/route-decision-emit.test.d.ts +0 -10
  625. package/dist/src/product-loop/__tests__/route-decision-emit.test.js +0 -222
  626. package/dist/src/product-loop/__tests__/seed-questions.test.d.ts +0 -1
  627. package/dist/src/product-loop/__tests__/seed-questions.test.js +0 -30
  628. package/dist/src/product-loop/__tests__/ship-polish.test.d.ts +0 -1
  629. package/dist/src/product-loop/__tests__/ship-polish.test.js +0 -96
  630. package/dist/src/product-loop/__tests__/sprint-planner.test.d.ts +0 -6
  631. package/dist/src/product-loop/__tests__/sprint-planner.test.js +0 -140
  632. package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.d.ts +0 -8
  633. package/dist/src/product-loop/__tests__/sprint-runner-backlog.test.js +0 -221
  634. package/dist/src/product-loop/__tests__/sprint-runner-emit.test.d.ts +0 -14
  635. package/dist/src/product-loop/__tests__/sprint-runner-emit.test.js +0 -279
  636. package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.d.ts +0 -14
  637. package/dist/src/product-loop/__tests__/sprint-runner-phase-chunks.test.js +0 -193
  638. package/dist/src/product-loop/__tests__/sprint-runner.test.d.ts +0 -1
  639. package/dist/src/product-loop/__tests__/sprint-runner.test.js +0 -432
  640. package/dist/src/product-loop/__tests__/sprint-self-verify.test.d.ts +0 -8
  641. package/dist/src/product-loop/__tests__/sprint-self-verify.test.js +0 -73
  642. package/dist/src/product-loop/__tests__/sprint-store.test.d.ts +0 -7
  643. package/dist/src/product-loop/__tests__/sprint-store.test.js +0 -84
  644. package/dist/src/product-loop/__tests__/stakeholder-acl.test.d.ts +0 -1
  645. package/dist/src/product-loop/__tests__/stakeholder-acl.test.js +0 -83
  646. package/dist/src/product-loop/__tests__/state-md-ee-injections.test.d.ts +0 -8
  647. package/dist/src/product-loop/__tests__/state-md-ee-injections.test.js +0 -182
  648. package/dist/src/product-loop/__tests__/sufficiency-routing.spec.d.ts +0 -12
  649. package/dist/src/product-loop/__tests__/sufficiency-routing.spec.js +0 -140
  650. package/dist/src/product-loop/__tests__/typed-artifacts.test.d.ts +0 -1
  651. package/dist/src/product-loop/__tests__/typed-artifacts.test.js +0 -222
  652. package/dist/src/product-loop/__tests__/types.test.d.ts +0 -1
  653. package/dist/src/product-loop/__tests__/types.test.js +0 -79
  654. package/dist/src/product-loop/__tests__/verify-failure-threshold.test.d.ts +0 -9
  655. package/dist/src/product-loop/__tests__/verify-failure-threshold.test.js +0 -146
  656. package/dist/src/product-loop/__tests__/verify-failure-tracking.test.d.ts +0 -4
  657. package/dist/src/product-loop/__tests__/verify-failure-tracking.test.js +0 -122
  658. package/dist/src/product-loop/__tests__/verify-result.test.d.ts +0 -1
  659. package/dist/src/product-loop/__tests__/verify-result.test.js +0 -53
  660. package/dist/src/providers/__tests__/adapter-oauth-wiring.test.d.ts +0 -8
  661. package/dist/src/providers/__tests__/adapter-oauth-wiring.test.js +0 -125
  662. package/dist/src/providers/__tests__/capabilities-cosmetic.test.d.ts +0 -1
  663. package/dist/src/providers/__tests__/capabilities-cosmetic.test.js +0 -109
  664. package/dist/src/providers/__tests__/capabilities-flags.test.d.ts +0 -1
  665. package/dist/src/providers/__tests__/capabilities-flags.test.js +0 -145
  666. package/dist/src/providers/__tests__/capabilities-provider-options.test.d.ts +0 -1
  667. package/dist/src/providers/__tests__/capabilities-provider-options.test.js +0 -201
  668. package/dist/src/providers/__tests__/capabilities-sanitize.test.d.ts +0 -1
  669. package/dist/src/providers/__tests__/capabilities-sanitize.test.js +0 -60
  670. package/dist/src/providers/__tests__/capabilities.test.d.ts +0 -1
  671. package/dist/src/providers/__tests__/capabilities.test.js +0 -41
  672. package/dist/src/providers/__tests__/provider-coverage.test.d.ts +0 -1
  673. package/dist/src/providers/__tests__/provider-coverage.test.js +0 -45
  674. package/dist/src/providers/__tests__/reasoning-roundtrip.test.d.ts +0 -1
  675. package/dist/src/providers/__tests__/reasoning-roundtrip.test.js +0 -216
  676. package/dist/src/providers/__tests__/runtime-integration.test.d.ts +0 -1
  677. package/dist/src/providers/__tests__/runtime-integration.test.js +0 -93
  678. package/dist/src/providers/__tests__/runtime.test.d.ts +0 -1
  679. package/dist/src/providers/__tests__/runtime.test.js +0 -80
  680. package/dist/src/providers/__tests__/siliconflow-sse-repair.test.d.ts +0 -1
  681. package/dist/src/providers/__tests__/siliconflow-sse-repair.test.js +0 -267
  682. package/dist/src/providers/__tests__/strategies-registry.test.d.ts +0 -8
  683. package/dist/src/providers/__tests__/strategies-registry.test.js +0 -49
  684. package/dist/src/providers/__tests__/strategies-resolve.test.d.ts +0 -12
  685. package/dist/src/providers/__tests__/strategies-resolve.test.js +0 -128
  686. package/dist/src/providers/__tests__/wire-debug.test.d.ts +0 -1
  687. package/dist/src/providers/__tests__/wire-debug.test.js +0 -39
  688. package/dist/src/providers/adapter.test.d.ts +0 -1
  689. package/dist/src/providers/adapter.test.js +0 -19
  690. package/dist/src/providers/auth/__tests__/browser-flow.test.d.ts +0 -8
  691. package/dist/src/providers/auth/__tests__/browser-flow.test.js +0 -186
  692. package/dist/src/providers/auth/__tests__/device-flow.test.d.ts +0 -6
  693. package/dist/src/providers/auth/__tests__/device-flow.test.js +0 -219
  694. package/dist/src/providers/auth/__tests__/gemini-oauth.test.d.ts +0 -4
  695. package/dist/src/providers/auth/__tests__/gemini-oauth.test.js +0 -306
  696. package/dist/src/providers/auth/__tests__/grok-oauth.test.d.ts +0 -8
  697. package/dist/src/providers/auth/__tests__/grok-oauth.test.js +0 -236
  698. package/dist/src/providers/auth/__tests__/openai-oauth.test.d.ts +0 -7
  699. package/dist/src/providers/auth/__tests__/openai-oauth.test.js +0 -309
  700. package/dist/src/providers/auth/__tests__/token-store.test.d.ts +0 -7
  701. package/dist/src/providers/auth/__tests__/token-store.test.js +0 -125
  702. package/dist/src/providers/errors.test.d.ts +0 -1
  703. package/dist/src/providers/errors.test.js +0 -66
  704. package/dist/src/providers/gemini.test.d.ts +0 -1
  705. package/dist/src/providers/gemini.test.js +0 -37
  706. package/dist/src/providers/keychain.test.d.ts +0 -1
  707. package/dist/src/providers/keychain.test.js +0 -84
  708. package/dist/src/providers/mcp-vision-bridge.test.d.ts +0 -1
  709. package/dist/src/providers/mcp-vision-bridge.test.js +0 -381
  710. package/dist/src/providers/ollama.test.d.ts +0 -1
  711. package/dist/src/providers/ollama.test.js +0 -37
  712. package/dist/src/providers/openai-compatible.test.d.ts +0 -1
  713. package/dist/src/providers/openai-compatible.test.js +0 -53
  714. package/dist/src/providers/openai.test.d.ts +0 -1
  715. package/dist/src/providers/openai.test.js +0 -53
  716. package/dist/src/providers/pricing.test.d.ts +0 -1
  717. package/dist/src/providers/pricing.test.js +0 -81
  718. package/dist/src/providers/prompt-cache-key.spec.d.ts +0 -5
  719. package/dist/src/providers/prompt-cache-key.spec.js +0 -24
  720. package/dist/src/providers/runtime-mock.spec.d.ts +0 -8
  721. package/dist/src/providers/runtime-mock.spec.js +0 -69
  722. package/dist/src/providers/vision-proxy.test.d.ts +0 -1
  723. package/dist/src/providers/vision-proxy.test.js +0 -212
  724. package/dist/src/reporter/__tests__/acl-check.test.d.ts +0 -6
  725. package/dist/src/reporter/__tests__/acl-check.test.js +0 -59
  726. package/dist/src/reporter/__tests__/auto-fire.test.d.ts +0 -10
  727. package/dist/src/reporter/__tests__/auto-fire.test.js +0 -140
  728. package/dist/src/reporter/__tests__/budget.test.d.ts +0 -7
  729. package/dist/src/reporter/__tests__/budget.test.js +0 -60
  730. package/dist/src/reporter/__tests__/handlers.test.d.ts +0 -7
  731. package/dist/src/reporter/__tests__/handlers.test.js +0 -163
  732. package/dist/src/reporter/__tests__/query-router.test.d.ts +0 -6
  733. package/dist/src/reporter/__tests__/query-router.test.js +0 -90
  734. package/dist/src/router/__tests__/step-router.test.d.ts +0 -4
  735. package/dist/src/router/__tests__/step-router.test.js +0 -131
  736. package/dist/src/router/classifier/index.test.d.ts +0 -1
  737. package/dist/src/router/classifier/index.test.js +0 -29
  738. package/dist/src/router/classifier/regex.test.d.ts +0 -1
  739. package/dist/src/router/classifier/regex.test.js +0 -44
  740. package/dist/src/router/classifier/tree-sitter.test.d.ts +0 -1
  741. package/dist/src/router/classifier/tree-sitter.test.js +0 -23
  742. package/dist/src/router/cold.test.d.ts +0 -1
  743. package/dist/src/router/cold.test.js +0 -56
  744. package/dist/src/router/decide.test.d.ts +0 -1
  745. package/dist/src/router/decide.test.js +0 -198
  746. package/dist/src/router/health.test.d.ts +0 -1
  747. package/dist/src/router/health.test.js +0 -52
  748. package/dist/src/router/provider-sentinel.test.d.ts +0 -1
  749. package/dist/src/router/provider-sentinel.test.js +0 -20
  750. package/dist/src/router/role-override.test.d.ts +0 -1
  751. package/dist/src/router/role-override.test.js +0 -26
  752. package/dist/src/router/warm.test.d.ts +0 -1
  753. package/dist/src/router/warm.test.js +0 -202
  754. package/dist/src/scaffold/__tests__/continuation-prompt.test.d.ts +0 -4
  755. package/dist/src/scaffold/__tests__/continuation-prompt.test.js +0 -79
  756. package/dist/src/scaffold/__tests__/continue-as-council.spec.d.ts +0 -10
  757. package/dist/src/scaffold/__tests__/continue-as-council.spec.js +0 -102
  758. package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.d.ts +0 -1
  759. package/dist/src/scaffold/__tests__/dotnet-assembly-name.test.js +0 -27
  760. package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.d.ts +0 -1
  761. package/dist/src/scaffold/__tests__/fe-scaffold-contents.test.js +0 -106
  762. package/dist/src/scaffold/__tests__/init-new.smoke.spec.d.ts +0 -15
  763. package/dist/src/scaffold/__tests__/init-new.smoke.spec.js +0 -81
  764. package/dist/src/scaffold/__tests__/init-new.spec.d.ts +0 -5
  765. package/dist/src/scaffold/__tests__/init-new.spec.js +0 -378
  766. package/dist/src/scaffold/__tests__/install-bb-templates.spec.d.ts +0 -1
  767. package/dist/src/scaffold/__tests__/install-bb-templates.spec.js +0 -77
  768. package/dist/src/scaffold/__tests__/point-to-existing.spec.d.ts +0 -7
  769. package/dist/src/scaffold/__tests__/point-to-existing.spec.js +0 -94
  770. package/dist/src/self-qa/__tests__/agentic-context.test.d.ts +0 -1
  771. package/dist/src/self-qa/__tests__/agentic-context.test.js +0 -98
  772. package/dist/src/self-qa/__tests__/agentic-loop.test.d.ts +0 -1
  773. package/dist/src/self-qa/__tests__/agentic-loop.test.js +0 -62
  774. package/dist/src/self-qa/__tests__/delta-encoder.test.d.ts +0 -1
  775. package/dist/src/self-qa/__tests__/delta-encoder.test.js +0 -97
  776. package/dist/src/self-qa/__tests__/judge.test.d.ts +0 -1
  777. package/dist/src/self-qa/__tests__/judge.test.js +0 -131
  778. package/dist/src/self-qa/__tests__/scenario-planner.test.d.ts +0 -1
  779. package/dist/src/self-qa/__tests__/scenario-planner.test.js +0 -79
  780. package/dist/src/self-qa/__tests__/spec-emitter.test.d.ts +0 -1
  781. package/dist/src/self-qa/__tests__/spec-emitter.test.js +0 -62
  782. package/dist/src/storage/__tests__/migrations.test.d.ts +0 -12
  783. package/dist/src/storage/__tests__/migrations.test.js +0 -357
  784. package/dist/src/storage/__tests__/sweep-stale-pending.test.d.ts +0 -10
  785. package/dist/src/storage/__tests__/sweep-stale-pending.test.js +0 -97
  786. package/dist/src/storage/__tests__/ui-interaction-log.test.d.ts +0 -7
  787. package/dist/src/storage/__tests__/ui-interaction-log.test.js +0 -127
  788. package/dist/src/storage/atomic-io.test.d.ts +0 -1
  789. package/dist/src/storage/atomic-io.test.js +0 -74
  790. package/dist/src/storage/config.test.d.ts +0 -1
  791. package/dist/src/storage/config.test.js +0 -29
  792. package/dist/src/storage/session-experience-store.test.d.ts +0 -5
  793. package/dist/src/storage/session-experience-store.test.js +0 -86
  794. package/dist/src/storage/tool-results.test.d.ts +0 -1
  795. package/dist/src/storage/tool-results.test.js +0 -48
  796. package/dist/src/storage/transcript-response-entry.test.d.ts +0 -1
  797. package/dist/src/storage/transcript-response-entry.test.js +0 -98
  798. package/dist/src/storage/transcript.test.d.ts +0 -1
  799. package/dist/src/storage/transcript.test.js +0 -22
  800. package/dist/src/storage/usage-cap.test.d.ts +0 -1
  801. package/dist/src/storage/usage-cap.test.js +0 -51
  802. package/dist/src/tools/__tests__/native-tools.test.d.ts +0 -1
  803. package/dist/src/tools/__tests__/native-tools.test.js +0 -59
  804. package/dist/src/tools/__tests__/vision-gate.test.d.ts +0 -1
  805. package/dist/src/tools/__tests__/vision-gate.test.js +0 -56
  806. package/dist/src/tools/bash-output-cache.test.d.ts +0 -1
  807. package/dist/src/tools/bash-output-cache.test.js +0 -89
  808. package/dist/src/tools/bash-output-integration.test.d.ts +0 -10
  809. package/dist/src/tools/bash-output-integration.test.js +0 -30
  810. package/dist/src/tools/bash.test.d.ts +0 -1
  811. package/dist/src/tools/bash.test.js +0 -90
  812. package/dist/src/tools/computer.test.d.ts +0 -1
  813. package/dist/src/tools/computer.test.js +0 -142
  814. package/dist/src/tools/file-tracker.test.d.ts +0 -1
  815. package/dist/src/tools/file-tracker.test.js +0 -77
  816. package/dist/src/tools/file.test.d.ts +0 -1
  817. package/dist/src/tools/file.test.js +0 -106
  818. package/dist/src/tools/git-safety.test.d.ts +0 -1
  819. package/dist/src/tools/git-safety.test.js +0 -155
  820. package/dist/src/tools/registry-bash-empty-command.test.d.ts +0 -13
  821. package/dist/src/tools/registry-bash-empty-command.test.js +0 -57
  822. package/dist/src/tools/registry-bash-footer.test.d.ts +0 -7
  823. package/dist/src/tools/registry-bash-footer.test.js +0 -82
  824. package/dist/src/tools/registry-ee-query.test.d.ts +0 -11
  825. package/dist/src/tools/registry-ee-query.test.js +0 -71
  826. package/dist/src/tools/registry-git-safety.test.d.ts +0 -7
  827. package/dist/src/tools/registry-git-safety.test.js +0 -103
  828. package/dist/src/tools/registry-session-repeat.test.d.ts +0 -12
  829. package/dist/src/tools/registry-session-repeat.test.js +0 -87
  830. package/dist/src/tools/registry.test.d.ts +0 -1
  831. package/dist/src/tools/registry.test.js +0 -34
  832. package/dist/src/tools/schedule.test.d.ts +0 -1
  833. package/dist/src/tools/schedule.test.js +0 -118
  834. package/dist/src/tools/todo-write-snapshot.test.d.ts +0 -1
  835. package/dist/src/tools/todo-write-snapshot.test.js +0 -43
  836. package/dist/src/ui/__tests__/markdown-render.test.d.ts +0 -1
  837. package/dist/src/ui/__tests__/markdown-render.test.js +0 -65
  838. package/dist/src/ui/__tests__/picker-providers.test.d.ts +0 -1
  839. package/dist/src/ui/__tests__/picker-providers.test.js +0 -31
  840. package/dist/src/ui/cards/__tests__/product-status-card.test.d.ts +0 -1
  841. package/dist/src/ui/cards/__tests__/product-status-card.test.js +0 -27
  842. package/dist/src/ui/components/__tests__/council-leader-bubble.test.d.ts +0 -1
  843. package/dist/src/ui/components/__tests__/council-leader-bubble.test.js +0 -14
  844. package/dist/src/ui/components/__tests__/council-message-bubble.test.d.ts +0 -1
  845. package/dist/src/ui/components/__tests__/council-message-bubble.test.js +0 -74
  846. package/dist/src/ui/components/__tests__/council-phase-timeline.test.d.ts +0 -1
  847. package/dist/src/ui/components/__tests__/council-phase-timeline.test.js +0 -51
  848. package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.d.ts +0 -1
  849. package/dist/src/ui/components/__tests__/council-placeholder-bubble.test.js +0 -14
  850. package/dist/src/ui/components/__tests__/council-question-card.test.d.ts +0 -1
  851. package/dist/src/ui/components/__tests__/council-question-card.test.js +0 -121
  852. package/dist/src/ui/components/__tests__/council-synthesis-banner.test.d.ts +0 -1
  853. package/dist/src/ui/components/__tests__/council-synthesis-banner.test.js +0 -11
  854. package/dist/src/ui/components/__tests__/task-list-panel.test.d.ts +0 -1
  855. package/dist/src/ui/components/__tests__/task-list-panel.test.js +0 -31
  856. package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.d.ts +0 -1
  857. package/dist/src/ui/components/__tests__/use-pair-quote-buffer.test.js +0 -37
  858. package/dist/src/ui/slash/__tests__/clear.test.d.ts +0 -1
  859. package/dist/src/ui/slash/__tests__/clear.test.js +0 -58
  860. package/dist/src/ui/slash/__tests__/compact.test.d.ts +0 -1
  861. package/dist/src/ui/slash/__tests__/compact.test.js +0 -43
  862. package/dist/src/ui/slash/__tests__/cost.test.d.ts +0 -1
  863. package/dist/src/ui/slash/__tests__/cost.test.js +0 -54
  864. package/dist/src/ui/slash/__tests__/discuss.test.d.ts +0 -1
  865. package/dist/src/ui/slash/__tests__/discuss.test.js +0 -83
  866. package/dist/src/ui/slash/__tests__/execute.test.d.ts +0 -1
  867. package/dist/src/ui/slash/__tests__/execute.test.js +0 -71
  868. package/dist/src/ui/slash/__tests__/expand.test.d.ts +0 -1
  869. package/dist/src/ui/slash/__tests__/expand.test.js +0 -67
  870. package/dist/src/ui/slash/__tests__/ideal.test.d.ts +0 -1
  871. package/dist/src/ui/slash/__tests__/ideal.test.js +0 -158
  872. package/dist/src/ui/slash/__tests__/menu-parity.test.d.ts +0 -17
  873. package/dist/src/ui/slash/__tests__/menu-parity.test.js +0 -43
  874. package/dist/src/ui/slash/__tests__/optimize.test.d.ts +0 -1
  875. package/dist/src/ui/slash/__tests__/optimize.test.js +0 -130
  876. package/dist/src/ui/slash/__tests__/pin.test.d.ts +0 -1
  877. package/dist/src/ui/slash/__tests__/pin.test.js +0 -38
  878. package/dist/src/ui/slash/__tests__/plan.test.d.ts +0 -1
  879. package/dist/src/ui/slash/__tests__/plan.test.js +0 -82
  880. package/dist/src/ui/slash/__tests__/ponytail.test.d.ts +0 -1
  881. package/dist/src/ui/slash/__tests__/ponytail.test.js +0 -37
  882. package/dist/src/ui/slash/__tests__/status-render.test.d.ts +0 -7
  883. package/dist/src/ui/slash/__tests__/status-render.test.js +0 -77
  884. package/dist/src/ui/slash/route.test.d.ts +0 -1
  885. package/dist/src/ui/slash/route.test.js +0 -70
  886. package/dist/src/ui/status-bar/index.test.d.ts +0 -1
  887. package/dist/src/ui/status-bar/index.test.js +0 -139
  888. package/dist/src/ui/status-bar/store.test.d.ts +0 -1
  889. package/dist/src/ui/status-bar/store.test.js +0 -116
  890. package/dist/src/ui/status-bar/tier-badge.test.d.ts +0 -1
  891. package/dist/src/ui/status-bar/tier-badge.test.js +0 -34
  892. package/dist/src/ui/status-bar/usd-meter.test.d.ts +0 -1
  893. package/dist/src/ui/status-bar/usd-meter.test.js +0 -32
  894. package/dist/src/ui/utils/__tests__/format.test.d.ts +0 -1
  895. package/dist/src/ui/utils/__tests__/format.test.js +0 -50
  896. package/dist/src/ui/utils/__tests__/tools.test.d.ts +0 -1
  897. package/dist/src/ui/utils/__tests__/tools.test.js +0 -48
  898. package/dist/src/ui/utils/relaunch.test.d.ts +0 -1
  899. package/dist/src/ui/utils/relaunch.test.js +0 -133
  900. package/dist/src/ui/utils/text.test.d.ts +0 -1
  901. package/dist/src/ui/utils/text.test.js +0 -47
  902. package/dist/src/usage/__tests__/product-ledger.test.d.ts +0 -1
  903. package/dist/src/usage/__tests__/product-ledger.test.js +0 -60
  904. package/dist/src/usage/downgrade.test.d.ts +0 -1
  905. package/dist/src/usage/downgrade.test.js +0 -70
  906. package/dist/src/usage/estimator.test.d.ts +0 -1
  907. package/dist/src/usage/estimator.test.js +0 -38
  908. package/dist/src/usage/ledger.test.d.ts +0 -1
  909. package/dist/src/usage/ledger.test.js +0 -171
  910. package/dist/src/usage/midstream.test.d.ts +0 -1
  911. package/dist/src/usage/midstream.test.js +0 -47
  912. package/dist/src/usage/thresholds.test.d.ts +0 -1
  913. package/dist/src/usage/thresholds.test.js +0 -77
  914. package/dist/src/utils/__tests__/auto-council-settings.test.d.ts +0 -1
  915. package/dist/src/utils/__tests__/auto-council-settings.test.js +0 -41
  916. package/dist/src/utils/__tests__/compaction-caps.test.d.ts +0 -21
  917. package/dist/src/utils/__tests__/compaction-caps.test.js +0 -187
  918. package/dist/src/utils/__tests__/ee-logger.test.d.ts +0 -11
  919. package/dist/src/utils/__tests__/ee-logger.test.js +0 -165
  920. package/dist/src/utils/__tests__/file-lock.test.d.ts +0 -1
  921. package/dist/src/utils/__tests__/file-lock.test.js +0 -66
  922. package/dist/src/utils/__tests__/footprint-gitignore.test.d.ts +0 -1
  923. package/dist/src/utils/__tests__/footprint-gitignore.test.js +0 -50
  924. package/dist/src/utils/__tests__/llm-deadline-abort.test.d.ts +0 -1
  925. package/dist/src/utils/__tests__/llm-deadline-abort.test.js +0 -33
  926. package/dist/src/utils/__tests__/llm-deadline.test.d.ts +0 -1
  927. package/dist/src/utils/__tests__/llm-deadline.test.js +0 -56
  928. package/dist/src/utils/__tests__/rate-limit.test.d.ts +0 -1
  929. package/dist/src/utils/__tests__/rate-limit.test.js +0 -38
  930. package/dist/src/utils/__tests__/settings-disabled-models.test.d.ts +0 -7
  931. package/dist/src/utils/__tests__/settings-disabled-models.test.js +0 -99
  932. package/dist/src/utils/__tests__/settings-web-research.test.d.ts +0 -1
  933. package/dist/src/utils/__tests__/settings-web-research.test.js +0 -46
  934. package/dist/src/utils/__tests__/slugify.test.d.ts +0 -1
  935. package/dist/src/utils/__tests__/slugify.test.js +0 -37
  936. package/dist/src/utils/__tests__/visible-retry.test.d.ts +0 -1
  937. package/dist/src/utils/__tests__/visible-retry.test.js +0 -143
  938. package/dist/src/utils/install-manager.test.d.ts +0 -1
  939. package/dist/src/utils/install-manager.test.js +0 -127
  940. package/dist/src/utils/instructions.test.d.ts +0 -1
  941. package/dist/src/utils/instructions.test.js +0 -93
  942. package/dist/src/utils/open-url.test.d.ts +0 -1
  943. package/dist/src/utils/open-url.test.js +0 -86
  944. package/dist/src/utils/permission-mode.test.d.ts +0 -1
  945. package/dist/src/utils/permission-mode.test.js +0 -188
  946. package/dist/src/utils/redactor.test.d.ts +0 -1
  947. package/dist/src/utils/redactor.test.js +0 -84
  948. package/dist/src/utils/settings.test.d.ts +0 -1
  949. package/dist/src/utils/settings.test.js +0 -212
  950. package/dist/src/utils/shell.test.d.ts +0 -1
  951. package/dist/src/utils/shell.test.js +0 -97
  952. package/dist/src/utils/skills.test.d.ts +0 -1
  953. package/dist/src/utils/skills.test.js +0 -45
  954. package/dist/src/utils/subagent-display.test.d.ts +0 -1
  955. package/dist/src/utils/subagent-display.test.js +0 -21
  956. package/dist/src/utils/subagents-settings.test.d.ts +0 -1
  957. package/dist/src/utils/subagents-settings.test.js +0 -64
  958. package/dist/src/utils/telegram-audio-settings.test.d.ts +0 -1
  959. package/dist/src/utils/telegram-audio-settings.test.js +0 -39
  960. package/dist/src/utils/update-checker.test.d.ts +0 -1
  961. package/dist/src/utils/update-checker.test.js +0 -138
  962. package/dist/src/verify/__tests__/coverage-parsers.test.d.ts +0 -1
  963. package/dist/src/verify/__tests__/coverage-parsers.test.js +0 -69
  964. package/dist/src/verify/__tests__/dotnet-recipe.test.d.ts +0 -10
  965. package/dist/src/verify/__tests__/dotnet-recipe.test.js +0 -70
  966. package/dist/src/verify/checkpoint.test.d.ts +0 -1
  967. package/dist/src/verify/checkpoint.test.js +0 -160
  968. package/dist/src/verify/entrypoint.test.d.ts +0 -1
  969. package/dist/src/verify/entrypoint.test.js +0 -233
  970. package/dist/src/verify/environment.test.d.ts +0 -1
  971. package/dist/src/verify/environment.test.js +0 -94
  972. package/dist/src/verify/orchestrator.test.d.ts +0 -1
  973. package/dist/src/verify/orchestrator.test.js +0 -126
  974. package/dist/src/verify/runtime-prep.test.d.ts +0 -1
  975. package/dist/src/verify/runtime-prep.test.js +0 -38
@@ -1,7 +0,0 @@
1
- /**
2
- * Verifies Bước 3-1 (always-on runId footer) and Bước 3-3 (inline reminder
3
- * on canonical-hash match) at the registry tool layer. Uses a real BashTool
4
- * against echo-style portable commands so the cache + footer wiring is
5
- * exercised end-to-end.
6
- */
7
- export {};
@@ -1,82 +0,0 @@
1
- /**
2
- * Verifies Bước 3-1 (always-on runId footer) and Bước 3-3 (inline reminder
3
- * on canonical-hash match) at the registry tool layer. Uses a real BashTool
4
- * against echo-style portable commands so the cache + footer wiring is
5
- * exercised end-to-end.
6
- */
7
- import os from "node:os";
8
- import { beforeEach, describe, expect, it } from "vitest";
9
- import { BashTool } from "./bash.js";
10
- import { clearBashOutputCache } from "./bash-output-cache.js";
11
- import { createBuiltinTools } from "./registry.js";
12
- async function runBash(tools, args) {
13
- const t = tools.bash;
14
- if (!t?.execute)
15
- throw new Error("bash tool has no execute");
16
- const out = await t.execute(args);
17
- return typeof out === "string" ? out : JSON.stringify(out);
18
- }
19
- describe("Bước 3-1 — always-on runId footer", () => {
20
- beforeEach(() => clearBashOutputCache());
21
- it("emits [bash_run_id: bash-N] footer even when output is tiny", async () => {
22
- const bash = new BashTool(os.tmpdir());
23
- const tools = createBuiltinTools(bash, "agent");
24
- const out = await runBash(tools, { command: "echo small-output", timeout: 10_000 });
25
- expect(out).toMatch(/\[bash_run_id: bash-\d+\]/);
26
- // Tiny output → no hint about bash_output_get (would be noise).
27
- expect(out).not.toContain("use bash_output_get");
28
- });
29
- it("adds the bash_output_get hint only when cached output >= 4000 chars", async () => {
30
- const bash = new BashTool(os.tmpdir());
31
- const tools = createBuiltinTools(bash, "agent");
32
- // ~5000 char output via printf.
33
- const cmd = process.platform === "win32"
34
- ? `node -e "console.log('x'.repeat(5000))"`
35
- : `node -e "console.log('x'.repeat(5000))"`;
36
- const out = await runBash(tools, { command: cmd, timeout: 10_000 });
37
- expect(out).toMatch(/\[bash_run_id: bash-\d+ — \d+ chars cached; use bash_output_get/);
38
- }, 20_000);
39
- });
40
- describe("Bước 3-3 — inline reminder on canonical hash match", () => {
41
- beforeEach(() => clearBashOutputCache());
42
- it("appends [reminder: ...] when the second bash call canonicalizes identically", async () => {
43
- const bash = new BashTool(os.tmpdir());
44
- const tools = createBuiltinTools(bash, "agent");
45
- // Same underlying intent (`echo same-base`) with different cosmetic
46
- // wrapping (pipe to tail vs head). canonicalizeBashCommand collapses
47
- // these to the same hash.
48
- const first = await runBash(tools, { command: "echo same-base | head -1", timeout: 10_000 });
49
- const firstRunId = first.match(/bash-(\d+)/)?.[0];
50
- expect(firstRunId).toBeDefined();
51
- const second = await runBash(tools, { command: "echo same-base | tail -1", timeout: 10_000 });
52
- expect(second).toContain("[reminder:");
53
- expect(second).toContain(`run_id=${firstRunId}`);
54
- expect(second).toMatch(/Use bash_output_get/);
55
- }, 20_000);
56
- it("does NOT append the reminder when the canonical form differs", async () => {
57
- const bash = new BashTool(os.tmpdir());
58
- const tools = createBuiltinTools(bash, "agent");
59
- await runBash(tools, { command: "echo first", timeout: 10_000 });
60
- const second = await runBash(tools, { command: "echo second-different", timeout: 10_000 });
61
- expect(second).not.toContain("[reminder:");
62
- // Footer still present though.
63
- expect(second).toMatch(/\[bash_run_id: bash-\d+\]/);
64
- }, 20_000);
65
- it("resets / advances correctly across three consecutive same-intent calls", async () => {
66
- const bash = new BashTool(os.tmpdir());
67
- const tools = createBuiltinTools(bash, "agent");
68
- const r1 = await runBash(tools, { command: "echo repeat-me", timeout: 10_000 });
69
- const r2 = await runBash(tools, { command: "echo repeat-me | head -1", timeout: 10_000 });
70
- const r3 = await runBash(tools, { command: "echo repeat-me | tail -1", timeout: 10_000 });
71
- expect(r1).not.toContain("[reminder:");
72
- // r2's reminder must reference r1's runId.
73
- const r1Id = r1.match(/bash-(\d+)/)?.[0];
74
- expect(r2).toContain(`run_id=${r1Id}`);
75
- // r3's reminder must reference r2's runId (the LATEST match, not r1).
76
- const r2Id = r2.match(/bash-(\d+)/)?.[0];
77
- expect(r3).toContain(`run_id=${r2Id}`);
78
- // Sanity: ids are distinct.
79
- expect(r1Id).not.toBe(r2Id);
80
- }, 30_000);
81
- });
82
- //# sourceMappingURL=registry-bash-footer.test.js.map
@@ -1,11 +0,0 @@
1
- /**
2
- * ee_query builtin tool — the in-CLI counterpart of the MCP `ee.query` tool.
3
- *
4
- * Session d95113d3be09: the Agent Operating Contract + checkpoint reminders
5
- * instruct the agent to "Use the ee_query tool with 'tool-artifact id=XXX'" to
6
- * rehydrate compaction-elided outputs, but the in-CLI agent had no such tool —
7
- * a dead reference. This verifies the tool now exists in the agent toolset, is
8
- * absent from non-agent modes, and degrades gracefully on a malformed call
9
- * (no network).
10
- */
11
- export {};
@@ -1,71 +0,0 @@
1
- /**
2
- * ee_query builtin tool — the in-CLI counterpart of the MCP `ee.query` tool.
3
- *
4
- * Session d95113d3be09: the Agent Operating Contract + checkpoint reminders
5
- * instruct the agent to "Use the ee_query tool with 'tool-artifact id=XXX'" to
6
- * rehydrate compaction-elided outputs, but the in-CLI agent had no such tool —
7
- * a dead reference. This verifies the tool now exists in the agent toolset, is
8
- * absent from non-agent modes, and degrades gracefully on a malformed call
9
- * (no network).
10
- */
11
- import os from "node:os";
12
- import { afterEach, describe, expect, it } from "vitest";
13
- import { __resetArtifactCacheForTests, recordArtifact } from "../ee/artifact-cache.js";
14
- import { __resetSessionExperienceForTests, getSessionExperience } from "../orchestrator/session-experience.js";
15
- import { BashTool } from "./bash.js";
16
- import { createBuiltinTools, isToolArtifactQuery } from "./registry.js";
17
- describe("ee_query builtin tool", () => {
18
- it("is registered in agent mode", () => {
19
- const tools = createBuiltinTools(new BashTool(os.tmpdir()), "agent");
20
- expect(tools.ee_query).toBeDefined();
21
- expect(tools.ee_query.execute).toBeTypeOf("function");
22
- });
23
- it("is NOT registered in non-agent modes (plan/ask)", () => {
24
- expect(createBuiltinTools(new BashTool(os.tmpdir()), "plan").ee_query).toBeUndefined();
25
- expect(createBuiltinTools(new BashTool(os.tmpdir()), "ask").ee_query).toBeUndefined();
26
- });
27
- it("returns a corrective error for an empty query (no network)", async () => {
28
- const tools = createBuiltinTools(new BashTool(os.tmpdir()), "agent");
29
- const t = tools.ee_query;
30
- const out = String(await t.execute?.({ query: " " }));
31
- expect(out).toMatch(/ERROR/);
32
- expect(out).toMatch(/query/i);
33
- });
34
- });
35
- describe("isToolArtifactQuery — ee_query intent routing", () => {
36
- it("matches tool-artifact / full-tool-result id lookups (→ /api/search)", () => {
37
- expect(isToolArtifactQuery("tool-artifact id=abc123")).toBe(true);
38
- expect(isToolArtifactQuery("full tool result id=9f2c")).toBe(true);
39
- expect(isToolArtifactQuery("rehydrate the TOOL-ARTIFACT ID = xyz")).toBe(true);
40
- });
41
- it("does NOT match general recall queries (→ /api/recall)", () => {
42
- expect(isToolArtifactQuery("recent compaction checkpoint Progress DONE")).toBe(false);
43
- expect(isToolArtifactQuery("how do we restart the experience-engine server")).toBe(false);
44
- // "id=" alone, without the artifact phrase, is not an artifact lookup.
45
- expect(isToolArtifactQuery("what is the user id=field convention")).toBe(false);
46
- // The artifact phrase without an id= is also not an exact lookup.
47
- expect(isToolArtifactQuery("tool-artifact storage design")).toBe(false);
48
- });
49
- });
50
- describe("ee_query — anti-mù rehydrate (local-first, durable when EE is down)", () => {
51
- afterEach(() => {
52
- __resetArtifactCacheForTests();
53
- __resetSessionExperienceForTests();
54
- });
55
- it("rehydrates a tool-artifact from the in-session cache with NO EE/network call", async () => {
56
- // Simulates: the compactor elided this output earlier (recordArtifact), EE is
57
- // now down. The agent's ee_query("tool-artifact id=X") must still return the
58
- // full content from the local cache rather than an [ee_unavailable] note.
59
- recordArtifact("call_42", "read_file", "FULL ELIDED CONTENT — line A\nline B\nline C");
60
- const tools = createBuiltinTools(new BashTool(os.tmpdir()), "agent");
61
- const t = tools.ee_query;
62
- const out = String(await t.execute?.({ query: "tool-artifact id=call_42" }));
63
- expect(out).toContain("rehydrated from in-session cache");
64
- expect(out).toContain("tool=read_file");
65
- expect(out).toContain("FULL ELIDED CONTENT");
66
- expect(out).not.toMatch(/ee_unavailable/);
67
- // Lived-experience telemetry recorded the cache-sourced rehydrate.
68
- expect(getSessionExperience().rehydrations.cache).toBe(1);
69
- });
70
- });
71
- //# sourceMappingURL=registry-ee-query.test.js.map
@@ -1,7 +0,0 @@
1
- /**
2
- * Integration: git-safety guards wired into the bash tool (registry.ts).
3
- * Unit logic lives in git-safety.test.ts; this asserts the WIRING — a blocked
4
- * push returns the block message WITHOUT executing, and a broad stage appends
5
- * the sensitive-path warning to the tool output.
6
- */
7
- export {};
@@ -1,103 +0,0 @@
1
- /**
2
- * Integration: git-safety guards wired into the bash tool (registry.ts).
3
- * Unit logic lives in git-safety.test.ts; this asserts the WIRING — a blocked
4
- * push returns the block message WITHOUT executing, and a broad stage appends
5
- * the sensitive-path warning to the tool output.
6
- */
7
- import { mkdtempSync, rmSync, writeFileSync } from "node:fs";
8
- import os from "node:os";
9
- import { join } from "node:path";
10
- import { afterEach, beforeEach, describe, expect, it } from "vitest";
11
- import { BashTool } from "./bash.js";
12
- import { clearBashOutputCache } from "./bash-output-cache.js";
13
- import { __resetGitSafetyState, recordCommandOutcome } from "./git-safety.js";
14
- import { createBuiltinTools } from "./registry.js";
15
- async function runBash(tools, args, extra) {
16
- const t = tools.bash;
17
- if (!t?.execute)
18
- throw new Error("bash tool has no execute");
19
- const out = await t.execute(args, extra);
20
- return typeof out === "string" ? out : JSON.stringify(out);
21
- }
22
- describe("git-safety wiring in bash tool", () => {
23
- beforeEach(() => {
24
- clearBashOutputCache();
25
- globalThis.__muonroiBashRepeatState = new Map();
26
- __resetGitSafetyState();
27
- delete process.env.MUONROI_ALLOW_PUSH_ON_RED;
28
- });
29
- afterEach(() => {
30
- delete process.env.MUONROI_ALLOW_PUSH_ON_RED;
31
- delete globalThis.__muonroiSafetyApproved;
32
- });
33
- it("BLOCKS git push (without executing) after a verification failed this session", async () => {
34
- const bash = new BashTool(os.tmpdir());
35
- const tools = createBuiltinTools(bash, "agent", { sessionId: "GS1" });
36
- // Simulate a failed test earlier in the session.
37
- recordCommandOutcome("GS1", "npm test", false);
38
- const out = await runBash(tools, { command: "git push origin main", timeout: 10_000 });
39
- expect(out).toMatch(/^BLOCKED \(git-safety\):/);
40
- expect(out).toMatch(/npm test/);
41
- // The distinctive block message proves git push never ran (a real push in
42
- // tmpdir would fail with a git error like "not a git repository", not this).
43
- expect(out).not.toMatch(/not a git repository|fatal:/i);
44
- }, 20_000);
45
- it("ALLOWS git push once the failed verification re-runs green", async () => {
46
- const bash = new BashTool(os.tmpdir());
47
- const tools = createBuiltinTools(bash, "agent", { sessionId: "GS2" });
48
- recordCommandOutcome("GS2", "npm test", false);
49
- recordCommandOutcome("GS2", "npm test", true); // re-ran green
50
- const out = await runBash(tools, { command: "git push origin main", timeout: 10_000 });
51
- expect(out).not.toMatch(/^BLOCKED:/);
52
- }, 20_000);
53
- it("respects MUONROI_ALLOW_PUSH_ON_RED override", async () => {
54
- process.env.MUONROI_ALLOW_PUSH_ON_RED = "1";
55
- const bash = new BashTool(os.tmpdir());
56
- const tools = createBuiltinTools(bash, "agent", { sessionId: "GS3" });
57
- recordCommandOutcome("GS3", "vitest run", false);
58
- const out = await runBash(tools, { command: "git push", timeout: 10_000 });
59
- expect(out).not.toMatch(/^BLOCKED:/);
60
- }, 20_000);
61
- it("blocks push across registry rebuilds even with NO sessionId (stable process key)", async () => {
62
- // Regression for the anon-key false negative: createBuiltinTools() without a
63
- // sessionId must still gate the push, because production call sites
64
- // (message-processor) don't thread sessionId and rebuild the registry every
65
- // turn. A failing verify in one anon registry must block a push in the next.
66
- const bash = new BashTool(os.tmpdir());
67
- // `npm test` is a recognized verification command and fails fast here
68
- // (no package.json in a temp dir) → recorded as a failed verify under the
69
- // stable process key.
70
- const toolsA = createBuiltinTools(bash, "agent"); // no sessionId
71
- const failOut = await runBash(toolsA, { command: "npm test", timeout: 20_000 });
72
- expect(failOut).toMatch(/ERROR/); // the verify failed
73
- // Fresh anon registry (simulates the per-turn rebuild).
74
- const toolsB = createBuiltinTools(bash, "agent"); // no sessionId
75
- const pushOut = await runBash(toolsB, { command: "git push origin main", timeout: 10_000 });
76
- expect(pushOut).toMatch(/^BLOCKED \(git-safety\):/);
77
- }, 30_000);
78
- it("uses command-matched safety approval when the retry has a new toolCallId", async () => {
79
- const bash = new BashTool(os.tmpdir());
80
- const tools = createBuiltinTools(bash, "agent", { sessionId: "GS-APPROVE" });
81
- recordCommandOutcome("GS-APPROVE", "npm test", false);
82
- globalThis.__muonroiSafetyApproved = new Map([
83
- ["blocked-tool-call-id", { kind: "once", command: "git push origin main" }],
84
- ]);
85
- const out = await runBash(tools, { command: "git push origin main", timeout: 10_000 }, { toolCallId: "retry-tool-call-id" });
86
- expect(out).not.toMatch(/^BLOCKED/);
87
- }, 20_000);
88
- it("blocks broad git add when sensitive paths exist", async () => {
89
- const dir = mkdtempSync(join(os.tmpdir(), "gs-stage-"));
90
- writeFileSync(join(dir, ".env"), "API_KEY=secret");
91
- try {
92
- const bash = new BashTool(dir);
93
- const tools = createBuiltinTools(bash, "agent", { sessionId: "GS4" });
94
- const out = await runBash(tools, { command: "git add -A", timeout: 10_000 });
95
- expect(out).toMatch(/^BLOCKED \(git-safety\):/);
96
- expect(out).toMatch(/\.env/);
97
- }
98
- finally {
99
- rmSync(dir, { recursive: true, force: true });
100
- }
101
- }, 20_000);
102
- });
103
- //# sourceMappingURL=registry-git-safety.test.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * Phase 4R — session-scoped bash canonical-repeat detector.
3
- *
4
- * Verifies that the `[reminder: ...]` injection survives across
5
- * `createBuiltinTools()` rebuilds when the sessionId is preserved. The
6
- * baseline session `77cd2e11c6a5` re-ran an identical `grep` 9 times
7
- * because each askcard answer rebuilt the registry and wiped the
8
- * per-closure detector state. The fix lifts the state to a
9
- * process-global Map keyed by sessionId so the detector survives
10
- * registry rebuilds within the same session.
11
- */
12
- export {};
@@ -1,87 +0,0 @@
1
- /**
2
- * Phase 4R — session-scoped bash canonical-repeat detector.
3
- *
4
- * Verifies that the `[reminder: ...]` injection survives across
5
- * `createBuiltinTools()` rebuilds when the sessionId is preserved. The
6
- * baseline session `77cd2e11c6a5` re-ran an identical `grep` 9 times
7
- * because each askcard answer rebuilt the registry and wiped the
8
- * per-closure detector state. The fix lifts the state to a
9
- * process-global Map keyed by sessionId so the detector survives
10
- * registry rebuilds within the same session.
11
- */
12
- import os from "node:os";
13
- import { beforeEach, describe, expect, it } from "vitest";
14
- import { BashTool } from "./bash.js";
15
- import { clearBashOutputCache } from "./bash-output-cache.js";
16
- import { createBuiltinTools } from "./registry.js";
17
- async function runBash(tools, args) {
18
- const t = tools.bash;
19
- if (!t?.execute)
20
- throw new Error("bash tool has no execute");
21
- const out = await t.execute(args);
22
- return typeof out === "string" ? out : JSON.stringify(out);
23
- }
24
- describe("Phase 4R — session-scoped bash repeat detector", () => {
25
- beforeEach(() => {
26
- clearBashOutputCache();
27
- // Reset the process-global state so each test starts clean. The
28
- // registry reads from this Map lazily, so clearing it here is enough.
29
- globalThis.__muonroiBashRepeatState = new Map();
30
- });
31
- it("fires reminder when the SAME sessionId is reused across registry rebuilds", async () => {
32
- const bash = new BashTool(os.tmpdir());
33
- // Turn 1: build registry with sessionId=S1, run command, no reminder.
34
- const tools1 = createBuiltinTools(bash, "agent", { sessionId: "S1" });
35
- const first = await runBash(tools1, { command: "echo same-base | head -1", timeout: 10_000 });
36
- const firstRunId = first.match(/bash-(\d+)/)?.[0];
37
- expect(firstRunId).toBeDefined();
38
- expect(first).not.toContain("[reminder:");
39
- // Simulate askcard answer or sub-agent turn: tear down + rebuild
40
- // registry, but keep the same sessionId. Pre-fix this would reset
41
- // the per-closure state and miss the repeat.
42
- const tools2 = createBuiltinTools(bash, "agent", { sessionId: "S1" });
43
- const second = await runBash(tools2, { command: "echo same-base | tail -1", timeout: 10_000 });
44
- expect(second).toContain("[reminder:");
45
- expect(second).toContain(`run_id=${firstRunId}`);
46
- expect(second).toMatch(/Use bash_output_get/);
47
- }, 30_000);
48
- it("does NOT fire reminder when a DIFFERENT sessionId issues the same canonical command", async () => {
49
- const bash = new BashTool(os.tmpdir());
50
- const toolsS1 = createBuiltinTools(bash, "agent", { sessionId: "S1" });
51
- await runBash(toolsS1, { command: "echo cross-session | head -1", timeout: 10_000 });
52
- // Different session — must NOT see S1's history.
53
- const toolsS2 = createBuiltinTools(bash, "agent", { sessionId: "S2" });
54
- const out = await runBash(toolsS2, { command: "echo cross-session | tail -1", timeout: 10_000 });
55
- expect(out).not.toContain("[reminder:");
56
- // Footer still fires.
57
- expect(out).toMatch(/\[bash_run_id: bash-\d+\]/);
58
- }, 30_000);
59
- it("fires reminder across 3 separate registry rebuilds within the same session", async () => {
60
- const bash = new BashTool(os.tmpdir());
61
- const tools1 = createBuiltinTools(bash, "agent", { sessionId: "S3" });
62
- const r1 = await runBash(tools1, { command: "echo repeat-me", timeout: 10_000 });
63
- expect(r1).not.toContain("[reminder:");
64
- const r1Id = r1.match(/bash-(\d+)/)?.[0];
65
- const tools2 = createBuiltinTools(bash, "agent", { sessionId: "S3" });
66
- const r2 = await runBash(tools2, { command: "echo repeat-me | head -1", timeout: 10_000 });
67
- expect(r2).toContain(`run_id=${r1Id}`);
68
- const r2Id = r2.match(/bash-(\d+)/)?.[0];
69
- const tools3 = createBuiltinTools(bash, "agent", { sessionId: "S3" });
70
- const r3 = await runBash(tools3, { command: "echo repeat-me | tail -1", timeout: 10_000 });
71
- // Each rebuild MUST chain — r3 sees the latest runId (r2's), not r1's.
72
- expect(r3).toContain(`run_id=${r2Id}`);
73
- expect(r1Id).not.toBe(r2Id);
74
- }, 45_000);
75
- it("legacy callers (no sessionId) keep per-instance isolation", async () => {
76
- const bash = new BashTool(os.tmpdir());
77
- // No sessionId — each registry instance is isolated, matching the
78
- // pre-4R closure behaviour. This is what registry-bash-footer.test.ts
79
- // implicitly relies on.
80
- const toolsA = createBuiltinTools(bash, "agent");
81
- await runBash(toolsA, { command: "echo legacy-iso | head -1", timeout: 10_000 });
82
- const toolsB = createBuiltinTools(bash, "agent");
83
- const out = await runBash(toolsB, { command: "echo legacy-iso | tail -1", timeout: 10_000 });
84
- expect(out).not.toContain("[reminder:");
85
- }, 30_000);
86
- });
87
- //# sourceMappingURL=registry-session-repeat.test.js.map
@@ -1 +0,0 @@
1
- export {};
@@ -1,34 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { MAX_TOOL_OUTPUT_CHARS, truncateOutput } from "./registry.js";
3
- describe("truncateOutput", () => {
4
- it("returns input unchanged when under cap", () => {
5
- const text = "a".repeat(100);
6
- expect(truncateOutput(text)).toBe(text);
7
- });
8
- it("preserves head and tail when over cap", () => {
9
- const big = "X".repeat(MAX_TOOL_OUTPUT_CHARS + 5_000);
10
- const out = truncateOutput(big);
11
- expect(out.length).toBeLessThan(big.length);
12
- expect(out.startsWith("X")).toBe(true);
13
- expect(out.endsWith("X")).toBe(true);
14
- expect(out).toContain("chars truncated");
15
- expect(out).toContain("full output in transcript");
16
- });
17
- it("honors custom maxChars", () => {
18
- const big = "Y".repeat(2_000);
19
- const out = truncateOutput(big, 500);
20
- expect(out.length).toBeLessThan(big.length);
21
- expect(out).toContain("chars truncated");
22
- });
23
- it("exports a cap within the documented range", () => {
24
- expect(MAX_TOOL_OUTPUT_CHARS).toBeGreaterThanOrEqual(10_000);
25
- expect(MAX_TOOL_OUTPUT_CHARS).toBeLessThanOrEqual(200_000);
26
- });
27
- it("truncation marker accounts for full delta", () => {
28
- const big = "Z".repeat(100_000);
29
- const out = truncateOutput(big, 10_000);
30
- const expectedDelta = 100_000 - 10_000;
31
- expect(out).toContain(`${expectedDelta} chars truncated`);
32
- });
33
- });
34
- //# sourceMappingURL=registry.test.js.map
@@ -1 +0,0 @@
1
- export {};
@@ -1,118 +0,0 @@
1
- import fs from "fs";
2
- import os from "os";
3
- import path from "path";
4
- import { afterEach, describe, expect, it, vi } from "vitest";
5
- const tempDirs = [];
6
- function makeTempDir(prefix) {
7
- const dir = fs.mkdtempSync(path.join(os.tmpdir(), prefix));
8
- tempDirs.push(dir);
9
- return dir;
10
- }
11
- async function importScheduleModule(options = {}) {
12
- vi.resetModules();
13
- vi.doUnmock("os");
14
- vi.doUnmock("child_process");
15
- if (options.home) {
16
- vi.doMock("os", async () => {
17
- const actual = await vi.importActual("os");
18
- return {
19
- ...actual,
20
- homedir: () => options.home,
21
- };
22
- });
23
- }
24
- if (options.spawnMock) {
25
- vi.doMock("child_process", async () => {
26
- const actual = await vi.importActual("child_process");
27
- return {
28
- ...actual,
29
- spawn: options.spawnMock,
30
- };
31
- });
32
- }
33
- return import("./schedule.js");
34
- }
35
- afterEach(() => {
36
- for (const dir of tempDirs.splice(0)) {
37
- fs.rmSync(dir, { recursive: true, force: true, maxRetries: 10, retryDelay: 50 });
38
- }
39
- vi.restoreAllMocks();
40
- vi.resetModules();
41
- vi.doUnmock("os");
42
- vi.doUnmock("child_process");
43
- });
44
- describe("schedule helpers", () => {
45
- it("validates cron expressions and matches dates", async () => {
46
- const mod = await importScheduleModule();
47
- expect(mod.isValidCron("*/15 9-17 * * 1-5")).toBe(true);
48
- expect(mod.isValidCron("0 9 * *")).toBe(false);
49
- expect(mod.isValidCron("61 9 * * *")).toBe(false);
50
- expect(mod.toScheduleId("Daily Security Scan!")).toBe("daily-security-scan");
51
- expect(mod.toScheduleId("..")).toBe("");
52
- expect(mod.toScheduleId(".")).toBe("");
53
- expect(mod.toScheduleId("../../../etc")).toBe("etc");
54
- expect(mod.toScheduleId("legit.name")).toBe("legit-name");
55
- expect(() => mod.getScheduleLogDir("..")).toThrow("path traversal");
56
- expect(() => mod.getScheduleLogDir("../..")).toThrow("path traversal");
57
- const matchingDate = new Date("2026-03-25T09:30:00");
58
- const nonMatchingDate = new Date("2026-03-29T09:30:00");
59
- expect(mod.cronMatchesDate("30 9 * * 1-5", matchingDate)).toBe(true);
60
- expect(mod.cronMatchesDate("30 9 * * 1-5", nonMatchingDate)).toBe(false);
61
- expect(mod.cronMatchesDate("*/10 * * * *", new Date("2026-03-25T09:40:00"))).toBe(true);
62
- expect(mod.isValidCron("0 9 * * 5-7")).toBe(true);
63
- const friday = new Date("2026-03-27T09:00:00");
64
- const sunday = new Date("2026-03-29T09:00:00");
65
- const monday = new Date("2026-03-30T09:00:00");
66
- expect(mod.cronMatchesDate("0 9 * * 5-7", friday)).toBe(true);
67
- expect(mod.cronMatchesDate("0 9 * * 5-7", sunday)).toBe(true);
68
- expect(mod.cronMatchesDate("0 9 * * 5-7", monday)).toBe(false);
69
- });
70
- it("creates, lists, and removes recurring schedules under ~/.muonroi-cli/schedules", async () => {
71
- const home = makeTempDir("muonroi-schedule-home-");
72
- const cwd = makeTempDir("muonroi-schedule-cwd-");
73
- const mod = await importScheduleModule({ home });
74
- const manager = new mod.ScheduleManager(() => cwd, () => "muonroi-test-model");
75
- const name = `Daily Security Scan ${path.basename(home)}`;
76
- const id = mod.toScheduleId(name);
77
- const result = await manager.create({
78
- name,
79
- instruction: "Scan the repo for security issues.",
80
- cron: "0 9 * * 1-5",
81
- });
82
- expect(result.startedPid).toBeNull();
83
- expect(result.schedule).toMatchObject({
84
- id,
85
- model: "muonroi-test-model",
86
- directory: cwd,
87
- cron: "0 9 * * 1-5",
88
- enabled: true,
89
- });
90
- const recordPath = mod.getScheduleRecordPath(id);
91
- expect(fs.existsSync(recordPath)).toBe(true);
92
- const listed = await manager.list();
93
- expect(listed.some((schedule) => schedule.id === id)).toBe(true);
94
- const removed = await manager.remove(id);
95
- expect(removed?.name).toBe(name);
96
- const afterRemove = await manager.list();
97
- expect(afterRemove.some((schedule) => schedule.id === id)).toBe(false);
98
- });
99
- it("builds headless CLI args for scheduled runs", async () => {
100
- const mod = await importScheduleModule();
101
- expect(mod.buildHeadlessCliArgs({
102
- directory: "/repo",
103
- instruction: "Summarize the repository status.",
104
- model: "muonroi-test-model",
105
- maxToolRounds: 123,
106
- })).toEqual([
107
- "--directory",
108
- "/repo",
109
- "--prompt",
110
- "Summarize the repository status.",
111
- "--model",
112
- "muonroi-test-model",
113
- "--max-tool-rounds",
114
- "123",
115
- ]);
116
- });
117
- });
118
- //# sourceMappingURL=schedule.test.js.map
@@ -1 +0,0 @@
1
- export {};
@@ -1,43 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { snapshotFromTodoWriteArgs } from "./todo-write-snapshot.js";
3
- function args(todos) {
4
- return JSON.stringify({ todos });
5
- }
6
- describe("snapshotFromTodoWriteArgs", () => {
7
- it("returns null for unparseable JSON", () => {
8
- expect(snapshotFromTodoWriteArgs("not-json")).toBeNull();
9
- });
10
- it("returns null when todos is missing or empty", () => {
11
- expect(snapshotFromTodoWriteArgs("{}")).toBeNull();
12
- expect(snapshotFromTodoWriteArgs(args([]))).toBeNull();
13
- });
14
- it("parses a well-formed list and computes counts", () => {
15
- const snap = snapshotFromTodoWriteArgs(args([
16
- { id: "1", subject: "Write tests", status: "completed" },
17
- { id: "2", subject: "Wire UI", status: "in_progress", activeForm: "Wiring UI" },
18
- { id: "3", subject: "Ship", status: "pending" },
19
- ]));
20
- expect(snap).not.toBeNull();
21
- expect(snap.items).toHaveLength(3);
22
- expect(snap.items[1].activeForm).toBe("Wiring UI");
23
- expect(snap.counts).toMatchObject({ completed: 1, inProgress: 1, pending: 1, total: 3 });
24
- });
25
- it("coerces unknown status to 'pending'", () => {
26
- const snap = snapshotFromTodoWriteArgs(args([{ id: "1", subject: "x", status: "weird" }]));
27
- expect(snap.items[0].status).toBe("pending");
28
- });
29
- it("drops items missing a subject (preserves the rest)", () => {
30
- const snap = snapshotFromTodoWriteArgs(args([
31
- { id: "1", subject: "Keep me", status: "pending" },
32
- { id: "2", status: "pending" }, // no subject → dropped
33
- { id: "3", subject: " ", status: "pending" }, // blank subject → dropped
34
- ]));
35
- expect(snap.items).toHaveLength(1);
36
- expect(snap.items[0].subject).toBe("Keep me");
37
- });
38
- it("assigns synthetic ids when missing", () => {
39
- const snap = snapshotFromTodoWriteArgs(args([{ subject: "no id here", status: "pending" }]));
40
- expect(snap.items[0].id).toBe("t-0");
41
- });
42
- });
43
- //# sourceMappingURL=todo-write-snapshot.test.js.map
@@ -1 +0,0 @@
1
- export {};