@memnexus-ai/mx-agent-cli 0.1.296-next.7 → 0.1.297

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 (736) hide show
  1. package/dist/commands/create.d.ts +36 -0
  2. package/dist/commands/create.d.ts.map +1 -1
  3. package/dist/commands/create.js +85 -8
  4. package/dist/commands/create.js.map +1 -1
  5. package/dist/lib/templates.d.ts +1 -1
  6. package/dist/lib/templates.d.ts.map +1 -1
  7. package/dist/lib/templates.js +39 -3
  8. package/dist/lib/templates.js.map +1 -1
  9. package/dist/standards/decision-request.md +6 -57
  10. package/dist/standards/po-communication-standard.md +0 -34
  11. package/dist/standards/report-format.md +0 -90
  12. package/dist/standards/writing-standard.md +0 -312
  13. package/package.json +3 -1
  14. package/dist/__tests__/agent-attribution.test.d.ts +0 -16
  15. package/dist/__tests__/agent-attribution.test.d.ts.map +0 -1
  16. package/dist/__tests__/agent-attribution.test.js +0 -250
  17. package/dist/__tests__/agent-attribution.test.js.map +0 -1
  18. package/dist/__tests__/agents-md-canonicalization.test.d.ts +0 -23
  19. package/dist/__tests__/agents-md-canonicalization.test.d.ts.map +0 -1
  20. package/dist/__tests__/agents-md-canonicalization.test.js +0 -319
  21. package/dist/__tests__/agents-md-canonicalization.test.js.map +0 -1
  22. package/dist/__tests__/behavioral-compliance.test.d.ts +0 -8
  23. package/dist/__tests__/behavioral-compliance.test.d.ts.map +0 -1
  24. package/dist/__tests__/behavioral-compliance.test.js +0 -226
  25. package/dist/__tests__/behavioral-compliance.test.js.map +0 -1
  26. package/dist/__tests__/behavioral-extraction.test.d.ts +0 -12
  27. package/dist/__tests__/behavioral-extraction.test.d.ts.map +0 -1
  28. package/dist/__tests__/behavioral-extraction.test.js +0 -330
  29. package/dist/__tests__/behavioral-extraction.test.js.map +0 -1
  30. package/dist/__tests__/behavioral-git-read.test.d.ts +0 -21
  31. package/dist/__tests__/behavioral-git-read.test.d.ts.map +0 -1
  32. package/dist/__tests__/behavioral-git-read.test.js +0 -955
  33. package/dist/__tests__/behavioral-git-read.test.js.map +0 -1
  34. package/dist/__tests__/behavioral-injection.test.d.ts +0 -13
  35. package/dist/__tests__/behavioral-injection.test.d.ts.map +0 -1
  36. package/dist/__tests__/behavioral-injection.test.js +0 -384
  37. package/dist/__tests__/behavioral-injection.test.js.map +0 -1
  38. package/dist/__tests__/binary-smoke.test.d.ts +0 -12
  39. package/dist/__tests__/binary-smoke.test.d.ts.map +0 -1
  40. package/dist/__tests__/binary-smoke.test.js +0 -88
  41. package/dist/__tests__/binary-smoke.test.js.map +0 -1
  42. package/dist/__tests__/bootstrap-behavioral-contract.test.d.ts +0 -18
  43. package/dist/__tests__/bootstrap-behavioral-contract.test.d.ts.map +0 -1
  44. package/dist/__tests__/bootstrap-behavioral-contract.test.js +0 -104
  45. package/dist/__tests__/bootstrap-behavioral-contract.test.js.map +0 -1
  46. package/dist/__tests__/bundle-config.test.d.ts +0 -18
  47. package/dist/__tests__/bundle-config.test.d.ts.map +0 -1
  48. package/dist/__tests__/bundle-config.test.js +0 -123
  49. package/dist/__tests__/bundle-config.test.js.map +0 -1
  50. package/dist/__tests__/catalog-interaction.test.d.ts +0 -25
  51. package/dist/__tests__/catalog-interaction.test.d.ts.map +0 -1
  52. package/dist/__tests__/catalog-interaction.test.js +0 -269
  53. package/dist/__tests__/catalog-interaction.test.js.map +0 -1
  54. package/dist/__tests__/catalog-named-memories.test.d.ts +0 -2
  55. package/dist/__tests__/catalog-named-memories.test.d.ts.map +0 -1
  56. package/dist/__tests__/catalog-named-memories.test.js +0 -204
  57. package/dist/__tests__/catalog-named-memories.test.js.map +0 -1
  58. package/dist/__tests__/catalog-origin-main.test.d.ts +0 -15
  59. package/dist/__tests__/catalog-origin-main.test.d.ts.map +0 -1
  60. package/dist/__tests__/catalog-origin-main.test.js +0 -305
  61. package/dist/__tests__/catalog-origin-main.test.js.map +0 -1
  62. package/dist/__tests__/catalog.test.d.ts +0 -2
  63. package/dist/__tests__/catalog.test.d.ts.map +0 -1
  64. package/dist/__tests__/catalog.test.js +0 -131
  65. package/dist/__tests__/catalog.test.js.map +0 -1
  66. package/dist/__tests__/claude-local-sanitizer.test.d.ts +0 -24
  67. package/dist/__tests__/claude-local-sanitizer.test.d.ts.map +0 -1
  68. package/dist/__tests__/claude-local-sanitizer.test.js +0 -906
  69. package/dist/__tests__/claude-local-sanitizer.test.js.map +0 -1
  70. package/dist/__tests__/claude-md-compose.test.d.ts +0 -17
  71. package/dist/__tests__/claude-md-compose.test.d.ts.map +0 -1
  72. package/dist/__tests__/claude-md-compose.test.js +0 -119
  73. package/dist/__tests__/claude-md-compose.test.js.map +0 -1
  74. package/dist/__tests__/claude-sync.test.d.ts +0 -2
  75. package/dist/__tests__/claude-sync.test.d.ts.map +0 -1
  76. package/dist/__tests__/claude-sync.test.js +0 -571
  77. package/dist/__tests__/claude-sync.test.js.map +0 -1
  78. package/dist/__tests__/cli-build-integration.test.d.ts +0 -2
  79. package/dist/__tests__/cli-build-integration.test.d.ts.map +0 -1
  80. package/dist/__tests__/cli-build-integration.test.js +0 -64
  81. package/dist/__tests__/cli-build-integration.test.js.map +0 -1
  82. package/dist/__tests__/cli-build.test.d.ts +0 -2
  83. package/dist/__tests__/cli-build.test.d.ts.map +0 -1
  84. package/dist/__tests__/cli-build.test.js +0 -640
  85. package/dist/__tests__/cli-build.test.js.map +0 -1
  86. package/dist/__tests__/codex-agent-gate.test.d.ts +0 -2
  87. package/dist/__tests__/codex-agent-gate.test.d.ts.map +0 -1
  88. package/dist/__tests__/codex-agent-gate.test.js +0 -480
  89. package/dist/__tests__/codex-agent-gate.test.js.map +0 -1
  90. package/dist/__tests__/codex-deploy-config.test.d.ts +0 -2
  91. package/dist/__tests__/codex-deploy-config.test.d.ts.map +0 -1
  92. package/dist/__tests__/codex-deploy-config.test.js +0 -1230
  93. package/dist/__tests__/codex-deploy-config.test.js.map +0 -1
  94. package/dist/__tests__/codex-trust-keys.test.d.ts +0 -2
  95. package/dist/__tests__/codex-trust-keys.test.d.ts.map +0 -1
  96. package/dist/__tests__/codex-trust-keys.test.js +0 -731
  97. package/dist/__tests__/codex-trust-keys.test.js.map +0 -1
  98. package/dist/__tests__/codex-write-race.test.d.ts +0 -2
  99. package/dist/__tests__/codex-write-race.test.d.ts.map +0 -1
  100. package/dist/__tests__/codex-write-race.test.js +0 -2253
  101. package/dist/__tests__/codex-write-race.test.js.map +0 -1
  102. package/dist/__tests__/completion-rows-discriminate.test.d.ts +0 -20
  103. package/dist/__tests__/completion-rows-discriminate.test.d.ts.map +0 -1
  104. package/dist/__tests__/completion-rows-discriminate.test.js +0 -481
  105. package/dist/__tests__/completion-rows-discriminate.test.js.map +0 -1
  106. package/dist/__tests__/config-command.test.d.ts +0 -9
  107. package/dist/__tests__/config-command.test.d.ts.map +0 -1
  108. package/dist/__tests__/config-command.test.js +0 -75
  109. package/dist/__tests__/config-command.test.js.map +0 -1
  110. package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts +0 -2
  111. package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts.map +0 -1
  112. package/dist/__tests__/config-fidelity-archived-symlinks.test.js +0 -127
  113. package/dist/__tests__/config-fidelity-archived-symlinks.test.js.map +0 -1
  114. package/dist/__tests__/config-fidelity-display.test.d.ts +0 -2
  115. package/dist/__tests__/config-fidelity-display.test.d.ts.map +0 -1
  116. package/dist/__tests__/config-fidelity-display.test.js +0 -77
  117. package/dist/__tests__/config-fidelity-display.test.js.map +0 -1
  118. package/dist/__tests__/config-fidelity-unreadable-fixture.d.ts +0 -32
  119. package/dist/__tests__/config-fidelity-unreadable-fixture.d.ts.map +0 -1
  120. package/dist/__tests__/config-fidelity-unreadable-fixture.js +0 -37
  121. package/dist/__tests__/config-fidelity-unreadable-fixture.js.map +0 -1
  122. package/dist/__tests__/config-fidelity.test.d.ts +0 -16
  123. package/dist/__tests__/config-fidelity.test.d.ts.map +0 -1
  124. package/dist/__tests__/config-fidelity.test.js +0 -2679
  125. package/dist/__tests__/config-fidelity.test.js.map +0 -1
  126. package/dist/__tests__/config-generation-gate.test.d.ts +0 -46
  127. package/dist/__tests__/config-generation-gate.test.d.ts.map +0 -1
  128. package/dist/__tests__/config-generation-gate.test.js +0 -435
  129. package/dist/__tests__/config-generation-gate.test.js.map +0 -1
  130. package/dist/__tests__/config-generation.test.d.ts +0 -7
  131. package/dist/__tests__/config-generation.test.d.ts.map +0 -1
  132. package/dist/__tests__/config-generation.test.js +0 -141
  133. package/dist/__tests__/config-generation.test.js.map +0 -1
  134. package/dist/__tests__/config-sync.test.d.ts +0 -10
  135. package/dist/__tests__/config-sync.test.d.ts.map +0 -1
  136. package/dist/__tests__/config-sync.test.js +0 -268
  137. package/dist/__tests__/config-sync.test.js.map +0 -1
  138. package/dist/__tests__/coordination-401-production-wiring.test.d.ts +0 -19
  139. package/dist/__tests__/coordination-401-production-wiring.test.d.ts.map +0 -1
  140. package/dist/__tests__/coordination-401-production-wiring.test.js +0 -286
  141. package/dist/__tests__/coordination-401-production-wiring.test.js.map +0 -1
  142. package/dist/__tests__/coordination-401-recovery.test.d.ts +0 -22
  143. package/dist/__tests__/coordination-401-recovery.test.d.ts.map +0 -1
  144. package/dist/__tests__/coordination-401-recovery.test.js +0 -601
  145. package/dist/__tests__/coordination-401-recovery.test.js.map +0 -1
  146. package/dist/__tests__/coordination-brief-pin.test.d.ts +0 -20
  147. package/dist/__tests__/coordination-brief-pin.test.d.ts.map +0 -1
  148. package/dist/__tests__/coordination-brief-pin.test.js +0 -66
  149. package/dist/__tests__/coordination-brief-pin.test.js.map +0 -1
  150. package/dist/__tests__/coordination-brief.test.d.ts +0 -9
  151. package/dist/__tests__/coordination-brief.test.d.ts.map +0 -1
  152. package/dist/__tests__/coordination-brief.test.js +0 -290
  153. package/dist/__tests__/coordination-brief.test.js.map +0 -1
  154. package/dist/__tests__/coordination-client.test.d.ts +0 -9
  155. package/dist/__tests__/coordination-client.test.d.ts.map +0 -1
  156. package/dist/__tests__/coordination-client.test.js +0 -517
  157. package/dist/__tests__/coordination-client.test.js.map +0 -1
  158. package/dist/__tests__/coordination-command.test.d.ts +0 -9
  159. package/dist/__tests__/coordination-command.test.d.ts.map +0 -1
  160. package/dist/__tests__/coordination-command.test.js +0 -1082
  161. package/dist/__tests__/coordination-command.test.js.map +0 -1
  162. package/dist/__tests__/coordination-credential-endpoint.test.d.ts +0 -24
  163. package/dist/__tests__/coordination-credential-endpoint.test.d.ts.map +0 -1
  164. package/dist/__tests__/coordination-credential-endpoint.test.js +0 -1292
  165. package/dist/__tests__/coordination-credential-endpoint.test.js.map +0 -1
  166. package/dist/__tests__/coordination-expected-team.test.d.ts +0 -19
  167. package/dist/__tests__/coordination-expected-team.test.d.ts.map +0 -1
  168. package/dist/__tests__/coordination-expected-team.test.js +0 -423
  169. package/dist/__tests__/coordination-expected-team.test.js.map +0 -1
  170. package/dist/__tests__/coordination-fallback.test.d.ts +0 -9
  171. package/dist/__tests__/coordination-fallback.test.d.ts.map +0 -1
  172. package/dist/__tests__/coordination-fallback.test.js +0 -192
  173. package/dist/__tests__/coordination-fallback.test.js.map +0 -1
  174. package/dist/__tests__/coordination-file-guards.test.d.ts +0 -29
  175. package/dist/__tests__/coordination-file-guards.test.d.ts.map +0 -1
  176. package/dist/__tests__/coordination-file-guards.test.js +0 -380
  177. package/dist/__tests__/coordination-file-guards.test.js.map +0 -1
  178. package/dist/__tests__/coordination-history.test.d.ts +0 -8
  179. package/dist/__tests__/coordination-history.test.d.ts.map +0 -1
  180. package/dist/__tests__/coordination-history.test.js +0 -447
  181. package/dist/__tests__/coordination-history.test.js.map +0 -1
  182. package/dist/__tests__/coordination-memory.test.d.ts +0 -14
  183. package/dist/__tests__/coordination-memory.test.d.ts.map +0 -1
  184. package/dist/__tests__/coordination-memory.test.js +0 -401
  185. package/dist/__tests__/coordination-memory.test.js.map +0 -1
  186. package/dist/__tests__/coordination-mode.test.d.ts +0 -13
  187. package/dist/__tests__/coordination-mode.test.d.ts.map +0 -1
  188. package/dist/__tests__/coordination-mode.test.js +0 -180
  189. package/dist/__tests__/coordination-mode.test.js.map +0 -1
  190. package/dist/__tests__/coordination-plain-shell-commands.test.d.ts +0 -22
  191. package/dist/__tests__/coordination-plain-shell-commands.test.d.ts.map +0 -1
  192. package/dist/__tests__/coordination-plain-shell-commands.test.js +0 -1875
  193. package/dist/__tests__/coordination-plain-shell-commands.test.js.map +0 -1
  194. package/dist/__tests__/coordination-provision.test.d.ts +0 -12
  195. package/dist/__tests__/coordination-provision.test.d.ts.map +0 -1
  196. package/dist/__tests__/coordination-provision.test.js +0 -103
  197. package/dist/__tests__/coordination-provision.test.js.map +0 -1
  198. package/dist/__tests__/coordination-render.test.d.ts +0 -9
  199. package/dist/__tests__/coordination-render.test.d.ts.map +0 -1
  200. package/dist/__tests__/coordination-render.test.js +0 -335
  201. package/dist/__tests__/coordination-render.test.js.map +0 -1
  202. package/dist/__tests__/coordination-setup.test.d.ts +0 -6
  203. package/dist/__tests__/coordination-setup.test.d.ts.map +0 -1
  204. package/dist/__tests__/coordination-setup.test.js +0 -448
  205. package/dist/__tests__/coordination-setup.test.js.map +0 -1
  206. package/dist/__tests__/coordination-status-plain-shell.test.d.ts +0 -19
  207. package/dist/__tests__/coordination-status-plain-shell.test.d.ts.map +0 -1
  208. package/dist/__tests__/coordination-status-plain-shell.test.js +0 -332
  209. package/dist/__tests__/coordination-status-plain-shell.test.js.map +0 -1
  210. package/dist/__tests__/coordination-status-registration.test.d.ts +0 -16
  211. package/dist/__tests__/coordination-status-registration.test.d.ts.map +0 -1
  212. package/dist/__tests__/coordination-status-registration.test.js +0 -480
  213. package/dist/__tests__/coordination-status-registration.test.js.map +0 -1
  214. package/dist/__tests__/coordination-token-multitenant.test.d.ts +0 -11
  215. package/dist/__tests__/coordination-token-multitenant.test.d.ts.map +0 -1
  216. package/dist/__tests__/coordination-token-multitenant.test.js +0 -106
  217. package/dist/__tests__/coordination-token-multitenant.test.js.map +0 -1
  218. package/dist/__tests__/coordination-token.test.d.ts +0 -11
  219. package/dist/__tests__/coordination-token.test.d.ts.map +0 -1
  220. package/dist/__tests__/coordination-token.test.js +0 -201
  221. package/dist/__tests__/coordination-token.test.js.map +0 -1
  222. package/dist/__tests__/coordination-wiring.test.d.ts +0 -11
  223. package/dist/__tests__/coordination-wiring.test.d.ts.map +0 -1
  224. package/dist/__tests__/coordination-wiring.test.js +0 -43
  225. package/dist/__tests__/coordination-wiring.test.js.map +0 -1
  226. package/dist/__tests__/creation-pr-class-check.test.d.ts +0 -17
  227. package/dist/__tests__/creation-pr-class-check.test.d.ts.map +0 -1
  228. package/dist/__tests__/creation-pr-class-check.test.js +0 -346
  229. package/dist/__tests__/creation-pr-class-check.test.js.map +0 -1
  230. package/dist/__tests__/decision-check.test.d.ts +0 -2
  231. package/dist/__tests__/decision-check.test.d.ts.map +0 -1
  232. package/dist/__tests__/decision-check.test.js +0 -105
  233. package/dist/__tests__/decision-check.test.js.map +0 -1
  234. package/dist/__tests__/digest-fail-closed.test.d.ts +0 -16
  235. package/dist/__tests__/digest-fail-closed.test.d.ts.map +0 -1
  236. package/dist/__tests__/digest-fail-closed.test.js +0 -248
  237. package/dist/__tests__/digest-fail-closed.test.js.map +0 -1
  238. package/dist/__tests__/digest-team-omission.test.d.ts +0 -15
  239. package/dist/__tests__/digest-team-omission.test.d.ts.map +0 -1
  240. package/dist/__tests__/digest-team-omission.test.js +0 -247
  241. package/dist/__tests__/digest-team-omission.test.js.map +0 -1
  242. package/dist/__tests__/doctor-config-fidelity.test.d.ts +0 -19
  243. package/dist/__tests__/doctor-config-fidelity.test.d.ts.map +0 -1
  244. package/dist/__tests__/doctor-config-fidelity.test.js +0 -324
  245. package/dist/__tests__/doctor-config-fidelity.test.js.map +0 -1
  246. package/dist/__tests__/doctor-framework-version.test.d.ts +0 -2
  247. package/dist/__tests__/doctor-framework-version.test.d.ts.map +0 -1
  248. package/dist/__tests__/doctor-framework-version.test.js +0 -146
  249. package/dist/__tests__/doctor-framework-version.test.js.map +0 -1
  250. package/dist/__tests__/doctor-worktree-path.test.d.ts +0 -17
  251. package/dist/__tests__/doctor-worktree-path.test.d.ts.map +0 -1
  252. package/dist/__tests__/doctor-worktree-path.test.js +0 -158
  253. package/dist/__tests__/doctor-worktree-path.test.js.map +0 -1
  254. package/dist/__tests__/doctor.test.d.ts +0 -20
  255. package/dist/__tests__/doctor.test.d.ts.map +0 -1
  256. package/dist/__tests__/doctor.test.js +0 -849
  257. package/dist/__tests__/doctor.test.js.map +0 -1
  258. package/dist/__tests__/event-shipper.test.d.ts +0 -16
  259. package/dist/__tests__/event-shipper.test.d.ts.map +0 -1
  260. package/dist/__tests__/event-shipper.test.js +0 -287
  261. package/dist/__tests__/event-shipper.test.js.map +0 -1
  262. package/dist/__tests__/fleet-data.test.d.ts +0 -2
  263. package/dist/__tests__/fleet-data.test.d.ts.map +0 -1
  264. package/dist/__tests__/fleet-data.test.js +0 -501
  265. package/dist/__tests__/fleet-data.test.js.map +0 -1
  266. package/dist/__tests__/fleet-devpod.test.d.ts +0 -12
  267. package/dist/__tests__/fleet-devpod.test.d.ts.map +0 -1
  268. package/dist/__tests__/fleet-devpod.test.js +0 -260
  269. package/dist/__tests__/fleet-devpod.test.js.map +0 -1
  270. package/dist/__tests__/fleet-tmux.test.d.ts +0 -2
  271. package/dist/__tests__/fleet-tmux.test.d.ts.map +0 -1
  272. package/dist/__tests__/fleet-tmux.test.js +0 -289
  273. package/dist/__tests__/fleet-tmux.test.js.map +0 -1
  274. package/dist/__tests__/fleet.test.d.ts +0 -16
  275. package/dist/__tests__/fleet.test.d.ts.map +0 -1
  276. package/dist/__tests__/fleet.test.js +0 -75
  277. package/dist/__tests__/fleet.test.js.map +0 -1
  278. package/dist/__tests__/generate-claude.test.d.ts +0 -18
  279. package/dist/__tests__/generate-claude.test.d.ts.map +0 -1
  280. package/dist/__tests__/generate-claude.test.js +0 -1015
  281. package/dist/__tests__/generate-claude.test.js.map +0 -1
  282. package/dist/__tests__/gh-remote.test.d.ts +0 -2
  283. package/dist/__tests__/gh-remote.test.d.ts.map +0 -1
  284. package/dist/__tests__/gh-remote.test.js +0 -136
  285. package/dist/__tests__/gh-remote.test.js.map +0 -1
  286. package/dist/__tests__/git-env.test.d.ts +0 -14
  287. package/dist/__tests__/git-env.test.d.ts.map +0 -1
  288. package/dist/__tests__/git-env.test.js +0 -131
  289. package/dist/__tests__/git-env.test.js.map +0 -1
  290. package/dist/__tests__/git-identity-isolation.test.d.ts +0 -33
  291. package/dist/__tests__/git-identity-isolation.test.d.ts.map +0 -1
  292. package/dist/__tests__/git-identity-isolation.test.js +0 -626
  293. package/dist/__tests__/git-identity-isolation.test.js.map +0 -1
  294. package/dist/__tests__/harness-extract.test.d.ts +0 -19
  295. package/dist/__tests__/harness-extract.test.d.ts.map +0 -1
  296. package/dist/__tests__/harness-extract.test.js +0 -566
  297. package/dist/__tests__/harness-extract.test.js.map +0 -1
  298. package/dist/__tests__/harness-wiring.test.d.ts +0 -16
  299. package/dist/__tests__/harness-wiring.test.d.ts.map +0 -1
  300. package/dist/__tests__/harness-wiring.test.js +0 -469
  301. package/dist/__tests__/harness-wiring.test.js.map +0 -1
  302. package/dist/__tests__/hook-completeness.test.d.ts +0 -13
  303. package/dist/__tests__/hook-completeness.test.d.ts.map +0 -1
  304. package/dist/__tests__/hook-completeness.test.js +0 -238
  305. package/dist/__tests__/hook-completeness.test.js.map +0 -1
  306. package/dist/__tests__/hook-heal.test.d.ts +0 -8
  307. package/dist/__tests__/hook-heal.test.d.ts.map +0 -1
  308. package/dist/__tests__/hook-heal.test.js +0 -156
  309. package/dist/__tests__/hook-heal.test.js.map +0 -1
  310. package/dist/__tests__/human-turn-classifier.test.d.ts +0 -17
  311. package/dist/__tests__/human-turn-classifier.test.d.ts.map +0 -1
  312. package/dist/__tests__/human-turn-classifier.test.js +0 -311
  313. package/dist/__tests__/human-turn-classifier.test.js.map +0 -1
  314. package/dist/__tests__/init-coordination-url.test.d.ts +0 -11
  315. package/dist/__tests__/init-coordination-url.test.d.ts.map +0 -1
  316. package/dist/__tests__/init-coordination-url.test.js +0 -217
  317. package/dist/__tests__/init-coordination-url.test.js.map +0 -1
  318. package/dist/__tests__/isolation-probe.test.d.ts +0 -15
  319. package/dist/__tests__/isolation-probe.test.d.ts.map +0 -1
  320. package/dist/__tests__/isolation-probe.test.js +0 -611
  321. package/dist/__tests__/isolation-probe.test.js.map +0 -1
  322. package/dist/__tests__/leader-lock.test.d.ts +0 -12
  323. package/dist/__tests__/leader-lock.test.d.ts.map +0 -1
  324. package/dist/__tests__/leader-lock.test.js +0 -293
  325. package/dist/__tests__/leader-lock.test.js.map +0 -1
  326. package/dist/__tests__/memory-archive-checks.test.d.ts +0 -22
  327. package/dist/__tests__/memory-archive-checks.test.d.ts.map +0 -1
  328. package/dist/__tests__/memory-archive-checks.test.js +0 -748
  329. package/dist/__tests__/memory-archive-checks.test.js.map +0 -1
  330. package/dist/__tests__/memory-archive-prep.test.d.ts +0 -8
  331. package/dist/__tests__/memory-archive-prep.test.d.ts.map +0 -1
  332. package/dist/__tests__/memory-archive-prep.test.js +0 -524
  333. package/dist/__tests__/memory-archive-prep.test.js.map +0 -1
  334. package/dist/__tests__/memory-autocreate.test.d.ts +0 -10
  335. package/dist/__tests__/memory-autocreate.test.d.ts.map +0 -1
  336. package/dist/__tests__/memory-autocreate.test.js +0 -709
  337. package/dist/__tests__/memory-autocreate.test.js.map +0 -1
  338. package/dist/__tests__/memory-log-result.test.d.ts +0 -13
  339. package/dist/__tests__/memory-log-result.test.d.ts.map +0 -1
  340. package/dist/__tests__/memory-log-result.test.js +0 -149
  341. package/dist/__tests__/memory-log-result.test.js.map +0 -1
  342. package/dist/__tests__/memory-named-exists.test.d.ts +0 -16
  343. package/dist/__tests__/memory-named-exists.test.d.ts.map +0 -1
  344. package/dist/__tests__/memory-named-exists.test.js +0 -288
  345. package/dist/__tests__/memory-named-exists.test.js.map +0 -1
  346. package/dist/__tests__/message-bus.test.d.ts +0 -10
  347. package/dist/__tests__/message-bus.test.d.ts.map +0 -1
  348. package/dist/__tests__/message-bus.test.js +0 -526
  349. package/dist/__tests__/message-bus.test.js.map +0 -1
  350. package/dist/__tests__/monitor.test.d.ts +0 -6
  351. package/dist/__tests__/monitor.test.d.ts.map +0 -1
  352. package/dist/__tests__/monitor.test.js +0 -458
  353. package/dist/__tests__/monitor.test.js.map +0 -1
  354. package/dist/__tests__/mx-agent-cli-pin-validation.test.d.ts +0 -2
  355. package/dist/__tests__/mx-agent-cli-pin-validation.test.d.ts.map +0 -1
  356. package/dist/__tests__/mx-agent-cli-pin-validation.test.js +0 -232
  357. package/dist/__tests__/mx-agent-cli-pin-validation.test.js.map +0 -1
  358. package/dist/__tests__/mx-agent-cli-version-pin.test.d.ts +0 -2
  359. package/dist/__tests__/mx-agent-cli-version-pin.test.d.ts.map +0 -1
  360. package/dist/__tests__/mx-agent-cli-version-pin.test.js +0 -236
  361. package/dist/__tests__/mx-agent-cli-version-pin.test.js.map +0 -1
  362. package/dist/__tests__/new-project-first-team.test.d.ts +0 -15
  363. package/dist/__tests__/new-project-first-team.test.d.ts.map +0 -1
  364. package/dist/__tests__/new-project-first-team.test.js +0 -444
  365. package/dist/__tests__/new-project-first-team.test.js.map +0 -1
  366. package/dist/__tests__/otel-env.test.d.ts +0 -2
  367. package/dist/__tests__/otel-env.test.d.ts.map +0 -1
  368. package/dist/__tests__/otel-env.test.js +0 -127
  369. package/dist/__tests__/otel-env.test.js.map +0 -1
  370. package/dist/__tests__/pager-fail-closed.test.d.ts +0 -19
  371. package/dist/__tests__/pager-fail-closed.test.d.ts.map +0 -1
  372. package/dist/__tests__/pager-fail-closed.test.js +0 -229
  373. package/dist/__tests__/pager-fail-closed.test.js.map +0 -1
  374. package/dist/__tests__/pr-set-body.test.d.ts +0 -29
  375. package/dist/__tests__/pr-set-body.test.d.ts.map +0 -1
  376. package/dist/__tests__/pr-set-body.test.js +0 -314
  377. package/dist/__tests__/pr-set-body.test.js.map +0 -1
  378. package/dist/__tests__/prior-sync-failure.test.d.ts +0 -2
  379. package/dist/__tests__/prior-sync-failure.test.d.ts.map +0 -1
  380. package/dist/__tests__/prior-sync-failure.test.js +0 -81
  381. package/dist/__tests__/prior-sync-failure.test.js.map +0 -1
  382. package/dist/__tests__/project-config.test.d.ts +0 -2
  383. package/dist/__tests__/project-config.test.d.ts.map +0 -1
  384. package/dist/__tests__/project-config.test.js +0 -458
  385. package/dist/__tests__/project-config.test.js.map +0 -1
  386. package/dist/__tests__/provision-behavioral-contract.test.d.ts +0 -13
  387. package/dist/__tests__/provision-behavioral-contract.test.d.ts.map +0 -1
  388. package/dist/__tests__/provision-behavioral-contract.test.js +0 -548
  389. package/dist/__tests__/provision-behavioral-contract.test.js.map +0 -1
  390. package/dist/__tests__/provision-catalog-precondition.test.d.ts +0 -26
  391. package/dist/__tests__/provision-catalog-precondition.test.d.ts.map +0 -1
  392. package/dist/__tests__/provision-catalog-precondition.test.js +0 -622
  393. package/dist/__tests__/provision-catalog-precondition.test.js.map +0 -1
  394. package/dist/__tests__/provision-completion-rows.test.d.ts +0 -17
  395. package/dist/__tests__/provision-completion-rows.test.d.ts.map +0 -1
  396. package/dist/__tests__/provision-completion-rows.test.js +0 -3473
  397. package/dist/__tests__/provision-completion-rows.test.js.map +0 -1
  398. package/dist/__tests__/provision-copy-containment.test.d.ts +0 -19
  399. package/dist/__tests__/provision-copy-containment.test.d.ts.map +0 -1
  400. package/dist/__tests__/provision-copy-containment.test.js +0 -187
  401. package/dist/__tests__/provision-copy-containment.test.js.map +0 -1
  402. package/dist/__tests__/provision-identity-gate.test.d.ts +0 -20
  403. package/dist/__tests__/provision-identity-gate.test.d.ts.map +0 -1
  404. package/dist/__tests__/provision-identity-gate.test.js +0 -602
  405. package/dist/__tests__/provision-identity-gate.test.js.map +0 -1
  406. package/dist/__tests__/provision-resume.test.d.ts +0 -26
  407. package/dist/__tests__/provision-resume.test.d.ts.map +0 -1
  408. package/dist/__tests__/provision-resume.test.js +0 -1344
  409. package/dist/__tests__/provision-resume.test.js.map +0 -1
  410. package/dist/__tests__/provision-roleguide-anchors.test.d.ts +0 -27
  411. package/dist/__tests__/provision-roleguide-anchors.test.d.ts.map +0 -1
  412. package/dist/__tests__/provision-roleguide-anchors.test.js +0 -747
  413. package/dist/__tests__/provision-roleguide-anchors.test.js.map +0 -1
  414. package/dist/__tests__/provision-row12-stub-server.test.d.ts +0 -21
  415. package/dist/__tests__/provision-row12-stub-server.test.d.ts.map +0 -1
  416. package/dist/__tests__/provision-row12-stub-server.test.js +0 -264
  417. package/dist/__tests__/provision-row12-stub-server.test.js.map +0 -1
  418. package/dist/__tests__/provision-skeleton-fill.test.d.ts +0 -16
  419. package/dist/__tests__/provision-skeleton-fill.test.d.ts.map +0 -1
  420. package/dist/__tests__/provision-skeleton-fill.test.js +0 -490
  421. package/dist/__tests__/provision-skeleton-fill.test.js.map +0 -1
  422. package/dist/__tests__/provision-step8-commit.test.d.ts +0 -40
  423. package/dist/__tests__/provision-step8-commit.test.d.ts.map +0 -1
  424. package/dist/__tests__/provision-step8-commit.test.js +0 -529
  425. package/dist/__tests__/provision-step8-commit.test.js.map +0 -1
  426. package/dist/__tests__/provision-teambuilder-flow.test.d.ts +0 -22
  427. package/dist/__tests__/provision-teambuilder-flow.test.d.ts.map +0 -1
  428. package/dist/__tests__/provision-teambuilder-flow.test.js +0 -253
  429. package/dist/__tests__/provision-teambuilder-flow.test.js.map +0 -1
  430. package/dist/__tests__/provision-write-integrity.test.d.ts +0 -18
  431. package/dist/__tests__/provision-write-integrity.test.d.ts.map +0 -1
  432. package/dist/__tests__/provision-write-integrity.test.js +0 -141
  433. package/dist/__tests__/provision-write-integrity.test.js.map +0 -1
  434. package/dist/__tests__/repo-guard-wiring.test.d.ts +0 -21
  435. package/dist/__tests__/repo-guard-wiring.test.d.ts.map +0 -1
  436. package/dist/__tests__/repo-guard-wiring.test.js +0 -638
  437. package/dist/__tests__/repo-guard-wiring.test.js.map +0 -1
  438. package/dist/__tests__/report-format.test.d.ts +0 -2
  439. package/dist/__tests__/report-format.test.d.ts.map +0 -1
  440. package/dist/__tests__/report-format.test.js +0 -219
  441. package/dist/__tests__/report-format.test.js.map +0 -1
  442. package/dist/__tests__/row15-detail-sanitizer.test.d.ts +0 -20
  443. package/dist/__tests__/row15-detail-sanitizer.test.d.ts.map +0 -1
  444. package/dist/__tests__/row15-detail-sanitizer.test.js +0 -61
  445. package/dist/__tests__/row15-detail-sanitizer.test.js.map +0 -1
  446. package/dist/__tests__/rows-9-10-zero-remotes.test.d.ts +0 -32
  447. package/dist/__tests__/rows-9-10-zero-remotes.test.d.ts.map +0 -1
  448. package/dist/__tests__/rows-9-10-zero-remotes.test.js +0 -203
  449. package/dist/__tests__/rows-9-10-zero-remotes.test.js.map +0 -1
  450. package/dist/__tests__/runtime-claude-adapter.test.d.ts +0 -2
  451. package/dist/__tests__/runtime-claude-adapter.test.d.ts.map +0 -1
  452. package/dist/__tests__/runtime-claude-adapter.test.js +0 -70
  453. package/dist/__tests__/runtime-claude-adapter.test.js.map +0 -1
  454. package/dist/__tests__/runtime-codex-adapter.test.d.ts +0 -2
  455. package/dist/__tests__/runtime-codex-adapter.test.d.ts.map +0 -1
  456. package/dist/__tests__/runtime-codex-adapter.test.js +0 -558
  457. package/dist/__tests__/runtime-codex-adapter.test.js.map +0 -1
  458. package/dist/__tests__/runtime-codex-config.test.d.ts +0 -2
  459. package/dist/__tests__/runtime-codex-config.test.d.ts.map +0 -1
  460. package/dist/__tests__/runtime-codex-config.test.js +0 -1421
  461. package/dist/__tests__/runtime-codex-config.test.js.map +0 -1
  462. package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts +0 -2
  463. package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts.map +0 -1
  464. package/dist/__tests__/runtime-codex-gateway-pilot.test.js +0 -309
  465. package/dist/__tests__/runtime-codex-gateway-pilot.test.js.map +0 -1
  466. package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts +0 -2
  467. package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts.map +0 -1
  468. package/dist/__tests__/runtime-codex-gateway-provider.test.js +0 -163
  469. package/dist/__tests__/runtime-codex-gateway-provider.test.js.map +0 -1
  470. package/dist/__tests__/runtime-codex-guard-proof.test.d.ts +0 -2
  471. package/dist/__tests__/runtime-codex-guard-proof.test.d.ts.map +0 -1
  472. package/dist/__tests__/runtime-codex-guard-proof.test.js +0 -822
  473. package/dist/__tests__/runtime-codex-guard-proof.test.js.map +0 -1
  474. package/dist/__tests__/runtime-codex-version-pin.test.d.ts +0 -2
  475. package/dist/__tests__/runtime-codex-version-pin.test.d.ts.map +0 -1
  476. package/dist/__tests__/runtime-codex-version-pin.test.js +0 -86
  477. package/dist/__tests__/runtime-codex-version-pin.test.js.map +0 -1
  478. package/dist/__tests__/runtime-identity.test.d.ts +0 -2
  479. package/dist/__tests__/runtime-identity.test.d.ts.map +0 -1
  480. package/dist/__tests__/runtime-identity.test.js +0 -117
  481. package/dist/__tests__/runtime-identity.test.js.map +0 -1
  482. package/dist/__tests__/runtime-resolve.test.d.ts +0 -2
  483. package/dist/__tests__/runtime-resolve.test.d.ts.map +0 -1
  484. package/dist/__tests__/runtime-resolve.test.js +0 -172
  485. package/dist/__tests__/runtime-resolve.test.js.map +0 -1
  486. package/dist/__tests__/security-posture.test.d.ts +0 -8
  487. package/dist/__tests__/security-posture.test.d.ts.map +0 -1
  488. package/dist/__tests__/security-posture.test.js +0 -82
  489. package/dist/__tests__/security-posture.test.js.map +0 -1
  490. package/dist/__tests__/session-model.test.d.ts +0 -2
  491. package/dist/__tests__/session-model.test.d.ts.map +0 -1
  492. package/dist/__tests__/session-model.test.js +0 -74
  493. package/dist/__tests__/session-model.test.js.map +0 -1
  494. package/dist/__tests__/session-pause-provisioning.test.d.ts +0 -19
  495. package/dist/__tests__/session-pause-provisioning.test.d.ts.map +0 -1
  496. package/dist/__tests__/session-pause-provisioning.test.js +0 -115
  497. package/dist/__tests__/session-pause-provisioning.test.js.map +0 -1
  498. package/dist/__tests__/session-reclamation.test.d.ts +0 -15
  499. package/dist/__tests__/session-reclamation.test.d.ts.map +0 -1
  500. package/dist/__tests__/session-reclamation.test.js +0 -73
  501. package/dist/__tests__/session-reclamation.test.js.map +0 -1
  502. package/dist/__tests__/session-record-disclosure.test.d.ts +0 -24
  503. package/dist/__tests__/session-record-disclosure.test.d.ts.map +0 -1
  504. package/dist/__tests__/session-record-disclosure.test.js +0 -494
  505. package/dist/__tests__/session-record-disclosure.test.js.map +0 -1
  506. package/dist/__tests__/session-status.test.d.ts +0 -11
  507. package/dist/__tests__/session-status.test.d.ts.map +0 -1
  508. package/dist/__tests__/session-status.test.js +0 -76
  509. package/dist/__tests__/session-status.test.js.map +0 -1
  510. package/dist/__tests__/session.test.d.ts +0 -15
  511. package/dist/__tests__/session.test.d.ts.map +0 -1
  512. package/dist/__tests__/session.test.js +0 -366
  513. package/dist/__tests__/session.test.js.map +0 -1
  514. package/dist/__tests__/shim-deploy-safety.test.d.ts +0 -24
  515. package/dist/__tests__/shim-deploy-safety.test.d.ts.map +0 -1
  516. package/dist/__tests__/shim-deploy-safety.test.js +0 -174
  517. package/dist/__tests__/shim-deploy-safety.test.js.map +0 -1
  518. package/dist/__tests__/slug-validation.test.d.ts +0 -13
  519. package/dist/__tests__/slug-validation.test.d.ts.map +0 -1
  520. package/dist/__tests__/slug-validation.test.js +0 -202
  521. package/dist/__tests__/slug-validation.test.js.map +0 -1
  522. package/dist/__tests__/standards-injection.test.d.ts +0 -2
  523. package/dist/__tests__/standards-injection.test.d.ts.map +0 -1
  524. package/dist/__tests__/standards-injection.test.js +0 -179
  525. package/dist/__tests__/standards-injection.test.js.map +0 -1
  526. package/dist/__tests__/start-config-conflict.test.d.ts +0 -17
  527. package/dist/__tests__/start-config-conflict.test.d.ts.map +0 -1
  528. package/dist/__tests__/start-config-conflict.test.js +0 -101
  529. package/dist/__tests__/start-config-conflict.test.js.map +0 -1
  530. package/dist/__tests__/start-interactive-role.test.d.ts +0 -22
  531. package/dist/__tests__/start-interactive-role.test.d.ts.map +0 -1
  532. package/dist/__tests__/start-interactive-role.test.js +0 -204
  533. package/dist/__tests__/start-interactive-role.test.js.map +0 -1
  534. package/dist/__tests__/start-rebase-never-ran.test.d.ts +0 -25
  535. package/dist/__tests__/start-rebase-never-ran.test.d.ts.map +0 -1
  536. package/dist/__tests__/start-rebase-never-ran.test.js +0 -227
  537. package/dist/__tests__/start-rebase-never-ran.test.js.map +0 -1
  538. package/dist/__tests__/start-report-generation-capture.test.d.ts +0 -17
  539. package/dist/__tests__/start-report-generation-capture.test.d.ts.map +0 -1
  540. package/dist/__tests__/start-report-generation-capture.test.js +0 -127
  541. package/dist/__tests__/start-report-generation-capture.test.js.map +0 -1
  542. package/dist/__tests__/start-report-integration.test.d.ts +0 -12
  543. package/dist/__tests__/start-report-integration.test.d.ts.map +0 -1
  544. package/dist/__tests__/start-report-integration.test.js +0 -138
  545. package/dist/__tests__/start-report-integration.test.js.map +0 -1
  546. package/dist/__tests__/start-runtime-wiring.test.d.ts +0 -31
  547. package/dist/__tests__/start-runtime-wiring.test.d.ts.map +0 -1
  548. package/dist/__tests__/start-runtime-wiring.test.js +0 -735
  549. package/dist/__tests__/start-runtime-wiring.test.js.map +0 -1
  550. package/dist/__tests__/start-stash.test.d.ts +0 -2
  551. package/dist/__tests__/start-stash.test.d.ts.map +0 -1
  552. package/dist/__tests__/start-stash.test.js +0 -131
  553. package/dist/__tests__/start-stash.test.js.map +0 -1
  554. package/dist/__tests__/start-sync-hardstop.test.d.ts +0 -15
  555. package/dist/__tests__/start-sync-hardstop.test.d.ts.map +0 -1
  556. package/dist/__tests__/start-sync-hardstop.test.js +0 -280
  557. package/dist/__tests__/start-sync-hardstop.test.js.map +0 -1
  558. package/dist/__tests__/start-team-identity.test.d.ts +0 -25
  559. package/dist/__tests__/start-team-identity.test.d.ts.map +0 -1
  560. package/dist/__tests__/start-team-identity.test.js +0 -307
  561. package/dist/__tests__/start-team-identity.test.js.map +0 -1
  562. package/dist/__tests__/startup-health-render.test.d.ts +0 -11
  563. package/dist/__tests__/startup-health-render.test.d.ts.map +0 -1
  564. package/dist/__tests__/startup-health-render.test.js +0 -60
  565. package/dist/__tests__/startup-health-render.test.js.map +0 -1
  566. package/dist/__tests__/startup-policy.test.d.ts +0 -2
  567. package/dist/__tests__/startup-policy.test.d.ts.map +0 -1
  568. package/dist/__tests__/startup-policy.test.js +0 -27
  569. package/dist/__tests__/startup-policy.test.js.map +0 -1
  570. package/dist/__tests__/startup-report.test.d.ts +0 -13
  571. package/dist/__tests__/startup-report.test.d.ts.map +0 -1
  572. package/dist/__tests__/startup-report.test.js +0 -278
  573. package/dist/__tests__/startup-report.test.js.map +0 -1
  574. package/dist/__tests__/startup-shipper.test.d.ts +0 -13
  575. package/dist/__tests__/startup-shipper.test.d.ts.map +0 -1
  576. package/dist/__tests__/startup-shipper.test.js +0 -149
  577. package/dist/__tests__/startup-shipper.test.js.map +0 -1
  578. package/dist/__tests__/stream-input-controller.test.d.ts +0 -10
  579. package/dist/__tests__/stream-input-controller.test.d.ts.map +0 -1
  580. package/dist/__tests__/stream-input-controller.test.js +0 -167
  581. package/dist/__tests__/stream-input-controller.test.js.map +0 -1
  582. package/dist/__tests__/team-memory-commands.test.d.ts +0 -11
  583. package/dist/__tests__/team-memory-commands.test.d.ts.map +0 -1
  584. package/dist/__tests__/team-memory-commands.test.js +0 -240
  585. package/dist/__tests__/team-memory-commands.test.js.map +0 -1
  586. package/dist/__tests__/team-name-propagation.test.d.ts +0 -13
  587. package/dist/__tests__/team-name-propagation.test.d.ts.map +0 -1
  588. package/dist/__tests__/team-name-propagation.test.js +0 -198
  589. package/dist/__tests__/team-name-propagation.test.js.map +0 -1
  590. package/dist/__tests__/team-token-probe.test.d.ts +0 -16
  591. package/dist/__tests__/team-token-probe.test.d.ts.map +0 -1
  592. package/dist/__tests__/team-token-probe.test.js +0 -295
  593. package/dist/__tests__/team-token-probe.test.js.map +0 -1
  594. package/dist/__tests__/template-budget.test.d.ts +0 -2
  595. package/dist/__tests__/template-budget.test.d.ts.map +0 -1
  596. package/dist/__tests__/template-budget.test.js +0 -119
  597. package/dist/__tests__/template-budget.test.js.map +0 -1
  598. package/dist/__tests__/template-sync.test.d.ts +0 -19
  599. package/dist/__tests__/template-sync.test.d.ts.map +0 -1
  600. package/dist/__tests__/template-sync.test.js +0 -480
  601. package/dist/__tests__/template-sync.test.js.map +0 -1
  602. package/dist/__tests__/test-project.test.d.ts +0 -18
  603. package/dist/__tests__/test-project.test.d.ts.map +0 -1
  604. package/dist/__tests__/test-project.test.js +0 -465
  605. package/dist/__tests__/test-project.test.js.map +0 -1
  606. package/dist/__tests__/tracked-instruction-files.test.d.ts +0 -21
  607. package/dist/__tests__/tracked-instruction-files.test.d.ts.map +0 -1
  608. package/dist/__tests__/tracked-instruction-files.test.js +0 -489
  609. package/dist/__tests__/tracked-instruction-files.test.js.map +0 -1
  610. package/dist/__tests__/unlock.test.d.ts +0 -11
  611. package/dist/__tests__/unlock.test.d.ts.map +0 -1
  612. package/dist/__tests__/unlock.test.js +0 -100
  613. package/dist/__tests__/unlock.test.js.map +0 -1
  614. package/dist/__tests__/usage-per-call-grouping.test.d.ts +0 -25
  615. package/dist/__tests__/usage-per-call-grouping.test.d.ts.map +0 -1
  616. package/dist/__tests__/usage-per-call-grouping.test.js +0 -952
  617. package/dist/__tests__/usage-per-call-grouping.test.js.map +0 -1
  618. package/dist/__tests__/usage-pricing.test.d.ts +0 -20
  619. package/dist/__tests__/usage-pricing.test.d.ts.map +0 -1
  620. package/dist/__tests__/usage-pricing.test.js +0 -176
  621. package/dist/__tests__/usage-pricing.test.js.map +0 -1
  622. package/dist/__tests__/usage-subagent-discovery.test.d.ts +0 -17
  623. package/dist/__tests__/usage-subagent-discovery.test.d.ts.map +0 -1
  624. package/dist/__tests__/usage-subagent-discovery.test.js +0 -213
  625. package/dist/__tests__/usage-subagent-discovery.test.js.map +0 -1
  626. package/dist/__tests__/verify-hooks-check-all.test.d.ts +0 -32
  627. package/dist/__tests__/verify-hooks-check-all.test.d.ts.map +0 -1
  628. package/dist/__tests__/verify-hooks-check-all.test.js +0 -563
  629. package/dist/__tests__/verify-hooks-check-all.test.js.map +0 -1
  630. package/dist/__tests__/verify-hooks-heal-log.test.d.ts +0 -11
  631. package/dist/__tests__/verify-hooks-heal-log.test.d.ts.map +0 -1
  632. package/dist/__tests__/verify-hooks-heal-log.test.js +0 -172
  633. package/dist/__tests__/verify-hooks-heal-log.test.js.map +0 -1
  634. package/dist/__tests__/worker-cap.test.d.ts +0 -14
  635. package/dist/__tests__/worker-cap.test.d.ts.map +0 -1
  636. package/dist/__tests__/worker-cap.test.js +0 -97
  637. package/dist/__tests__/worker-cap.test.js.map +0 -1
  638. package/dist/__tests__/worktree-link-repair.test.d.ts +0 -2
  639. package/dist/__tests__/worktree-link-repair.test.d.ts.map +0 -1
  640. package/dist/__tests__/worktree-link-repair.test.js +0 -471
  641. package/dist/__tests__/worktree-link-repair.test.js.map +0 -1
  642. package/dist/__tests__/worktree-sync-fixture.test.d.ts +0 -17
  643. package/dist/__tests__/worktree-sync-fixture.test.d.ts.map +0 -1
  644. package/dist/__tests__/worktree-sync-fixture.test.js +0 -519
  645. package/dist/__tests__/worktree-sync-fixture.test.js.map +0 -1
  646. package/dist/__tests__/worktree-sync-hardening.test.d.ts +0 -13
  647. package/dist/__tests__/worktree-sync-hardening.test.d.ts.map +0 -1
  648. package/dist/__tests__/worktree-sync-hardening.test.js +0 -919
  649. package/dist/__tests__/worktree-sync-hardening.test.js.map +0 -1
  650. package/dist/__tests__/worktree-sync-shell-free.test.d.ts +0 -25
  651. package/dist/__tests__/worktree-sync-shell-free.test.d.ts.map +0 -1
  652. package/dist/__tests__/worktree-sync-shell-free.test.js +0 -185
  653. package/dist/__tests__/worktree-sync-shell-free.test.js.map +0 -1
  654. package/dist/__tests__/worktree.test.d.ts +0 -2
  655. package/dist/__tests__/worktree.test.d.ts.map +0 -1
  656. package/dist/__tests__/worktree.test.js +0 -168
  657. package/dist/__tests__/worktree.test.js.map +0 -1
  658. package/dist/lib/code-context-file.test.d.ts +0 -19
  659. package/dist/lib/code-context-file.test.d.ts.map +0 -1
  660. package/dist/lib/code-context-file.test.js +0 -202
  661. package/dist/lib/code-context-file.test.js.map +0 -1
  662. package/dist/lib/harness/console/announce.test.d.ts +0 -2
  663. package/dist/lib/harness/console/announce.test.d.ts.map +0 -1
  664. package/dist/lib/harness/console/announce.test.js +0 -104
  665. package/dist/lib/harness/console/announce.test.js.map +0 -1
  666. package/dist/lib/harness/console/by-session.test.d.ts +0 -2
  667. package/dist/lib/harness/console/by-session.test.d.ts.map +0 -1
  668. package/dist/lib/harness/console/by-session.test.js +0 -86
  669. package/dist/lib/harness/console/by-session.test.js.map +0 -1
  670. package/dist/lib/harness/console/console.test.d.ts +0 -2
  671. package/dist/lib/harness/console/console.test.d.ts.map +0 -1
  672. package/dist/lib/harness/console/console.test.js +0 -269
  673. package/dist/lib/harness/console/console.test.js.map +0 -1
  674. package/dist/lib/harness/console/decision-request.test.d.ts +0 -2
  675. package/dist/lib/harness/console/decision-request.test.d.ts.map +0 -1
  676. package/dist/lib/harness/console/decision-request.test.js +0 -75
  677. package/dist/lib/harness/console/decision-request.test.js.map +0 -1
  678. package/dist/lib/harness/console/rank.test.d.ts +0 -2
  679. package/dist/lib/harness/console/rank.test.d.ts.map +0 -1
  680. package/dist/lib/harness/console/rank.test.js +0 -124
  681. package/dist/lib/harness/console/rank.test.js.map +0 -1
  682. package/dist/lib/harness/console/render.test.d.ts +0 -2
  683. package/dist/lib/harness/console/render.test.d.ts.map +0 -1
  684. package/dist/lib/harness/console/render.test.js +0 -96
  685. package/dist/lib/harness/console/render.test.js.map +0 -1
  686. package/dist/lib/harness/console/replay-cli.test.d.ts +0 -2
  687. package/dist/lib/harness/console/replay-cli.test.d.ts.map +0 -1
  688. package/dist/lib/harness/console/replay-cli.test.js +0 -96
  689. package/dist/lib/harness/console/replay-cli.test.js.map +0 -1
  690. package/dist/lib/harness/console/replay.test.d.ts +0 -2
  691. package/dist/lib/harness/console/replay.test.d.ts.map +0 -1
  692. package/dist/lib/harness/console/replay.test.js +0 -81
  693. package/dist/lib/harness/console/replay.test.js.map +0 -1
  694. package/dist/lib/harness/console/turn-reader.test.d.ts +0 -2
  695. package/dist/lib/harness/console/turn-reader.test.d.ts.map +0 -1
  696. package/dist/lib/harness/console/turn-reader.test.js +0 -108
  697. package/dist/lib/harness/console/turn-reader.test.js.map +0 -1
  698. package/dist/lib/harness/credential.test.d.ts +0 -2
  699. package/dist/lib/harness/credential.test.d.ts.map +0 -1
  700. package/dist/lib/harness/credential.test.js +0 -74
  701. package/dist/lib/harness/credential.test.js.map +0 -1
  702. package/dist/lib/harness/evaluate.test.d.ts +0 -2
  703. package/dist/lib/harness/evaluate.test.d.ts.map +0 -1
  704. package/dist/lib/harness/evaluate.test.js +0 -621
  705. package/dist/lib/harness/evaluate.test.js.map +0 -1
  706. package/dist/lib/harness/gate.test.d.ts +0 -2
  707. package/dist/lib/harness/gate.test.d.ts.map +0 -1
  708. package/dist/lib/harness/gate.test.js +0 -111
  709. package/dist/lib/harness/gate.test.js.map +0 -1
  710. package/dist/lib/harness/self-check.test.d.ts +0 -2
  711. package/dist/lib/harness/self-check.test.d.ts.map +0 -1
  712. package/dist/lib/harness/self-check.test.js +0 -43
  713. package/dist/lib/harness/self-check.test.js.map +0 -1
  714. package/dist/lib/harness/transcript.test.d.ts +0 -2
  715. package/dist/lib/harness/transcript.test.d.ts.map +0 -1
  716. package/dist/lib/harness/transcript.test.js +0 -118
  717. package/dist/lib/harness/transcript.test.js.map +0 -1
  718. package/dist/lib/projects-registry.test.d.ts +0 -2
  719. package/dist/lib/projects-registry.test.d.ts.map +0 -1
  720. package/dist/lib/projects-registry.test.js +0 -176
  721. package/dist/lib/projects-registry.test.js.map +0 -1
  722. package/dist/lib/roster.test.d.ts +0 -15
  723. package/dist/lib/roster.test.d.ts.map +0 -1
  724. package/dist/lib/roster.test.js +0 -299
  725. package/dist/lib/roster.test.js.map +0 -1
  726. package/dist/lib/vault.test.d.ts +0 -17
  727. package/dist/lib/vault.test.d.ts.map +0 -1
  728. package/dist/lib/vault.test.js +0 -169
  729. package/dist/lib/vault.test.js.map +0 -1
  730. package/dist/lib/window-view.test.d.ts +0 -2
  731. package/dist/lib/window-view.test.d.ts.map +0 -1
  732. package/dist/lib/window-view.test.js +0 -168
  733. package/dist/lib/window-view.test.js.map +0 -1
  734. package/dist/standards/fail-loud-standard.md +0 -495
  735. package/dist/standards/known-issues-standard.md +0 -380
  736. package/dist/standards/rulings.md +0 -104
@@ -1,735 +0,0 @@
1
- /**
2
- * runStart's runtime-adapter wiring (#4227 Phase 1, tasks 1.2/1.3).
3
- *
4
- * QA gap: the adapter modules had unit coverage, but the wiring INSIDE runStart —
5
- * which adapter gets constructed, what the banner says, and the order the adapter's
6
- * methods run relative to the leader-lock claim — was verified only by manual
7
- * built-binary smoke. Three properties are pinned here:
8
- *
9
- * 1. ADAPTER BRANCH. `--runtime codex` constructs CodexAdapter and NOT
10
- * ClaudeAdapter; the default and `--runtime claude` do the opposite. A branch
11
- * that constructed both, or the wrong one, would still "work" in a smoke test
12
- * because the Claude path is what a developer sees by default.
13
- *
14
- * 2. BANNER. The `Runtime:` line names the runtime, the model and the resolution
15
- * SOURCE, and a Codex launch additionally prints its declared degradations. The
16
- * source is the part that matters: a session that silently inherited
17
- * `.mx-runtime` looks identical to a deliberate one without it.
18
- *
19
- * 3. PREFLIGHT BEFORE THE LOCK. `preflight()` must run before
20
- * `guardAndClaimLeaderLock`, so a refused runtime cannot leave a leader lock
21
- * behind for the next start to trip over. This is pinned two ways — an explicit
22
- * ordering assertion on a recorded call log, and a failing-preflight test that
23
- * asserts the lock was never claimed. Moving the preflight call after the lock
24
- * claim fails both.
25
- *
26
- * Every boundary is stubbed the same way start-report-integration.test.ts does it,
27
- * except `findWorktreePath`, which points at a REAL temp directory so `.mx-runtime`
28
- * persistence and resolution execute for real rather than through a mock.
29
- */
30
- import { describe, it, expect, beforeEach, afterEach, vi } from 'vitest';
31
- import { createHash } from 'crypto';
32
- import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'fs';
33
- import { tmpdir } from 'os';
34
- import { join } from 'path';
35
- import { fileURLToPath } from 'url';
36
- /**
37
- * Shared recorder for adapter/lock call ordering. `vi.hoisted` so the mock
38
- * factories below (which are hoisted above the imports) can close over it.
39
- */
40
- const rec = vi.hoisted(() => ({
41
- calls: [],
42
- /** Set by a test to make the Codex preflight throw. */
43
- codexPreflightError: null,
44
- /** Set by a test to make the Codex launch gate (G-7) refuse. */
45
- codexGateError: null,
46
- /** LaunchContext the Codex fake's deployConfig received (#4707 forwarding). */
47
- deployCtx: null,
48
- /** Set by a test to make the Codex deployConfig refuse (over-budget, NEW-4). */
49
- codexDeployError: null,
50
- /** Options the Codex fake's constructor received (#4864 provenGuards plumbing). */
51
- codexCtorOpts: null,
52
- /** LaunchContext the adapter's launch received (#548 criterion 7a). */
53
- launchCtx: null,
54
- }));
55
- // hasOrigin=false (git remote probe returns non-zero) → skip the fetch/rebase block
56
- // and land on the config-sync + launch tail deterministically.
57
- vi.mock('child_process', () => ({
58
- spawnSync: vi.fn(() => ({ status: 1, stdout: '', stderr: '' })),
59
- }));
60
- vi.mock('../lib/worktree.js', () => ({
61
- findProjectRoot: vi.fn(() => '/fake/project'),
62
- // Overridden per-test to the real temp worktree (see beforeEach).
63
- findWorktreePath: vi.fn(() => '/fake/project/.worktrees/demo-wt'),
64
- getSlot: vi.fn(() => 0),
65
- getCurrentBranch: vi.fn(() => 'worktree/demo'),
66
- repairWorktreeLinkIfBroken: vi.fn(() => ({ status: 'healthy' })),
67
- }));
68
- vi.mock('../lib/claude.js', () => ({
69
- syncClaudeConfig: vi.fn(),
70
- deployBaseHooks: vi.fn(),
71
- checkPriorSyncFailure: vi.fn(),
72
- verifyAndHealHooks: vi.fn(),
73
- deployClaudeMd: vi.fn(),
74
- writeClaudeLocal: vi.fn(),
75
- // runStart calls the self-heal wrapper, not writeClaudeLocal directly (#4707).
76
- writeClaudeLocalWithBehavioralSelfHeal: vi.fn(() => ({
77
- ok: true, source: 'git', ref: 'origin/main', problem: null, missing: [], detail: null,
78
- })),
79
- launchClaudeSession: vi.fn(async () => { }),
80
- logSuccess: vi.fn(),
81
- logDim: vi.fn(),
82
- logWarning: vi.fn(),
83
- }));
84
- vi.mock('../lib/agent-session.js', () => ({
85
- launchAgentSession: vi.fn(async () => { }),
86
- }));
87
- // ── The units under test: both adapters, replaced by recording fakes ──────────
88
- // start.ts uses `adapter instanceof CodexAdapter`, which holds for these fakes
89
- // because the module-level binding IS the fake class.
90
- vi.mock('../lib/runtime/claude-adapter.js', () => ({
91
- ClaudeAdapter: class {
92
- id = 'claude';
93
- model;
94
- constructor(opts) {
95
- this.model = opts.sessionModel;
96
- rec.calls.push('construct:ClaudeAdapter');
97
- }
98
- preflight() {
99
- rec.calls.push('preflight:claude');
100
- }
101
- assertLaunchAllowed() {
102
- rec.calls.push('assertLaunchAllowed:claude');
103
- }
104
- deployConfig() {
105
- rec.calls.push('deployConfig:claude');
106
- }
107
- async launch(ctx) {
108
- rec.calls.push('launch:claude');
109
- rec.launchCtx = ctx;
110
- }
111
- },
112
- }));
113
- vi.mock('../lib/runtime/codex-adapter.js', () => ({
114
- CodexAdapter: class {
115
- id = 'codex';
116
- model = 'gpt-5.5';
117
- constructor(opts) {
118
- rec.calls.push('construct:CodexAdapter');
119
- rec.codexCtorOpts = opts;
120
- }
121
- preflight() {
122
- rec.calls.push('preflight:codex');
123
- if (rec.codexPreflightError)
124
- throw rec.codexPreflightError;
125
- }
126
- assertLaunchAllowed() {
127
- rec.calls.push('assertLaunchAllowed:codex');
128
- if (rec.codexGateError)
129
- throw rec.codexGateError;
130
- }
131
- deployConfig(ctx) {
132
- rec.calls.push('deployConfig:codex');
133
- rec.deployCtx = ctx;
134
- if (rec.codexDeployError)
135
- throw rec.codexDeployError;
136
- }
137
- async launch(ctx) {
138
- rec.calls.push('launch:codex');
139
- rec.launchCtx = ctx;
140
- }
141
- bannerNotices() {
142
- return ['DEGRADATION-NOTICE-ONE', 'DEGRADATION-NOTICE-TWO'];
143
- }
144
- },
145
- }));
146
- vi.mock('../lib/catalog.js', () => ({
147
- getTeam: vi.fn(() => undefined),
148
- }));
149
- vi.mock('../lib/project-config.js', () => ({
150
- loadProjectConfig: vi.fn(() => ({})),
151
- resolveProjectConfig: vi.fn(() => ({
152
- baseBranch: 'main',
153
- worktreeDir: '.worktrees',
154
- teamsDir: 'mx-agent-system/teams',
155
- roleguidesDir: 'mx-agent-system/roleguides',
156
- configSource: 'mx-agent-system/agent-config',
157
- coordinationMode: 'off',
158
- sessionModel: 'claude-opus-4-6[1m]',
159
- projectSlug: '',
160
- })),
161
- }));
162
- vi.mock('../lib/config-generation.js', () => ({
163
- checkConfigGeneration: vi.fn(),
164
- }));
165
- vi.mock('../lib/config.js', () => ({
166
- getConfigValue: vi.fn(() => undefined),
167
- setConfigValue: vi.fn(),
168
- }));
169
- // claimLock records its position in the call log — that recording is what makes the
170
- // preflight-before-lock ordering assertion possible.
171
- vi.mock('../lib/leader-lock.js', () => ({
172
- claimLock: vi.fn(() => {
173
- rec.calls.push('claimLock');
174
- return { ok: true };
175
- }),
176
- checkLiveness: vi.fn(() => ({ state: 'stale', lockAgeSeconds: null })),
177
- formatLockEvidence: vi.fn(() => ''),
178
- lockPath: vi.fn(() => '/fake/lock'),
179
- readLock: vi.fn(() => ({ lock: null, parseError: null })),
180
- removeLock: vi.fn(() => {
181
- rec.calls.push('removeLock');
182
- }),
183
- writeLock: vi.fn(),
184
- updateChildPid: vi.fn(),
185
- }));
186
- vi.mock('../lib/coordination-token.js', () => ({
187
- resolveCoordinationToken: vi.fn(() => ({ status: 'not-on-roster' })),
188
- }));
189
- vi.mock('../commands/monitor.js', () => ({
190
- runStartupMonitorCheck: vi.fn(async () => []),
191
- shouldRunMonitorCheck: vi.fn(() => false),
192
- recordMonitorCheck: vi.fn(),
193
- }));
194
- import { runStart } from '../commands/start.js';
195
- import { resolveProjectConfig } from '../lib/project-config.js';
196
- import { startupReport } from '../lib/startup-report.js';
197
- import { findWorktreePath } from '../lib/worktree.js';
198
- import { claimLock } from '../lib/leader-lock.js';
199
- import { RUNTIME_FILENAME } from '../lib/runtime/resolve.js';
200
- import { CODEX_HOOKS_FILENAME, VERIFIED_CODEX_VERSION, buildCodexHooksJson, codexHookTrustKeysForDoc, readDeployedHooksDoc, } from '../lib/runtime/codex-config.js';
201
- import { GUARD_PROOF_VERSION, runningCliVersion, writeGuardProof } from '../lib/runtime/codex-guard-proof.js';
202
- /** Durable startup-report log for a worktree, under the per-test fake HOME. */
203
- function reportLines(worktreeName) {
204
- const path = join(home, '.mx-agent', 'logs', 'startup', `${worktreeName}.jsonl`);
205
- if (!existsSync(path))
206
- return [];
207
- return readFileSync(path, 'utf-8')
208
- .trim()
209
- .split('\n')
210
- .filter(Boolean)
211
- .map((l) => JSON.parse(l));
212
- }
213
- let home;
214
- let worktree;
215
- const OLD_HOME = process.env.HOME;
216
- let logSpy;
217
- let errSpy;
218
- // eslint-disable-next-line @typescript-eslint/no-explicit-any -- process.exit's
219
- // `never` return does not unify with vi.spyOn's generic signature; the existing
220
- // start-*.test.ts files use the same escape.
221
- let exitSpy;
222
- /** ANSI-stripped console.log output, one string. */
223
- function printed() {
224
- return logSpy.mock.calls
225
- .map((c) => String(c[0] ?? ''))
226
- // eslint-disable-next-line no-control-regex
227
- .join('\n')
228
- .replace(/\[[0-9;]*m/g, '');
229
- }
230
- beforeEach(() => {
231
- home = mkdtempSync(join(tmpdir(), 'mx-start-runtime-home-'));
232
- worktree = mkdtempSync(join(tmpdir(), 'mx-start-runtime-wt-'));
233
- process.env.HOME = home;
234
- vi.mocked(findWorktreePath).mockReturnValue(worktree);
235
- startupReport._reset();
236
- rec.calls = [];
237
- rec.codexPreflightError = null;
238
- rec.codexGateError = null;
239
- rec.deployCtx = null;
240
- rec.codexDeployError = null;
241
- rec.codexCtorOpts = null;
242
- rec.launchCtx = null;
243
- vi.clearAllMocks();
244
- vi.mocked(findWorktreePath).mockReturnValue(worktree);
245
- vi.stubGlobal('fetch', vi.fn().mockRejectedValue(new Error('no network in test')));
246
- logSpy = vi.spyOn(console, 'log').mockImplementation(() => { });
247
- errSpy = vi.spyOn(console, 'error').mockImplementation(() => { });
248
- // A real process.exit would kill the worker; surface it as a throw we can assert.
249
- exitSpy = vi.spyOn(process, 'exit').mockImplementation(((code) => {
250
- throw new Error(`EXIT:${code}`);
251
- }));
252
- });
253
- afterEach(() => {
254
- logSpy.mockRestore();
255
- errSpy.mockRestore();
256
- exitSpy.mockRestore();
257
- vi.unstubAllGlobals();
258
- startupReport._reset();
259
- rmSync(home, { recursive: true, force: true });
260
- rmSync(worktree, { recursive: true, force: true });
261
- if (OLD_HOME === undefined)
262
- delete process.env.HOME;
263
- else
264
- process.env.HOME = OLD_HOME;
265
- });
266
- describe('runStart — adapter selection branch', () => {
267
- it('constructs ClaudeAdapter and NOT CodexAdapter by default', async () => {
268
- await runStart({ name: 'demo' });
269
- expect(rec.calls).toContain('construct:ClaudeAdapter');
270
- expect(rec.calls).not.toContain('construct:CodexAdapter');
271
- expect(rec.calls).toContain('launch:claude');
272
- expect(rec.calls).not.toContain('launch:codex');
273
- });
274
- it('constructs CodexAdapter and NOT ClaudeAdapter for --runtime codex', async () => {
275
- await runStart({ name: 'demo', runtime: 'codex' });
276
- expect(rec.calls).toContain('construct:CodexAdapter');
277
- expect(rec.calls).not.toContain('construct:ClaudeAdapter');
278
- expect(rec.calls).toContain('launch:codex');
279
- expect(rec.calls).not.toContain('launch:claude');
280
- });
281
- it('constructs exactly ONE adapter (the branch is exclusive, not additive)', async () => {
282
- await runStart({ name: 'demo', runtime: 'codex' });
283
- expect(rec.calls.filter((c) => c.startsWith('construct:'))).toHaveLength(1);
284
- });
285
- it('routes an explicit --runtime claude to ClaudeAdapter', async () => {
286
- await runStart({ name: 'demo', runtime: 'claude' });
287
- expect(rec.calls).toContain('construct:ClaudeAdapter');
288
- expect(rec.calls).not.toContain('construct:CodexAdapter');
289
- });
290
- it('selects the adapter from a persisted .mx-runtime when no flag is passed', async () => {
291
- writeFileSync(join(worktree, RUNTIME_FILENAME), 'codex\n');
292
- await runStart({ name: 'demo' });
293
- expect(rec.calls).toContain('construct:CodexAdapter');
294
- expect(rec.calls).not.toContain('construct:ClaudeAdapter');
295
- });
296
- it('the flag overrides a conflicting persisted runtime and re-persists it', async () => {
297
- writeFileSync(join(worktree, RUNTIME_FILENAME), 'codex\n');
298
- await runStart({ name: 'demo', runtime: 'claude' });
299
- expect(rec.calls).toContain('construct:ClaudeAdapter');
300
- expect(readFileSync(join(worktree, RUNTIME_FILENAME), 'utf-8').trim()).toBe('claude');
301
- });
302
- /**
303
- * ─── #4864: the launch gate reads a proof from disk ──────────────────────────
304
- *
305
- * `new CodexAdapter({ projectRoot, ... })` omitted `provenGuards` entirely, so
306
- * `guardsProven` was permanently false and the only way to launch was the
307
- * development env var, which enforces NO guard hook. These pin both directions:
308
- * no artifact still means nothing proven, and a valid artifact reaches the adapter.
309
- *
310
- * MUTATION CHECK: removing `provenGuards` from the construction in start.ts makes
311
- * 'a valid proof artifact reaches the adapter' fail.
312
- */
313
- describe('G-7 proof artifact → provenGuards (#4864)', () => {
314
- /** Deploy the hooks file, grant per-entry trust under the fake HOME, write a proof. */
315
- function layDownValidProof(guards) {
316
- mkdirSync(join(worktree, '.codex'), { recursive: true });
317
- // The reader hashes each proven guard script (review MF1), so they must exist.
318
- mkdirSync(join(worktree, '.claude', 'hooks'), { recursive: true });
319
- for (const guard of guards) {
320
- writeFileSync(join(worktree, '.claude', 'hooks', `${guard}.sh`), `#!/bin/bash\n# ${guard}\n`);
321
- }
322
- writeFileSync(join(worktree, CODEX_HOOKS_FILENAME), buildCodexHooksJson({ worktreePath: worktree }));
323
- const hooksPath = join(worktree, CODEX_HOOKS_FILENAME);
324
- const keys = codexHookTrustKeysForDoc(hooksPath, readDeployedHooksDoc(worktree));
325
- mkdirSync(join(home, '.codex'), { recursive: true });
326
- writeFileSync(join(home, '.codex', 'config.toml'), `[projects."${worktree}"]\ntrust_level = "trusted"\n\n` +
327
- keys.map((k) => `[hooks.state."${k}"]\nenabled = true\ntrusted_hash = "sha256:aa"\n`).join('\n'));
328
- writeGuardProof({
329
- worktreePath: worktree,
330
- artifact: {
331
- version: GUARD_PROOF_VERSION,
332
- hooksPath,
333
- hooksSha256: createHash('sha256').update(readFileSync(hooksPath)).digest('hex'),
334
- provenAt: '2026-08-02T00:00:00Z',
335
- codexVersion: VERIFIED_CODEX_VERSION,
336
- cliVersion: runningCliVersion(),
337
- guards: guards.map((guard) => ({
338
- guard,
339
- scriptPath: `.claude/hooks/${guard}.sh`,
340
- scriptSha256: createHash('sha256')
341
- .update(readFileSync(join(worktree, '.claude', 'hooks', `${guard}.sh`)))
342
- .digest('hex'),
343
- refusedStimulus: 'forbidden',
344
- refusedExitCode: 2,
345
- refusalAttribution: 'BLOCKED',
346
- permittedStimulus: 'permitted',
347
- permittedExitCode: 0,
348
- })),
349
- spawnGate: {
350
- refusedExitCode: 2,
351
- refusalAttribution: 'subagent spawning is unavailable under codex',
352
- unrelatedToolExitCode: 0,
353
- },
354
- },
355
- });
356
- }
357
- it('no artifact → provenGuards is empty (the refusal is unchanged)', async () => {
358
- await runStart({ name: 'demo', runtime: 'codex' });
359
- expect(rec.codexCtorOpts?.provenGuards).toEqual([]);
360
- expect(rec.codexCtorOpts?.guardProofDetail).toContain('prove-guards');
361
- });
362
- it('a valid proof artifact reaches the adapter', async () => {
363
- layDownValidProof(['git-mutation-guard', 'named-memory-write-guard']);
364
- await runStart({ name: 'demo', runtime: 'codex' });
365
- expect([...(rec.codexCtorOpts?.provenGuards ?? [])].sort()).toEqual([
366
- 'git-mutation-guard',
367
- 'named-memory-write-guard',
368
- ]);
369
- });
370
- it('a STALE artifact reaches the adapter as nothing proven', async () => {
371
- layDownValidProof(['git-mutation-guard', 'named-memory-write-guard']);
372
- // One byte of the proven configuration changes; the proof is void.
373
- writeFileSync(join(worktree, CODEX_HOOKS_FILENAME), `${readFileSync(join(worktree, CODEX_HOOKS_FILENAME), 'utf-8')} `);
374
- await runStart({ name: 'demo', runtime: 'codex' });
375
- expect(rec.codexCtorOpts?.provenGuards).toEqual([]);
376
- expect(rec.codexCtorOpts?.guardProofDetail).toContain('STALE PROOF');
377
- });
378
- it('the Claude path never reads the artifact', async () => {
379
- layDownValidProof(['git-mutation-guard']);
380
- await runStart({ name: 'demo', runtime: 'claude' });
381
- expect(rec.codexCtorOpts).toBeNull();
382
- });
383
- });
384
- it('deploys runtime config through the adapter before launching', async () => {
385
- await runStart({ name: 'demo', runtime: 'codex' });
386
- expect(rec.calls.indexOf('deployConfig:codex')).toBeGreaterThan(-1);
387
- expect(rec.calls.indexOf('deployConfig:codex')).toBeLessThan(rec.calls.indexOf('launch:codex'));
388
- });
389
- // #4707 / security review NEW-3: the roleguide ref must reach the Codex generator.
390
- it('passes cfg.baseBranch into the LaunchContext the adapter deploys from', async () => {
391
- vi.mocked(resolveProjectConfig).mockReturnValueOnce({
392
- baseBranch: 'develop',
393
- worktreeDir: '.worktrees',
394
- teamsDir: 'mx-agent-system/teams',
395
- roleguidesDir: 'mx-agent-system/roleguides',
396
- configSource: 'mx-agent-system/agent-config',
397
- coordinationMode: 'off',
398
- sessionModel: 'claude-opus-4-6[1m]',
399
- projectSlug: '',
400
- });
401
- await runStart({ name: 'demo', runtime: 'codex' });
402
- expect(rec.deployCtx?.baseBranch).toBe('develop');
403
- });
404
- it('defaults the LaunchContext baseBranch to the configured main', async () => {
405
- await runStart({ name: 'demo', runtime: 'codex' });
406
- expect(rec.deployCtx?.baseBranch).toBe('main');
407
- });
408
- it('refuses an unknown runtime before constructing any adapter', async () => {
409
- await expect(runStart({ name: 'demo', runtime: 'bogus' })).rejects.toThrow('EXIT:1');
410
- expect(rec.calls.filter((c) => c.startsWith('construct:'))).toHaveLength(0);
411
- expect(vi.mocked(claimLock)).not.toHaveBeenCalled();
412
- const errors = errSpy.mock.calls.map((c) => String(c[0])).join('\n');
413
- expect(errors).toContain("unknown runtime 'bogus' — valid: claude, codex");
414
- });
415
- });
416
- describe('runStart — Runtime: banner line', () => {
417
- it('names the runtime, model and resolution source for the default path', async () => {
418
- await runStart({ name: 'demo' });
419
- expect(printed()).toMatch(/Runtime:\s+claude \(claude-opus-4-6\[1m\], default\)/);
420
- });
421
- it('reports source `flag` when --runtime was passed', async () => {
422
- await runStart({ name: 'demo', runtime: 'codex' });
423
- expect(printed()).toMatch(/Runtime:\s+codex \(gpt-5\.5, flag\)/);
424
- });
425
- it('reports source `persisted` when the runtime came from .mx-runtime', async () => {
426
- writeFileSync(join(worktree, RUNTIME_FILENAME), 'codex\n');
427
- await runStart({ name: 'demo' });
428
- expect(printed()).toMatch(/Runtime:\s+codex \(gpt-5\.5, persisted\)/);
429
- });
430
- it('prints the Codex degradation notices from the adapter', async () => {
431
- await runStart({ name: 'demo', runtime: 'codex' });
432
- expect(printed()).toContain('DEGRADATION-NOTICE-ONE');
433
- expect(printed()).toContain('DEGRADATION-NOTICE-TWO');
434
- });
435
- it('prints NO degradation notices on the Claude path', async () => {
436
- await runStart({ name: 'demo' });
437
- expect(printed()).not.toContain('DEGRADATION-NOTICE-ONE');
438
- });
439
- it('surfaces the malformed-.mx-runtime warning and still starts on claude', async () => {
440
- writeFileSync(join(worktree, RUNTIME_FILENAME), 'gpt-5.5\n');
441
- await runStart({ name: 'demo' });
442
- const out = printed();
443
- expect(out).toMatch(/unrecognized runtime/);
444
- expect(out).toMatch(/Runtime:\s+claude \(claude-opus-4-6\[1m\], default\)/);
445
- expect(rec.calls).toContain('launch:claude');
446
- });
447
- });
448
- describe('runStart — preflight runs BEFORE the leader lock is claimed', () => {
449
- /**
450
- * Ordering pin. If the `adapter.preflight()` call moves below
451
- * `guardAndClaimLeaderLock`, this assertion fails: a refused runtime would then
452
- * leave a claimed lock behind for the next start to trip over.
453
- */
454
- it('records preflight before claimLock on the codex path', async () => {
455
- await runStart({ name: 'demo', runtime: 'codex' });
456
- const preflightAt = rec.calls.indexOf('preflight:codex');
457
- const lockAt = rec.calls.indexOf('claimLock');
458
- expect(preflightAt).toBeGreaterThan(-1);
459
- expect(lockAt).toBeGreaterThan(-1);
460
- expect(preflightAt).toBeLessThan(lockAt);
461
- });
462
- it('records preflight before claimLock on the claude path too', async () => {
463
- await runStart({ name: 'demo' });
464
- expect(rec.calls.indexOf('preflight:claude')).toBeLessThan(rec.calls.indexOf('claimLock'));
465
- });
466
- it('keeps the full order: construct → preflight → gate → lock → deployConfig → launch', async () => {
467
- await runStart({ name: 'demo', runtime: 'codex' });
468
- const at = (c) => rec.calls.indexOf(c);
469
- expect(at('construct:CodexAdapter')).toBeLessThan(at('preflight:codex'));
470
- expect(at('preflight:codex')).toBeLessThan(at('assertLaunchAllowed:codex'));
471
- expect(at('assertLaunchAllowed:codex')).toBeLessThan(at('claimLock'));
472
- expect(at('claimLock')).toBeLessThan(at('deployConfig:codex'));
473
- expect(at('deployConfig:codex')).toBeLessThan(at('launch:codex'));
474
- });
475
- /**
476
- * The behavioural half of the same pin, and the command-level half of FR-8: a
477
- * failing preflight must exit non-zero having claimed NO lock. If preflight ran
478
- * after the lock claim, `claimLock` would have been called and this fails.
479
- */
480
- it('a failing preflight exits 1 and never claims the lock or launches', async () => {
481
- rec.codexPreflightError = new Error('codex CLI not found — install via devcontainer or run: npm i -g @openai/codex');
482
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
483
- expect(rec.calls).toContain('preflight:codex');
484
- expect(rec.calls).not.toContain('claimLock');
485
- expect(vi.mocked(claimLock)).not.toHaveBeenCalled();
486
- expect(rec.calls).not.toContain('launch:codex');
487
- expect(rec.calls).not.toContain('deployConfig:codex');
488
- });
489
- it('a failing preflight never falls back to the Claude adapter', async () => {
490
- rec.codexPreflightError = new Error('codex CLI not found');
491
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
492
- expect(rec.calls).not.toContain('construct:ClaudeAdapter');
493
- expect(rec.calls).not.toContain('launch:claude');
494
- });
495
- it('surfaces the preflight message to the operator', async () => {
496
- rec.codexPreflightError = new Error('codex CLI not found — install via devcontainer');
497
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
498
- const errors = errSpy.mock.calls.map((c) => String(c[0])).join('\n');
499
- expect(errors).toContain('codex CLI not found — install via devcontainer');
500
- });
501
- });
502
- // ── NEW-15: a deterministic refusal is RECORDED as one ───────────────────────
503
- describe('runStart — a deployConfig refusal is reported as refused, not ok', () => {
504
- it('records outcome=refused when the adapter refuses to deploy', async () => {
505
- rec.codexDeployError = new Error('refusing to launch --runtime codex: AGENTS.override.md is over the 32768-byte cap');
506
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
507
- const reports = reportLines(worktree.split('/').pop());
508
- expect(reports).toHaveLength(1);
509
- expect(reports[0].outcome).toBe('refused');
510
- });
511
- it('still records outcome=ok when deployConfig succeeds', async () => {
512
- await runStart({ name: 'demo', runtime: 'codex' });
513
- const reports = reportLines(worktree.split('/').pop());
514
- expect(reports).toHaveLength(1);
515
- expect(reports[0].outcome).toBe('ok');
516
- });
517
- it('never launches when deployConfig refuses', async () => {
518
- rec.codexDeployError = new Error('refusing to launch --runtime codex: over budget');
519
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
520
- expect(rec.calls).toContain('deployConfig:codex');
521
- expect(rec.calls).not.toContain('launch:codex');
522
- // The lock must not survive the refusal.
523
- expect(rec.calls).toContain('removeLock');
524
- });
525
- });
526
- describe('runStart — .mx-runtime is persisted only AFTER the gate passes (S7)', () => {
527
- it('writes .mx-runtime on a successful start', async () => {
528
- await runStart({ name: 'demo', runtime: 'codex' });
529
- expect(readFileSync(join(worktree, RUNTIME_FILENAME), 'utf-8').trim()).toBe('codex');
530
- });
531
- it('does NOT persist when the launch gate refuses', async () => {
532
- // Persisting first meant a refused `--runtime codex` start left `codex` on disk, so
533
- // the next FLAGLESS start resolved codex from a session that never ran.
534
- rec.codexGateError = new Error('refusing to launch --runtime codex: Phase 1 gate G-7 is unpassed.');
535
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
536
- expect(existsSync(join(worktree, RUNTIME_FILENAME))).toBe(false);
537
- });
538
- it('does NOT persist when preflight refuses', async () => {
539
- rec.codexPreflightError = new Error('codex CLI not found');
540
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
541
- expect(existsSync(join(worktree, RUNTIME_FILENAME))).toBe(false);
542
- });
543
- it('leaves an existing .mx-runtime untouched when the new runtime is refused', async () => {
544
- writeFileSync(join(worktree, RUNTIME_FILENAME), 'claude\n');
545
- rec.codexGateError = new Error('gate refused');
546
- await expect(runStart({ name: 'demo', runtime: 'codex' })).rejects.toThrow('EXIT:1');
547
- expect(readFileSync(join(worktree, RUNTIME_FILENAME), 'utf-8').trim()).toBe('claude');
548
- });
549
- it('persists after the gate, never before it', async () => {
550
- await runStart({ name: 'demo', runtime: 'codex' });
551
- // Structural: the write happens between the gate and the lock claim, so a refusal
552
- // in either check leaves no file. Behaviourally covered by the two tests above.
553
- expect(rec.calls.indexOf('assertLaunchAllowed:codex')).toBeLessThan(rec.calls.indexOf('claimLock'));
554
- });
555
- });
556
- describe('runStart — --runtime codex is incompatible with --exp (S3)', () => {
557
- it('refuses the flag combination', async () => {
558
- await expect(runStart({ name: 'demo', runtime: 'codex', experimental: true })).rejects.toThrow('EXIT:1');
559
- const errors = errSpy.mock.calls.map((c) => String(c[0])).join('\n');
560
- expect(errors).toMatch(/--runtime codex cannot be combined with --exp/);
561
- });
562
- it('refuses BEFORE printing a banner or persisting anything', async () => {
563
- // The pre-fix path printed `Runtime: codex`, wrote `codex` to `.mx-runtime`, and
564
- // then launched CLAUDE through the experimental branch: banner and persisted state
565
- // both said Codex while Claude ran.
566
- await expect(runStart({ name: 'demo', runtime: 'codex', experimental: true })).rejects.toThrow('EXIT:1');
567
- expect(printed()).not.toMatch(/Runtime:/);
568
- expect(printed()).not.toMatch(/Starting Agent Team/);
569
- expect(existsSync(join(worktree, RUNTIME_FILENAME))).toBe(false);
570
- expect(rec.calls.filter((c) => c.startsWith('construct:'))).toHaveLength(0);
571
- });
572
- it('never launches either runtime for the refused combination', async () => {
573
- await expect(runStart({ name: 'demo', runtime: 'codex', experimental: true })).rejects.toThrow('EXIT:1');
574
- const { launchAgentSession } = await import('../lib/agent-session.js');
575
- const { launchClaudeSession } = await import('../lib/claude.js');
576
- expect(vi.mocked(launchAgentSession)).not.toHaveBeenCalled();
577
- expect(vi.mocked(launchClaudeSession)).not.toHaveBeenCalled();
578
- expect(rec.calls).not.toContain('launch:codex');
579
- });
580
- it('refuses a PERSISTED codex runtime combined with --exp', async () => {
581
- writeFileSync(join(worktree, RUNTIME_FILENAME), 'codex\n');
582
- await expect(runStart({ name: 'demo', experimental: true })).rejects.toThrow('EXIT:1');
583
- const errors = errSpy.mock.calls.map((c) => String(c[0])).join('\n');
584
- expect(errors).toMatch(/persisted runtime is codex/);
585
- expect(errors).toMatch(/switch back with --runtime claude/);
586
- });
587
- it('still allows --exp on the Claude path', async () => {
588
- await runStart({ name: 'demo', experimental: true });
589
- const { launchAgentSession } = await import('../lib/agent-session.js');
590
- expect(vi.mocked(launchAgentSession)).toHaveBeenCalledTimes(1);
591
- });
592
- });
593
- /**
594
- * #548 criterion 7a: for every real team, the value the launcher puts into
595
- * MX_COORD_EXPECT_TEAM equals the string `start` writes into a new
596
- * .mx-coordination-team. A false mismatch would refuse coordination in every
597
- * session that team opens, so the rosters are enumerated rather than sampled.
598
- *
599
- * The chain this pins, end to end:
600
- * - here: the marker `start` writes == the `teamName` it hands each launcher
601
- * (the Claude adapter, the Codex adapter, and the --exp launcher);
602
- * - team-name-propagation.test.ts and runtime-codex-adapter.test.ts: each
603
- * launcher sets MX_COORD_EXPECT_TEAM to exactly that `teamName`, for the same
604
- * enumerated teams.
605
- *
606
- * The rosters are read from the generated offline roster file, the serialised
607
- * form of `coordination-service/src/config/rosters.ts`. For `mx-agent` and
608
- * `mx-agent-test` its entries are PROVISIONED_ROSTERS, which that module defines
609
- * as the same consts as SERVICE_ROSTERS (MX_AGENT_TEAMS, MX_AGENT_TEST_TEAMS).
610
- */
611
- describe('runStart — #548 criterion 7a: launcher expectation equals the marker start writes, for every roster team', () => {
612
- const rosterFile = join(fileURLToPath(new URL('.', import.meta.url)), '..', '..', '..', 'agent-config', 'coordination-rosters.generated.json');
613
- const projects = JSON.parse(readFileSync(rosterFile, 'utf-8')).projects;
614
- const teams = [...(projects['mx-agent'] ?? []), ...(projects['mx-agent-test'] ?? [])];
615
- it('enumerates a non-empty roster that includes both test teams (#259)', () => {
616
- expect(projects['mx-agent']?.length ?? 0).toBeGreaterThan(0);
617
- expect(teams).toContain('creation-probe');
618
- expect(teams).toContain('relay-probe');
619
- });
620
- const queueConfig = {
621
- baseBranch: 'main',
622
- worktreeDir: '.worktrees',
623
- teamsDir: 'mx-agent-system/teams',
624
- roleguidesDir: 'mx-agent-system/roleguides',
625
- configSource: 'mx-agent-system/agent-config',
626
- coordinationMode: 'queue',
627
- sessionModel: 'claude-opus-4-6[1m]',
628
- projectSlug: 'mx-agent',
629
- };
630
- for (const team of teams) {
631
- for (const mode of ['claude', 'codex', 'exp']) {
632
- it(`${team} (${mode}): the marker start writes equals the team it hands the launcher`, async () => {
633
- const original = vi.mocked(resolveProjectConfig).getMockImplementation();
634
- vi.mocked(resolveProjectConfig).mockImplementation(() => queueConfig);
635
- try {
636
- if (mode === 'exp')
637
- await runStart({ name: team, experimental: true });
638
- else
639
- await runStart({ name: team, runtime: mode });
640
- }
641
- finally {
642
- if (original)
643
- vi.mocked(resolveProjectConfig).mockImplementation(original);
644
- }
645
- const marker = readFileSync(join(worktree, '.mx-coordination-team'), 'utf-8');
646
- let launched;
647
- if (mode === 'exp') {
648
- const { launchAgentSession } = await import('../lib/agent-session.js');
649
- launched = vi.mocked(launchAgentSession).mock.calls[0]?.[0]?.teamName;
650
- }
651
- else {
652
- launched = rec.launchCtx?.teamName;
653
- }
654
- expect(marker).toBe(team);
655
- expect(launched).toBe(marker);
656
- });
657
- }
658
- }
659
- });
660
- /**
661
- * #548 red-team: a mixed-case or padded team argument.
662
- *
663
- * What `start` does with `name`, recorded rather than assumed. It neither
664
- * validates nor normalises it (`commands/start.ts:608` destructures it and the
665
- * same string reaches the worktree lookup, the marker write and every launcher).
666
- *
667
- * - With the real worktree lookup, on this (case-sensitive) filesystem, `Coach`,
668
- * ` coach` and `coach ` find no `coach-20260927` worktree, so start stops at
669
- * "Team '<name>' not found", exit 1, before any marker write or launch. No
670
- * expectation is ever set from such an argument here.
671
- * - With the lookup stubbed to return the worktree, which is what an exact-name
672
- * match on a case-insensitive filesystem would do, the marker start writes
673
- * and the launcher's team stay byte-equal ("Coach" and "Coach"). Against a
674
- * marker that already reads `coach`, the expectation is `Coach`, and the
675
- * session's coordination refuses. That is recorded, not changed, here.
676
- */
677
- describe('runStart — #548 red-team: mixed-case and padded team argument', () => {
678
- const queueConfig = {
679
- baseBranch: 'main',
680
- worktreeDir: '.worktrees',
681
- teamsDir: 'mx-agent-system/teams',
682
- roleguidesDir: 'mx-agent-system/roleguides',
683
- configSource: 'mx-agent-system/agent-config',
684
- coordinationMode: 'queue',
685
- sessionModel: 'claude-opus-4-6[1m]',
686
- projectSlug: 'mx-agent',
687
- };
688
- async function withQueue(fn) {
689
- const original = vi.mocked(resolveProjectConfig).getMockImplementation();
690
- vi.mocked(resolveProjectConfig).mockImplementation(() => queueConfig);
691
- try {
692
- await fn();
693
- }
694
- finally {
695
- if (original)
696
- vi.mocked(resolveProjectConfig).mockImplementation(original);
697
- }
698
- }
699
- for (const name of ['Coach', ' coach', 'coach ']) {
700
- it(`real worktree lookup: "${name}" finds no coach-20260927 worktree, so start exits 1 before any marker or launch`, async () => {
701
- const actual = await vi.importActual('../lib/worktree.js');
702
- const root = mkdtempSync(join(tmpdir(), 'mx-start-548-case-'));
703
- try {
704
- const wt = join(root, '.worktrees', 'coach-20260927');
705
- mkdirSync(wt, { recursive: true });
706
- writeFileSync(join(wt, '.git'), 'gitdir: /nonexistent\n');
707
- expect(actual.findWorktreePath(root, 'coach')).toBe(wt);
708
- expect(actual.findWorktreePath(root, name)).toBeNull();
709
- const { findProjectRoot } = await import('../lib/worktree.js');
710
- vi.mocked(findProjectRoot).mockReturnValueOnce(root);
711
- vi.mocked(findWorktreePath).mockImplementationOnce(actual.findWorktreePath);
712
- await withQueue(() => expect(runStart({ name })).rejects.toThrow('EXIT:1'));
713
- const errors = errSpy.mock.calls.map((c) => String(c[0])).join('\n');
714
- expect(errors).toContain(`Team '${name}' not found.`);
715
- expect(rec.launchCtx).toBeNull();
716
- expect(existsSync(join(wt, '.mx-coordination-team'))).toBe(false);
717
- }
718
- finally {
719
- rmSync(root, { recursive: true, force: true });
720
- }
721
- });
722
- }
723
- it('lookup stubbed (a case-insensitive exact match): "Coach" with no marker writes "Coach" and launches as "Coach", byte-equal', async () => {
724
- await withQueue(() => runStart({ name: 'Coach' }));
725
- expect(readFileSync(join(worktree, '.mx-coordination-team'), 'utf-8')).toBe('Coach');
726
- expect(rec.launchCtx?.teamName).toBe('Coach');
727
- });
728
- it('lookup stubbed: "Coach" against an existing "coach" marker leaves the marker and launches as "Coach" (coordination then refuses)', async () => {
729
- writeFileSync(join(worktree, '.mx-coordination-team'), 'coach\n');
730
- await withQueue(() => runStart({ name: 'Coach' }));
731
- expect(readFileSync(join(worktree, '.mx-coordination-team'), 'utf-8')).toBe('coach\n');
732
- expect(rec.launchCtx?.teamName).toBe('Coach');
733
- });
734
- });
735
- //# sourceMappingURL=start-runtime-wiring.test.js.map