oh-my-copilot 5.26.0 → 5.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (779) hide show
  1. package/.claude-plugin/marketplace.json +2 -2
  2. package/.claude-plugin/plugin.json +2 -1
  3. package/agents/executor.md +1 -0
  4. package/bridge/claude-md-coordinator.cjs +2 -2
  5. package/bridge/cli.cjs +23572 -17129
  6. package/bridge/mcp-server.cjs +2721 -1497
  7. package/bridge/runtime-cli.cjs +4707 -1925
  8. package/bridge/team-mcp.cjs +2917 -816
  9. package/bridge/team.js +5397 -2381
  10. package/copilot/agents/executor.md +1 -0
  11. package/copilot/hooks.json +3 -3
  12. package/dist/__tests__/arguments-literal-substitution.test.d.ts +2 -0
  13. package/dist/__tests__/arguments-literal-substitution.test.d.ts.map +1 -0
  14. package/dist/__tests__/arguments-literal-substitution.test.js +34 -0
  15. package/dist/__tests__/arguments-literal-substitution.test.js.map +1 -0
  16. package/dist/__tests__/bridge-self-contained.test.d.ts +2 -0
  17. package/dist/__tests__/bridge-self-contained.test.d.ts.map +1 -0
  18. package/dist/__tests__/bridge-self-contained.test.js +44 -0
  19. package/dist/__tests__/bridge-self-contained.test.js.map +1 -0
  20. package/dist/__tests__/context-safety.test.js +1 -1
  21. package/dist/__tests__/context-safety.test.js.map +1 -1
  22. package/dist/__tests__/copilot-hook-dispatch.test.js +5 -1
  23. package/dist/__tests__/copilot-hook-dispatch.test.js.map +1 -1
  24. package/dist/__tests__/copilot-hooks-manifest.test.js +15 -1
  25. package/dist/__tests__/copilot-hooks-manifest.test.js.map +1 -1
  26. package/dist/__tests__/directory-context-injector-registration.test.js +5 -2
  27. package/dist/__tests__/directory-context-injector-registration.test.js.map +1 -1
  28. package/dist/__tests__/doctor-conflicts.test.js +61 -0
  29. package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
  30. package/dist/__tests__/hook-command-normalizer.test.js +96 -58
  31. package/dist/__tests__/hook-command-normalizer.test.js.map +1 -1
  32. package/dist/__tests__/hooks/session-end-cleanup.test.js +87 -1
  33. package/dist/__tests__/hooks/session-end-cleanup.test.js.map +1 -1
  34. package/dist/__tests__/hooks-command-escaping.test.js +18 -16
  35. package/dist/__tests__/hooks-command-escaping.test.js.map +1 -1
  36. package/dist/__tests__/hud/omc-state.test.js +62 -1
  37. package/dist/__tests__/hud/omc-state.test.js.map +1 -1
  38. package/dist/__tests__/installer-mcp-config.test.js +39 -1
  39. package/dist/__tests__/installer-mcp-config.test.js.map +1 -1
  40. package/dist/__tests__/issue-2652-runtime-wiring-and-output-contract.test.js +1 -1
  41. package/dist/__tests__/issue-2652-runtime-wiring-and-output-contract.test.js.map +1 -1
  42. package/dist/__tests__/keyword-detector-echo-guard.test.js +13 -1
  43. package/dist/__tests__/keyword-detector-echo-guard.test.js.map +1 -1
  44. package/dist/__tests__/keyword-detector-script.test.js +201 -0
  45. package/dist/__tests__/keyword-detector-script.test.js.map +1 -1
  46. package/dist/__tests__/npm-package-surface-helpers.d.ts.map +1 -1
  47. package/dist/__tests__/npm-package-surface-helpers.js +8 -4
  48. package/dist/__tests__/npm-package-surface-helpers.js.map +1 -1
  49. package/dist/__tests__/plugin-setup-deps.test.js +144 -71
  50. package/dist/__tests__/plugin-setup-deps.test.js.map +1 -1
  51. package/dist/__tests__/preemptive-compaction-hook.test.js +62 -5
  52. package/dist/__tests__/preemptive-compaction-hook.test.js.map +1 -1
  53. package/dist/__tests__/ralph-prd-mandatory.test.js +3 -0
  54. package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
  55. package/dist/__tests__/rate-limit-wait/herdr-daemon.test.d.ts +10 -0
  56. package/dist/__tests__/rate-limit-wait/herdr-daemon.test.d.ts.map +1 -0
  57. package/dist/__tests__/rate-limit-wait/herdr-daemon.test.js +241 -0
  58. package/dist/__tests__/rate-limit-wait/herdr-daemon.test.js.map +1 -0
  59. package/dist/__tests__/rate-limit-wait/herdr-detector.test.d.ts +9 -0
  60. package/dist/__tests__/rate-limit-wait/herdr-detector.test.d.ts.map +1 -0
  61. package/dist/__tests__/rate-limit-wait/herdr-detector.test.js +162 -0
  62. package/dist/__tests__/rate-limit-wait/herdr-detector.test.js.map +1 -0
  63. package/dist/__tests__/repair-plugin-cache-script.test.js +7 -1
  64. package/dist/__tests__/repair-plugin-cache-script.test.js.map +1 -1
  65. package/dist/__tests__/run-cjs-graceful-fallback.test.js +3 -2
  66. package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -1
  67. package/dist/__tests__/run-cjs-windows-stdio-contract.test.js +4 -1
  68. package/dist/__tests__/run-cjs-windows-stdio-contract.test.js.map +1 -1
  69. package/dist/__tests__/setup-contracts-regression.test.js +13 -10
  70. package/dist/__tests__/setup-contracts-regression.test.js.map +1 -1
  71. package/dist/__tests__/skills.test.js +10 -9
  72. package/dist/__tests__/skills.test.js.map +1 -1
  73. package/dist/alias-retirement/__tests__/registry.test.js +2 -2
  74. package/dist/cli/__tests__/doctor-conflicts-json.test.js +2 -2
  75. package/dist/cli/__tests__/doctor-conflicts-json.test.js.map +1 -1
  76. package/dist/cli/__tests__/herdr-no-raw-calls.test.d.ts +10 -0
  77. package/dist/cli/__tests__/herdr-no-raw-calls.test.d.ts.map +1 -0
  78. package/dist/cli/__tests__/herdr-no-raw-calls.test.js +54 -0
  79. package/dist/cli/__tests__/herdr-no-raw-calls.test.js.map +1 -0
  80. package/dist/cli/__tests__/interop-herdr.test.d.ts +9 -0
  81. package/dist/cli/__tests__/interop-herdr.test.d.ts.map +1 -0
  82. package/dist/cli/__tests__/interop-herdr.test.js +138 -0
  83. package/dist/cli/__tests__/interop-herdr.test.js.map +1 -0
  84. package/dist/cli/__tests__/launch-herdr.test.d.ts +10 -0
  85. package/dist/cli/__tests__/launch-herdr.test.d.ts.map +1 -0
  86. package/dist/cli/__tests__/launch-herdr.test.js +141 -0
  87. package/dist/cli/__tests__/launch-herdr.test.js.map +1 -0
  88. package/dist/cli/__tests__/launch.test.js +140 -10
  89. package/dist/cli/__tests__/launch.test.js.map +1 -1
  90. package/dist/cli/__tests__/plugin-dir-capture.test.js +2 -0
  91. package/dist/cli/__tests__/plugin-dir-capture.test.js.map +1 -1
  92. package/dist/cli/__tests__/ralph-afk.test.js +392 -2
  93. package/dist/cli/__tests__/ralph-afk.test.js.map +1 -1
  94. package/dist/cli/__tests__/ralph-closeout.test.d.ts +2 -0
  95. package/dist/cli/__tests__/ralph-closeout.test.d.ts.map +1 -0
  96. package/dist/cli/__tests__/ralph-closeout.test.js +156 -0
  97. package/dist/cli/__tests__/ralph-closeout.test.js.map +1 -0
  98. package/dist/cli/__tests__/subcommand-json-flag.test.d.ts +2 -0
  99. package/dist/cli/__tests__/subcommand-json-flag.test.d.ts.map +1 -0
  100. package/dist/cli/__tests__/subcommand-json-flag.test.js +86 -0
  101. package/dist/cli/__tests__/subcommand-json-flag.test.js.map +1 -0
  102. package/dist/cli/__tests__/team-resume-v2.test.js +46 -0
  103. package/dist/cli/__tests__/team-resume-v2.test.js.map +1 -1
  104. package/dist/cli/__tests__/team.test.js +24 -0
  105. package/dist/cli/__tests__/team.test.js.map +1 -1
  106. package/dist/cli/__tests__/wait-teleport-json.test.js +2 -2
  107. package/dist/cli/__tests__/wait-teleport-json.test.js.map +1 -1
  108. package/dist/cli/commands/__tests__/factory-run-cli.test.js +20 -0
  109. package/dist/cli/commands/__tests__/factory-run-cli.test.js.map +1 -1
  110. package/dist/cli/commands/__tests__/release-cli.test.js +11 -0
  111. package/dist/cli/commands/__tests__/release-cli.test.js.map +1 -1
  112. package/dist/cli/commands/__tests__/ship-cli.test.js +1 -1
  113. package/dist/cli/commands/__tests__/ship-cli.test.js.map +1 -1
  114. package/dist/cli/commands/__tests__/teleport.test.js +42 -0
  115. package/dist/cli/commands/__tests__/teleport.test.js.map +1 -1
  116. package/dist/cli/commands/__tests__/wait.test.js +33 -1
  117. package/dist/cli/commands/__tests__/wait.test.js.map +1 -1
  118. package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
  119. package/dist/cli/commands/doctor-conflicts.js +6 -2
  120. package/dist/cli/commands/doctor-conflicts.js.map +1 -1
  121. package/dist/cli/commands/factory-bench.d.ts.map +1 -1
  122. package/dist/cli/commands/factory-bench.js +17 -3
  123. package/dist/cli/commands/factory-bench.js.map +1 -1
  124. package/dist/cli/commands/factory-dashboard.d.ts +5 -1
  125. package/dist/cli/commands/factory-dashboard.d.ts.map +1 -1
  126. package/dist/cli/commands/factory-dashboard.js +6 -2
  127. package/dist/cli/commands/factory-dashboard.js.map +1 -1
  128. package/dist/cli/commands/factory.d.ts +6 -0
  129. package/dist/cli/commands/factory.d.ts.map +1 -1
  130. package/dist/cli/commands/factory.js +45 -4
  131. package/dist/cli/commands/factory.js.map +1 -1
  132. package/dist/cli/commands/ralph.d.ts +36 -1
  133. package/dist/cli/commands/ralph.d.ts.map +1 -1
  134. package/dist/cli/commands/ralph.js +298 -50
  135. package/dist/cli/commands/ralph.js.map +1 -1
  136. package/dist/cli/commands/release.d.ts +3 -1
  137. package/dist/cli/commands/release.d.ts.map +1 -1
  138. package/dist/cli/commands/release.js +12 -3
  139. package/dist/cli/commands/release.js.map +1 -1
  140. package/dist/cli/commands/ship.d.ts.map +1 -1
  141. package/dist/cli/commands/ship.js +8 -4
  142. package/dist/cli/commands/ship.js.map +1 -1
  143. package/dist/cli/commands/team.d.ts.map +1 -1
  144. package/dist/cli/commands/team.js +2 -0
  145. package/dist/cli/commands/team.js.map +1 -1
  146. package/dist/cli/commands/teleport.d.ts.map +1 -1
  147. package/dist/cli/commands/teleport.js +6 -1
  148. package/dist/cli/commands/teleport.js.map +1 -1
  149. package/dist/cli/commands/wait.d.ts.map +1 -1
  150. package/dist/cli/commands/wait.js +3 -1
  151. package/dist/cli/commands/wait.js.map +1 -1
  152. package/dist/cli/index.js +8 -8
  153. package/dist/cli/index.js.map +1 -1
  154. package/dist/cli/interop.d.ts +4 -3
  155. package/dist/cli/interop.d.ts.map +1 -1
  156. package/dist/cli/interop.js +95 -4
  157. package/dist/cli/interop.js.map +1 -1
  158. package/dist/cli/launch.d.ts +17 -2
  159. package/dist/cli/launch.d.ts.map +1 -1
  160. package/dist/cli/launch.js +110 -12
  161. package/dist/cli/launch.js.map +1 -1
  162. package/dist/cli/team.d.ts.map +1 -1
  163. package/dist/cli/team.js +4 -1
  164. package/dist/cli/team.js.map +1 -1
  165. package/dist/commands/index.js +1 -1
  166. package/dist/commands/index.js.map +1 -1
  167. package/dist/config/loader.d.ts.map +1 -1
  168. package/dist/config/loader.js +17 -0
  169. package/dist/config/loader.js.map +1 -1
  170. package/dist/copilot-run/job.d.ts +2 -0
  171. package/dist/copilot-run/job.d.ts.map +1 -1
  172. package/dist/copilot-run/job.js +3 -0
  173. package/dist/copilot-run/job.js.map +1 -1
  174. package/dist/copilot-run/sandbox.d.ts +16 -0
  175. package/dist/copilot-run/sandbox.d.ts.map +1 -1
  176. package/dist/copilot-run/sandbox.js +29 -2
  177. package/dist/copilot-run/sandbox.js.map +1 -1
  178. package/dist/factory/bench/__tests__/bench.units.test.js +133 -1
  179. package/dist/factory/bench/__tests__/bench.units.test.js.map +1 -1
  180. package/dist/factory/bench/score.d.ts +33 -1
  181. package/dist/factory/bench/score.d.ts.map +1 -1
  182. package/dist/factory/bench/score.js +95 -5
  183. package/dist/factory/bench/score.js.map +1 -1
  184. package/dist/factory/board/__tests__/board.test.js +31 -1
  185. package/dist/factory/board/__tests__/board.test.js.map +1 -1
  186. package/dist/factory/board/collect.d.ts +5 -2
  187. package/dist/factory/board/collect.d.ts.map +1 -1
  188. package/dist/factory/board/collect.js +7 -2
  189. package/dist/factory/board/collect.js.map +1 -1
  190. package/dist/factory/check/cli.d.ts.map +1 -1
  191. package/dist/factory/check/cli.js +6 -2
  192. package/dist/factory/check/cli.js.map +1 -1
  193. package/dist/factory/dashboard/__tests__/dashboard.test.js +10 -0
  194. package/dist/factory/dashboard/__tests__/dashboard.test.js.map +1 -1
  195. package/dist/factory/run/__tests__/auto-merge.test.js +2 -0
  196. package/dist/factory/run/__tests__/auto-merge.test.js.map +1 -1
  197. package/dist/factory/run/__tests__/claims.test.js +15 -0
  198. package/dist/factory/run/__tests__/claims.test.js.map +1 -1
  199. package/dist/factory/run/__tests__/container-gate.test.js +59 -1
  200. package/dist/factory/run/__tests__/container-gate.test.js.map +1 -1
  201. package/dist/factory/run/__tests__/engine-local-harness.d.ts.map +1 -1
  202. package/dist/factory/run/__tests__/engine-local-harness.js +6 -0
  203. package/dist/factory/run/__tests__/engine-local-harness.js.map +1 -1
  204. package/dist/factory/run/__tests__/engine-local-harness.test.d.ts +2 -0
  205. package/dist/factory/run/__tests__/engine-local-harness.test.d.ts.map +1 -0
  206. package/dist/factory/run/__tests__/engine-local-harness.test.js +23 -0
  207. package/dist/factory/run/__tests__/engine-local-harness.test.js.map +1 -0
  208. package/dist/factory/run/__tests__/engine.gates-git-transport.test.d.ts +2 -0
  209. package/dist/factory/run/__tests__/engine.gates-git-transport.test.d.ts.map +1 -0
  210. package/dist/factory/run/__tests__/engine.gates-git-transport.test.js +392 -0
  211. package/dist/factory/run/__tests__/engine.gates-git-transport.test.js.map +1 -0
  212. package/dist/factory/run/__tests__/engine.gates-test-delta.test.d.ts +2 -0
  213. package/dist/factory/run/__tests__/engine.gates-test-delta.test.d.ts.map +1 -0
  214. package/dist/factory/run/__tests__/engine.gates-test-delta.test.js +347 -0
  215. package/dist/factory/run/__tests__/engine.gates-test-delta.test.js.map +1 -0
  216. package/dist/factory/run/__tests__/engine.gates-tree-copy.test.d.ts +2 -0
  217. package/dist/factory/run/__tests__/engine.gates-tree-copy.test.d.ts.map +1 -0
  218. package/dist/factory/run/__tests__/engine.gates-tree-copy.test.js +235 -0
  219. package/dist/factory/run/__tests__/engine.gates-tree-copy.test.js.map +1 -0
  220. package/dist/factory/run/__tests__/engine.human-merged.test.d.ts +2 -0
  221. package/dist/factory/run/__tests__/engine.human-merged.test.d.ts.map +1 -0
  222. package/dist/factory/run/__tests__/engine.human-merged.test.js +171 -0
  223. package/dist/factory/run/__tests__/engine.human-merged.test.js.map +1 -0
  224. package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.d.ts +2 -0
  225. package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.d.ts.map +1 -0
  226. package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.js +56 -0
  227. package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.js.map +1 -0
  228. package/dist/factory/run/__tests__/engine.local.human-merged.test.d.ts +2 -0
  229. package/dist/factory/run/__tests__/engine.local.human-merged.test.d.ts.map +1 -0
  230. package/dist/factory/run/__tests__/engine.local.human-merged.test.js +48 -0
  231. package/dist/factory/run/__tests__/engine.local.human-merged.test.js.map +1 -0
  232. package/dist/factory/run/__tests__/engine.stall.test.d.ts +2 -0
  233. package/dist/factory/run/__tests__/engine.stall.test.d.ts.map +1 -0
  234. package/dist/factory/run/__tests__/engine.stall.test.js +137 -0
  235. package/dist/factory/run/__tests__/engine.stall.test.js.map +1 -0
  236. package/dist/factory/run/__tests__/fake-lanes.d.ts +6 -0
  237. package/dist/factory/run/__tests__/fake-lanes.d.ts.map +1 -1
  238. package/dist/factory/run/__tests__/fake-lanes.js +17 -1
  239. package/dist/factory/run/__tests__/fake-lanes.js.map +1 -1
  240. package/dist/factory/run/__tests__/human-merged.test.d.ts +2 -0
  241. package/dist/factory/run/__tests__/human-merged.test.d.ts.map +1 -0
  242. package/dist/factory/run/__tests__/human-merged.test.js +301 -0
  243. package/dist/factory/run/__tests__/human-merged.test.js.map +1 -0
  244. package/dist/factory/run/__tests__/lane.test.js +2 -0
  245. package/dist/factory/run/__tests__/lane.test.js.map +1 -1
  246. package/dist/factory/run/__tests__/merge-policy.test.js +16 -0
  247. package/dist/factory/run/__tests__/merge-policy.test.js.map +1 -1
  248. package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.d.ts +2 -0
  249. package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.d.ts.map +1 -0
  250. package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.js +137 -0
  251. package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.js.map +1 -0
  252. package/dist/factory/run/__tests__/prepare-gates.crash.test.js +21 -0
  253. package/dist/factory/run/__tests__/prepare-gates.crash.test.js.map +1 -1
  254. package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js +11 -0
  255. package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js.map +1 -1
  256. package/dist/factory/run/__tests__/prepare-gates.test.js +39 -0
  257. package/dist/factory/run/__tests__/prepare-gates.test.js.map +1 -1
  258. package/dist/factory/run/__tests__/private-store.test.js +22 -1
  259. package/dist/factory/run/__tests__/private-store.test.js.map +1 -1
  260. package/dist/factory/run/__tests__/test-delta.test.d.ts +2 -0
  261. package/dist/factory/run/__tests__/test-delta.test.d.ts.map +1 -0
  262. package/dist/factory/run/__tests__/test-delta.test.js +239 -0
  263. package/dist/factory/run/__tests__/test-delta.test.js.map +1 -0
  264. package/dist/factory/run/__tests__/units.test.js +219 -2
  265. package/dist/factory/run/__tests__/units.test.js.map +1 -1
  266. package/dist/factory/run/__tests__/workspace-tree.test.js +16 -4
  267. package/dist/factory/run/__tests__/workspace-tree.test.js.map +1 -1
  268. package/dist/factory/run/auto-merge.d.ts +4 -0
  269. package/dist/factory/run/auto-merge.d.ts.map +1 -1
  270. package/dist/factory/run/auto-merge.js +3 -0
  271. package/dist/factory/run/auto-merge.js.map +1 -1
  272. package/dist/factory/run/budget.d.ts +6 -0
  273. package/dist/factory/run/budget.d.ts.map +1 -1
  274. package/dist/factory/run/budget.js +5 -0
  275. package/dist/factory/run/budget.js.map +1 -1
  276. package/dist/factory/run/claims.d.ts.map +1 -1
  277. package/dist/factory/run/claims.js +5 -3
  278. package/dist/factory/run/claims.js.map +1 -1
  279. package/dist/factory/run/container-gate.d.ts +14 -1
  280. package/dist/factory/run/container-gate.d.ts.map +1 -1
  281. package/dist/factory/run/container-gate.js +42 -4
  282. package/dist/factory/run/container-gate.js.map +1 -1
  283. package/dist/factory/run/engine.d.ts +46 -1
  284. package/dist/factory/run/engine.d.ts.map +1 -1
  285. package/dist/factory/run/engine.js +779 -68
  286. package/dist/factory/run/engine.js.map +1 -1
  287. package/dist/factory/run/human-merged.d.ts +105 -0
  288. package/dist/factory/run/human-merged.d.ts.map +1 -0
  289. package/dist/factory/run/human-merged.js +256 -0
  290. package/dist/factory/run/human-merged.js.map +1 -0
  291. package/dist/factory/run/lane.d.ts +2 -0
  292. package/dist/factory/run/lane.d.ts.map +1 -1
  293. package/dist/factory/run/lane.js +1 -0
  294. package/dist/factory/run/lane.js.map +1 -1
  295. package/dist/factory/run/merge-policy.d.ts +1 -2
  296. package/dist/factory/run/merge-policy.d.ts.map +1 -1
  297. package/dist/factory/run/merge-policy.js +5 -12
  298. package/dist/factory/run/merge-policy.js.map +1 -1
  299. package/dist/factory/run/prepare.d.ts +40 -1
  300. package/dist/factory/run/prepare.d.ts.map +1 -1
  301. package/dist/factory/run/prepare.js +240 -38
  302. package/dist/factory/run/prepare.js.map +1 -1
  303. package/dist/factory/run/private-run.d.ts +2 -1
  304. package/dist/factory/run/private-run.d.ts.map +1 -1
  305. package/dist/factory/run/private-run.js +5 -2
  306. package/dist/factory/run/private-run.js.map +1 -1
  307. package/dist/factory/run/prompts.d.ts +2 -2
  308. package/dist/factory/run/prompts.d.ts.map +1 -1
  309. package/dist/factory/run/prompts.js +7 -6
  310. package/dist/factory/run/prompts.js.map +1 -1
  311. package/dist/factory/run/sandbox-exec.d.ts +9 -1
  312. package/dist/factory/run/sandbox-exec.d.ts.map +1 -1
  313. package/dist/factory/run/sandbox-exec.js.map +1 -1
  314. package/dist/factory/run/state.d.ts +54 -1
  315. package/dist/factory/run/state.d.ts.map +1 -1
  316. package/dist/factory/run/state.js +23 -2
  317. package/dist/factory/run/state.js.map +1 -1
  318. package/dist/factory/run/test-delta.d.ts +123 -0
  319. package/dist/factory/run/test-delta.d.ts.map +1 -0
  320. package/dist/factory/run/test-delta.js +236 -0
  321. package/dist/factory/run/test-delta.js.map +1 -0
  322. package/dist/features/__tests__/checkpoint.test.js +118 -1
  323. package/dist/features/__tests__/checkpoint.test.js.map +1 -1
  324. package/dist/features/__tests__/jev-model-routing.test.js +20 -2
  325. package/dist/features/__tests__/jev-model-routing.test.js.map +1 -1
  326. package/dist/features/__tests__/jev-slop-warning.test.js +22 -2
  327. package/dist/features/__tests__/jev-slop-warning.test.js.map +1 -1
  328. package/dist/features/checkpoint/index.d.ts.map +1 -1
  329. package/dist/features/checkpoint/index.js +25 -8
  330. package/dist/features/checkpoint/index.js.map +1 -1
  331. package/dist/features/jev-slop-warning.d.ts +3 -2
  332. package/dist/features/jev-slop-warning.d.ts.map +1 -1
  333. package/dist/features/jev-slop-warning.js +5 -3
  334. package/dist/features/jev-slop-warning.js.map +1 -1
  335. package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
  336. package/dist/features/rate-limit-wait/daemon.js +55 -9
  337. package/dist/features/rate-limit-wait/daemon.js.map +1 -1
  338. package/dist/features/rate-limit-wait/tmux-detector.d.ts +33 -0
  339. package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -1
  340. package/dist/features/rate-limit-wait/tmux-detector.js +156 -0
  341. package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
  342. package/dist/forge/__tests__/gh-argv-baseline.factory.test.js +4 -2
  343. package/dist/forge/__tests__/gh-argv-baseline.factory.test.js.map +1 -1
  344. package/dist/forge/ado/__tests__/adapter.test.js +7 -0
  345. package/dist/forge/ado/__tests__/adapter.test.js.map +1 -1
  346. package/dist/forge/ado/reviews.d.ts.map +1 -1
  347. package/dist/forge/ado/reviews.js +6 -0
  348. package/dist/forge/ado/reviews.js.map +1 -1
  349. package/dist/forge/github/__tests__/mergeability.test.d.ts +2 -0
  350. package/dist/forge/github/__tests__/mergeability.test.d.ts.map +1 -0
  351. package/dist/forge/github/__tests__/mergeability.test.js +34 -0
  352. package/dist/forge/github/__tests__/mergeability.test.js.map +1 -0
  353. package/dist/forge/github/reviews.d.ts +7 -1
  354. package/dist/forge/github/reviews.d.ts.map +1 -1
  355. package/dist/forge/github/reviews.js +13 -0
  356. package/dist/forge/github/reviews.js.map +1 -1
  357. package/dist/forge/local/__tests__/mirror.test.js +3 -1
  358. package/dist/forge/local/__tests__/mirror.test.js.map +1 -1
  359. package/dist/forge/local/__tests__/reviews.test.js +19 -0
  360. package/dist/forge/local/__tests__/reviews.test.js.map +1 -1
  361. package/dist/forge/local/mirror.d.ts +2 -0
  362. package/dist/forge/local/mirror.d.ts.map +1 -1
  363. package/dist/forge/local/mirror.js +2 -0
  364. package/dist/forge/local/mirror.js.map +1 -1
  365. package/dist/forge/local/reviews.d.ts.map +1 -1
  366. package/dist/forge/local/reviews.js +12 -1
  367. package/dist/forge/local/reviews.js.map +1 -1
  368. package/dist/forge/types.d.ts +13 -0
  369. package/dist/forge/types.d.ts.map +1 -1
  370. package/dist/graph/schema.d.ts +10 -10
  371. package/dist/hooks/__tests__/precompact-restore.test.js +38 -0
  372. package/dist/hooks/__tests__/precompact-restore.test.js.map +1 -1
  373. package/dist/hooks/__tests__/workflow-drift-guard-script.test.js +7 -2
  374. package/dist/hooks/__tests__/workflow-drift-guard-script.test.js.map +1 -1
  375. package/dist/hooks/auto-slash-command/executor.js +1 -1
  376. package/dist/hooks/auto-slash-command/executor.js.map +1 -1
  377. package/dist/hooks/code-simplifier/__tests__/jev-trigger-shadow.test.js +24 -2
  378. package/dist/hooks/code-simplifier/__tests__/jev-trigger-shadow.test.js.map +1 -1
  379. package/dist/hooks/code-simplifier/jev-shadow.d.ts.map +1 -1
  380. package/dist/hooks/code-simplifier/jev-shadow.js +6 -4
  381. package/dist/hooks/code-simplifier/jev-shadow.js.map +1 -1
  382. package/dist/hooks/jev/__tests__/client.test.js +20 -1
  383. package/dist/hooks/jev/__tests__/client.test.js.map +1 -1
  384. package/dist/hooks/jev/__tests__/log-context.test.d.ts +2 -0
  385. package/dist/hooks/jev/__tests__/log-context.test.d.ts.map +1 -0
  386. package/dist/hooks/jev/__tests__/log-context.test.js +97 -0
  387. package/dist/hooks/jev/__tests__/log-context.test.js.map +1 -0
  388. package/dist/hooks/jev/__tests__/log-rotation.test.d.ts +2 -0
  389. package/dist/hooks/jev/__tests__/log-rotation.test.d.ts.map +1 -0
  390. package/dist/hooks/jev/__tests__/log-rotation.test.js +148 -0
  391. package/dist/hooks/jev/__tests__/log-rotation.test.js.map +1 -0
  392. package/dist/hooks/jev/__tests__/resolver-request-count.test.d.ts +2 -0
  393. package/dist/hooks/jev/__tests__/resolver-request-count.test.d.ts.map +1 -0
  394. package/dist/hooks/jev/__tests__/resolver-request-count.test.js +117 -0
  395. package/dist/hooks/jev/__tests__/resolver-request-count.test.js.map +1 -0
  396. package/dist/hooks/jev/__tests__/resolver.test.js +63 -1
  397. package/dist/hooks/jev/__tests__/resolver.test.js.map +1 -1
  398. package/dist/hooks/jev/__tests__/shared-breaker.test.d.ts +2 -0
  399. package/dist/hooks/jev/__tests__/shared-breaker.test.d.ts.map +1 -0
  400. package/dist/hooks/jev/__tests__/shared-breaker.test.js +294 -0
  401. package/dist/hooks/jev/__tests__/shared-breaker.test.js.map +1 -0
  402. package/dist/hooks/jev/__tests__/state-omit-ids.test.d.ts +2 -0
  403. package/dist/hooks/jev/__tests__/state-omit-ids.test.d.ts.map +1 -0
  404. package/dist/hooks/jev/__tests__/state-omit-ids.test.js +88 -0
  405. package/dist/hooks/jev/__tests__/state-omit-ids.test.js.map +1 -0
  406. package/dist/hooks/jev/client.d.ts +34 -2
  407. package/dist/hooks/jev/client.d.ts.map +1 -1
  408. package/dist/hooks/jev/client.js +80 -5
  409. package/dist/hooks/jev/client.js.map +1 -1
  410. package/dist/hooks/jev/config.d.ts +78 -4
  411. package/dist/hooks/jev/config.d.ts.map +1 -1
  412. package/dist/hooks/jev/config.js +123 -9
  413. package/dist/hooks/jev/config.js.map +1 -1
  414. package/dist/hooks/jev/points.d.ts +2 -0
  415. package/dist/hooks/jev/points.d.ts.map +1 -1
  416. package/dist/hooks/jev/points.js +41 -10
  417. package/dist/hooks/jev/points.js.map +1 -1
  418. package/dist/hooks/jev/resolver.d.ts +27 -2
  419. package/dist/hooks/jev/resolver.d.ts.map +1 -1
  420. package/dist/hooks/jev/resolver.js +176 -20
  421. package/dist/hooks/jev/resolver.js.map +1 -1
  422. package/dist/hooks/jev/types.d.ts +21 -4
  423. package/dist/hooks/jev/types.d.ts.map +1 -1
  424. package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.d.ts +2 -0
  425. package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.d.ts.map +1 -0
  426. package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.js +209 -0
  427. package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.js.map +1 -0
  428. package/dist/hooks/keyword-detector/__tests__/index.test.js +6 -1
  429. package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
  430. package/dist/hooks/keyword-detector/__tests__/jev-shadow.test.js +15 -0
  431. package/dist/hooks/keyword-detector/__tests__/jev-shadow.test.js.map +1 -1
  432. package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
  433. package/dist/hooks/keyword-detector/index.js +200 -2
  434. package/dist/hooks/keyword-detector/index.js.map +1 -1
  435. package/dist/hooks/keyword-detector/jev-shadow.js +3 -3
  436. package/dist/hooks/keyword-detector/jev-shadow.js.map +1 -1
  437. package/dist/hooks/learner/__tests__/jev-extraction-shadow.test.js +20 -1
  438. package/dist/hooks/learner/__tests__/jev-extraction-shadow.test.js.map +1 -1
  439. package/dist/hooks/learner/jev-shadow.js +3 -3
  440. package/dist/hooks/learner/jev-shadow.js.map +1 -1
  441. package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.d.ts +2 -0
  442. package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.d.ts.map +1 -0
  443. package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.js +280 -0
  444. package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.js.map +1 -0
  445. package/dist/hooks/persistent-mode/__tests__/error-handling.test.js +2 -2
  446. package/dist/hooks/persistent-mode/__tests__/error-handling.test.js.map +1 -1
  447. package/dist/hooks/persistent-mode/__tests__/jev-loop-continuation-shadow.test.js +47 -1
  448. package/dist/hooks/persistent-mode/__tests__/jev-loop-continuation-shadow.test.js.map +1 -1
  449. package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
  450. package/dist/hooks/persistent-mode/index.js +136 -40
  451. package/dist/hooks/persistent-mode/index.js.map +1 -1
  452. package/dist/hooks/persistent-mode/jev-shadow.d.ts.map +1 -1
  453. package/dist/hooks/persistent-mode/jev-shadow.js +11 -7
  454. package/dist/hooks/persistent-mode/jev-shadow.js.map +1 -1
  455. package/dist/hooks/pre-compact/index.d.ts.map +1 -1
  456. package/dist/hooks/pre-compact/index.js +8 -5
  457. package/dist/hooks/pre-compact/index.js.map +1 -1
  458. package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.d.ts +11 -0
  459. package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.d.ts.map +1 -0
  460. package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.js +227 -0
  461. package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.js.map +1 -0
  462. package/dist/hooks/project-memory/index.d.ts.map +1 -1
  463. package/dist/hooks/project-memory/index.js +26 -6
  464. package/dist/hooks/project-memory/index.js.map +1 -1
  465. package/dist/hooks/ralph/__tests__/closeout.test.d.ts +2 -0
  466. package/dist/hooks/ralph/__tests__/closeout.test.d.ts.map +1 -0
  467. package/dist/hooks/ralph/__tests__/closeout.test.js +82 -0
  468. package/dist/hooks/ralph/__tests__/closeout.test.js.map +1 -0
  469. package/dist/hooks/ralph/__tests__/feedback-baseline.test.js +572 -4
  470. package/dist/hooks/ralph/__tests__/feedback-baseline.test.js.map +1 -1
  471. package/dist/hooks/ralph/__tests__/jev-verdict-shadow.test.js +23 -2
  472. package/dist/hooks/ralph/__tests__/jev-verdict-shadow.test.js.map +1 -1
  473. package/dist/hooks/ralph/closeout.d.ts +34 -0
  474. package/dist/hooks/ralph/closeout.d.ts.map +1 -0
  475. package/dist/hooks/ralph/closeout.js +66 -0
  476. package/dist/hooks/ralph/closeout.js.map +1 -0
  477. package/dist/hooks/ralph/feedback-baseline.d.ts +60 -6
  478. package/dist/hooks/ralph/feedback-baseline.d.ts.map +1 -1
  479. package/dist/hooks/ralph/feedback-baseline.js +302 -15
  480. package/dist/hooks/ralph/feedback-baseline.js.map +1 -1
  481. package/dist/hooks/ralph/index.d.ts +1 -1
  482. package/dist/hooks/ralph/index.d.ts.map +1 -1
  483. package/dist/hooks/ralph/index.js +1 -1
  484. package/dist/hooks/ralph/index.js.map +1 -1
  485. package/dist/hooks/ralph/jev-shadow.js +3 -3
  486. package/dist/hooks/ralph/jev-shadow.js.map +1 -1
  487. package/dist/hooks/ralph/verifier.d.ts +5 -0
  488. package/dist/hooks/ralph/verifier.d.ts.map +1 -1
  489. package/dist/hooks/ralph/verifier.js +21 -10
  490. package/dist/hooks/ralph/verifier.js.map +1 -1
  491. package/dist/hooks/registry/__tests__/registry.test.js +6 -0
  492. package/dist/hooks/registry/__tests__/registry.test.js.map +1 -1
  493. package/dist/hooks/registry/registry.d.ts +6 -2
  494. package/dist/hooks/registry/registry.d.ts.map +1 -1
  495. package/dist/hooks/registry/registry.js +21 -6
  496. package/dist/hooks/registry/registry.js.map +1 -1
  497. package/dist/hooks/registry/types.d.ts +2 -0
  498. package/dist/hooks/registry/types.d.ts.map +1 -1
  499. package/dist/hooks/session-end/__tests__/callbacks.test.js +10 -1
  500. package/dist/hooks/session-end/__tests__/callbacks.test.js.map +1 -1
  501. package/dist/hooks/session-end/__tests__/worker.test.js +111 -2
  502. package/dist/hooks/session-end/__tests__/worker.test.js.map +1 -1
  503. package/dist/hooks/session-end/callbacks.js +1 -1
  504. package/dist/hooks/session-end/callbacks.js.map +1 -1
  505. package/dist/hooks/session-end/cleanup-manifest.d.ts +2 -0
  506. package/dist/hooks/session-end/cleanup-manifest.d.ts.map +1 -1
  507. package/dist/hooks/session-end/cleanup-manifest.js +8 -0
  508. package/dist/hooks/session-end/cleanup-manifest.js.map +1 -1
  509. package/dist/hooks/session-end/index.d.ts.map +1 -1
  510. package/dist/hooks/session-end/index.js +21 -3
  511. package/dist/hooks/session-end/index.js.map +1 -1
  512. package/dist/hooks/session-end/worker.d.ts.map +1 -1
  513. package/dist/hooks/session-end/worker.js +32 -2
  514. package/dist/hooks/session-end/worker.js.map +1 -1
  515. package/dist/hooks/setup/__tests__/windows-patch.test.js +89 -17
  516. package/dist/hooks/setup/__tests__/windows-patch.test.js.map +1 -1
  517. package/dist/hooks/setup/index.d.ts +10 -21
  518. package/dist/hooks/setup/index.d.ts.map +1 -1
  519. package/dist/hooks/setup/index.js +14 -48
  520. package/dist/hooks/setup/index.js.map +1 -1
  521. package/dist/hooks/task-size-detector/__tests__/jev-shadow.test.js +2 -1
  522. package/dist/hooks/task-size-detector/__tests__/jev-shadow.test.js.map +1 -1
  523. package/dist/hud/omc-state.d.ts +8 -0
  524. package/dist/hud/omc-state.d.ts.map +1 -1
  525. package/dist/hud/omc-state.js +23 -2
  526. package/dist/hud/omc-state.js.map +1 -1
  527. package/dist/installer/__tests__/claude-mcp-config-path.test.d.ts +2 -0
  528. package/dist/installer/__tests__/claude-mcp-config-path.test.d.ts.map +1 -0
  529. package/dist/installer/__tests__/claude-mcp-config-path.test.js +323 -0
  530. package/dist/installer/__tests__/claude-mcp-config-path.test.js.map +1 -0
  531. package/dist/installer/__tests__/mcp-registry.test.js +81 -3
  532. package/dist/installer/__tests__/mcp-registry.test.js.map +1 -1
  533. package/dist/installer/__tests__/standalone-hook-reconcile.test.js +36 -0
  534. package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
  535. package/dist/installer/index.d.ts.map +1 -1
  536. package/dist/installer/index.js +16 -4
  537. package/dist/installer/index.js.map +1 -1
  538. package/dist/installer/mcp-registry.d.ts +21 -1
  539. package/dist/installer/mcp-registry.d.ts.map +1 -1
  540. package/dist/installer/mcp-registry.js +101 -20
  541. package/dist/installer/mcp-registry.js.map +1 -1
  542. package/dist/lib/atomic-write.d.ts.map +1 -1
  543. package/dist/lib/atomic-write.js +61 -2
  544. package/dist/lib/atomic-write.js.map +1 -1
  545. package/dist/lib/one-line.d.ts +3 -0
  546. package/dist/lib/one-line.d.ts.map +1 -0
  547. package/dist/lib/one-line.js +5 -0
  548. package/dist/lib/one-line.js.map +1 -0
  549. package/dist/mcp/__tests__/team-cleanup.test.js +13 -0
  550. package/dist/mcp/__tests__/team-cleanup.test.js.map +1 -1
  551. package/dist/mcp/team-job-convergence.d.ts.map +1 -1
  552. package/dist/mcp/team-job-convergence.js +4 -1
  553. package/dist/mcp/team-job-convergence.js.map +1 -1
  554. package/dist/mcp/team-server.js +2 -2
  555. package/dist/mcp/team-server.js.map +1 -1
  556. package/dist/notifications/__tests__/approval-reply.test.js +8 -0
  557. package/dist/notifications/__tests__/approval-reply.test.js.map +1 -1
  558. package/dist/notifications/__tests__/reply-herdr.test.d.ts +8 -0
  559. package/dist/notifications/__tests__/reply-herdr.test.d.ts.map +1 -0
  560. package/dist/notifications/__tests__/reply-herdr.test.js +125 -0
  561. package/dist/notifications/__tests__/reply-herdr.test.js.map +1 -0
  562. package/dist/notifications/__tests__/tmux.test.js +56 -1
  563. package/dist/notifications/__tests__/tmux.test.js.map +1 -1
  564. package/dist/notifications/index.d.ts +1 -1
  565. package/dist/notifications/index.d.ts.map +1 -1
  566. package/dist/notifications/index.js +22 -7
  567. package/dist/notifications/index.js.map +1 -1
  568. package/dist/notifications/reply-listener.d.ts +28 -12
  569. package/dist/notifications/reply-listener.d.ts.map +1 -1
  570. package/dist/notifications/reply-listener.js +326 -172
  571. package/dist/notifications/reply-listener.js.map +1 -1
  572. package/dist/notifications/tmux.d.ts +22 -2
  573. package/dist/notifications/tmux.d.ts.map +1 -1
  574. package/dist/notifications/tmux.js +57 -2
  575. package/dist/notifications/tmux.js.map +1 -1
  576. package/dist/release/__tests__/engine.test.js +74 -2
  577. package/dist/release/__tests__/engine.test.js.map +1 -1
  578. package/dist/release/engine.d.ts +9 -1
  579. package/dist/release/engine.d.ts.map +1 -1
  580. package/dist/release/engine.js +41 -4
  581. package/dist/release/engine.js.map +1 -1
  582. package/dist/shared/types.d.ts +5 -0
  583. package/dist/shared/types.d.ts.map +1 -1
  584. package/dist/ship/__tests__/check-name.test.d.ts +2 -0
  585. package/dist/ship/__tests__/check-name.test.d.ts.map +1 -0
  586. package/dist/ship/__tests__/check-name.test.js +17 -0
  587. package/dist/ship/__tests__/check-name.test.js.map +1 -0
  588. package/dist/ship/__tests__/gates-settle.test.js +13 -1
  589. package/dist/ship/__tests__/gates-settle.test.js.map +1 -1
  590. package/dist/ship/__tests__/prepare-build.test.d.ts +2 -0
  591. package/dist/ship/__tests__/prepare-build.test.d.ts.map +1 -0
  592. package/dist/ship/__tests__/prepare-build.test.js +287 -0
  593. package/dist/ship/__tests__/prepare-build.test.js.map +1 -0
  594. package/dist/ship/__tests__/prepare-merge.test.js +8 -1
  595. package/dist/ship/__tests__/prepare-merge.test.js.map +1 -1
  596. package/dist/ship/__tests__/safety-state.test.js +4 -0
  597. package/dist/ship/__tests__/safety-state.test.js.map +1 -1
  598. package/dist/ship/check-name.d.ts +12 -0
  599. package/dist/ship/check-name.d.ts.map +1 -0
  600. package/dist/ship/check-name.js +13 -0
  601. package/dist/ship/check-name.js.map +1 -0
  602. package/dist/ship/config.d.ts +13 -0
  603. package/dist/ship/config.d.ts.map +1 -1
  604. package/dist/ship/config.js +18 -1
  605. package/dist/ship/config.js.map +1 -1
  606. package/dist/ship/exec.d.ts +8 -0
  607. package/dist/ship/exec.d.ts.map +1 -1
  608. package/dist/ship/exec.js +33 -5
  609. package/dist/ship/exec.js.map +1 -1
  610. package/dist/ship/gates.d.ts.map +1 -1
  611. package/dist/ship/gates.js +3 -2
  612. package/dist/ship/gates.js.map +1 -1
  613. package/dist/ship/merge.d.ts +11 -2
  614. package/dist/ship/merge.d.ts.map +1 -1
  615. package/dist/ship/merge.js +55 -10
  616. package/dist/ship/merge.js.map +1 -1
  617. package/dist/ship/prepare.d.ts +16 -4
  618. package/dist/ship/prepare.d.ts.map +1 -1
  619. package/dist/ship/prepare.js +108 -2
  620. package/dist/ship/prepare.js.map +1 -1
  621. package/dist/team/__tests__/herdr-session-realherdr.test.d.ts +9 -0
  622. package/dist/team/__tests__/herdr-session-realherdr.test.d.ts.map +1 -0
  623. package/dist/team/__tests__/herdr-session-realherdr.test.js +140 -0
  624. package/dist/team/__tests__/herdr-session-realherdr.test.js.map +1 -0
  625. package/dist/team/__tests__/herdr-session.test.d.ts +9 -0
  626. package/dist/team/__tests__/herdr-session.test.d.ts.map +1 -0
  627. package/dist/team/__tests__/herdr-session.test.js +270 -0
  628. package/dist/team/__tests__/herdr-session.test.js.map +1 -0
  629. package/dist/team/__tests__/idle-nudge.test.js +17 -0
  630. package/dist/team/__tests__/idle-nudge.test.js.map +1 -1
  631. package/dist/team/__tests__/mailbox-notification-guard.test.js +403 -181
  632. package/dist/team/__tests__/mailbox-notification-guard.test.js.map +1 -1
  633. package/dist/team/__tests__/scaling-launch-config.test.js +12 -0
  634. package/dist/team/__tests__/scaling-launch-config.test.js.map +1 -1
  635. package/dist/team/__tests__/scaling.test.js +12 -0
  636. package/dist/team/__tests__/scaling.test.js.map +1 -1
  637. package/dist/team/__tests__/task-claim-renewal.test.d.ts +2 -0
  638. package/dist/team/__tests__/task-claim-renewal.test.d.ts.map +1 -0
  639. package/dist/team/__tests__/task-claim-renewal.test.js +421 -0
  640. package/dist/team/__tests__/task-claim-renewal.test.js.map +1 -0
  641. package/dist/team/__tests__/task-storage-integrity.test.js +34 -0
  642. package/dist/team/__tests__/task-storage-integrity.test.js.map +1 -1
  643. package/dist/team/__tests__/tmux-session.create-team-herdr.test.d.ts +11 -0
  644. package/dist/team/__tests__/tmux-session.create-team-herdr.test.d.ts.map +1 -0
  645. package/dist/team/__tests__/tmux-session.create-team-herdr.test.js +99 -0
  646. package/dist/team/__tests__/tmux-session.create-team-herdr.test.js.map +1 -0
  647. package/dist/team/__tests__/tmux-session.herdr-arms.test.d.ts +10 -0
  648. package/dist/team/__tests__/tmux-session.herdr-arms.test.d.ts.map +1 -0
  649. package/dist/team/__tests__/tmux-session.herdr-arms.test.js +226 -0
  650. package/dist/team/__tests__/tmux-session.herdr-arms.test.js.map +1 -0
  651. package/dist/team/__tests__/tmux-session.test.js +888 -721
  652. package/dist/team/__tests__/tmux-session.test.js.map +1 -1
  653. package/dist/team/__tests__/worker-bootstrap.test.js +19 -0
  654. package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
  655. package/dist/team/api-interop.d.ts +1 -1
  656. package/dist/team/api-interop.d.ts.map +1 -1
  657. package/dist/team/api-interop.js +13 -1
  658. package/dist/team/api-interop.js.map +1 -1
  659. package/dist/team/herdr-session.d.ts +267 -0
  660. package/dist/team/herdr-session.d.ts.map +1 -0
  661. package/dist/team/herdr-session.js +508 -0
  662. package/dist/team/herdr-session.js.map +1 -0
  663. package/dist/team/idle-nudge.d.ts +1 -1
  664. package/dist/team/idle-nudge.d.ts.map +1 -1
  665. package/dist/team/idle-nudge.js +4 -4
  666. package/dist/team/idle-nudge.js.map +1 -1
  667. package/dist/team/mailbox-notification-guard.d.ts +24 -19
  668. package/dist/team/mailbox-notification-guard.d.ts.map +1 -1
  669. package/dist/team/mailbox-notification-guard.js +241 -148
  670. package/dist/team/mailbox-notification-guard.js.map +1 -1
  671. package/dist/team/model-contract.d.ts.map +1 -1
  672. package/dist/team/model-contract.js +1 -0
  673. package/dist/team/model-contract.js.map +1 -1
  674. package/dist/team/runtime-v2.d.ts +33 -33
  675. package/dist/team/runtime-v2.d.ts.map +1 -1
  676. package/dist/team/runtime-v2.js +2810 -1591
  677. package/dist/team/runtime-v2.js.map +1 -1
  678. package/dist/team/scaling.d.ts +3 -3
  679. package/dist/team/scaling.d.ts.map +1 -1
  680. package/dist/team/scaling.js +766 -402
  681. package/dist/team/scaling.js.map +1 -1
  682. package/dist/team/state/tasks.d.ts +15 -1
  683. package/dist/team/state/tasks.d.ts.map +1 -1
  684. package/dist/team/state/tasks.js +56 -2
  685. package/dist/team/state/tasks.js.map +1 -1
  686. package/dist/team/team-ops.d.ts +3 -2
  687. package/dist/team/team-ops.d.ts.map +1 -1
  688. package/dist/team/team-ops.js +32 -5
  689. package/dist/team/team-ops.js.map +1 -1
  690. package/dist/team/tmux-session.d.ts +66 -40
  691. package/dist/team/tmux-session.d.ts.map +1 -1
  692. package/dist/team/tmux-session.js +1733 -1096
  693. package/dist/team/tmux-session.js.map +1 -1
  694. package/dist/team/types.d.ts +8 -0
  695. package/dist/team/types.d.ts.map +1 -1
  696. package/dist/team/types.js.map +1 -1
  697. package/dist/team/worker-bootstrap.d.ts.map +1 -1
  698. package/dist/team/worker-bootstrap.js +3 -0
  699. package/dist/team/worker-bootstrap.js.map +1 -1
  700. package/dist/tools/lsp/__tests__/devcontainer.test.js +39 -5
  701. package/dist/tools/lsp/__tests__/devcontainer.test.js.map +1 -1
  702. package/dist/tools/lsp/devcontainer.d.ts.map +1 -1
  703. package/dist/tools/lsp/devcontainer.js +25 -8
  704. package/dist/tools/lsp/devcontainer.js.map +1 -1
  705. package/dist/utils/__tests__/windows-search.test.js +17 -3
  706. package/dist/utils/__tests__/windows-search.test.js.map +1 -1
  707. package/dist/utils/plugin-cache-validation.d.ts.map +1 -1
  708. package/dist/utils/plugin-cache-validation.js +27 -18
  709. package/dist/utils/plugin-cache-validation.js.map +1 -1
  710. package/dist/workflow/__tests__/projections.test.js +3 -3
  711. package/dist/workflow/__tests__/projections.test.js.map +1 -1
  712. package/dist/workflow/__tests__/registry.test.js +3 -3
  713. package/dist/workflow/__tests__/registry.test.js.map +1 -1
  714. package/dist/workflow/registry.d.ts.map +1 -1
  715. package/dist/workflow/registry.js +1 -0
  716. package/dist/workflow/registry.js.map +1 -1
  717. package/docs/ARCHITECTURE.md +1 -1
  718. package/docs/CLAUDE.md +1 -1
  719. package/docs/CREDITS.md +1 -0
  720. package/docs/FEATURES.md +18 -0
  721. package/docs/FIELD-TESTING.md +10 -0
  722. package/docs/HOOKS.md +339 -36
  723. package/docs/REFERENCE.md +82 -17
  724. package/docs/TEAM-MULTIPLEXER.md +107 -0
  725. package/hooks/hooks.json +204 -66
  726. package/hooks/jev-compaction.mjs +2404 -0
  727. package/package.json +2 -2
  728. package/plugin.json +1 -1
  729. package/scripts/check-omc-playbooks.mjs +214 -124
  730. package/scripts/code-simplifier.mjs +26 -3
  731. package/scripts/copilot/build-hooks.mjs +24 -7
  732. package/scripts/generate-inventory-graph.mjs +77 -92
  733. package/scripts/jev-eval.mjs +123 -22
  734. package/scripts/jev-repair-transcript.mjs +331 -0
  735. package/scripts/jev-resolve.mjs +374 -22
  736. package/scripts/keyword-detector.mjs +427 -29
  737. package/scripts/lib/hook-command-normalizer.d.mts +33 -0
  738. package/scripts/lib/hook-command-normalizer.mjs +157 -60
  739. package/scripts/lib/jev-breaker.d.mts +73 -0
  740. package/scripts/lib/jev-breaker.mjs +830 -0
  741. package/scripts/lib/jev-compaction-state.mjs +320 -0
  742. package/scripts/lib/jev-delivery-guard.mjs +567 -0
  743. package/scripts/lib/jev-mask.mjs +36 -0
  744. package/scripts/lib/jev-shadow.mjs +363 -14
  745. package/scripts/lib/shell-checks.mjs +1121 -0
  746. package/scripts/lib/state-root.cjs +19 -8
  747. package/scripts/lib/state-root.mjs +19 -8
  748. package/scripts/persistent-mode.cjs +289 -1
  749. package/scripts/persistent-mode.mjs +540 -91
  750. package/scripts/plugin-setup.mjs +26 -30
  751. package/scripts/plugin-shipping-surface.mjs +4 -1
  752. package/scripts/post-tool-use-failure.mjs +18 -0
  753. package/scripts/post-tool-verifier.mjs +49 -3
  754. package/scripts/pre-tool-enforcer.mjs +658 -64
  755. package/scripts/run.cjs +4 -2
  756. package/scripts/session-start.mjs +54 -0
  757. package/skills/AGENTS.md +1 -0
  758. package/skills/ai-slop-cleaner/SKILL.md +14 -0
  759. package/skills/arena/SKILL.md +8 -1
  760. package/skills/babysit/SKILL.md +2 -1
  761. package/skills/create-formal-verification-skill/SKILL.md +6 -4
  762. package/skills/figure-it-out/SKILL.md +5 -0
  763. package/skills/fix-ci/SKILL.md +3 -1
  764. package/skills/how/references/explainer-prompt.md +7 -4
  765. package/skills/interrogate/SKILL.md +10 -6
  766. package/skills/ralph/SKILL.md +27 -2
  767. package/skills/ralph-experiment/SKILL.md +1 -1
  768. package/skills/sdd/SKILL.md +67 -0
  769. package/skills/sdd/phases/criteria.md +144 -0
  770. package/skills/sdd/phases/execute.md +226 -0
  771. package/skills/sdd/phases/review.md +216 -0
  772. package/skills/sdd/phases/rules.md +195 -0
  773. package/skills/sdd/phases/spec.md +75 -0
  774. package/skills/sdd/phases/tasks.md +162 -0
  775. package/skills/statechart/scripts/run.ts +6 -3
  776. package/skills/statechart/scripts/test/child-env.test.ts +53 -0
  777. package/templates/hooks/keyword-detector.mjs +172 -5
  778. package/templates/hooks/lib/state-root.mjs +19 -8
  779. package/templates/hooks/persistent-mode.mjs +296 -1
@@ -1,9 +1,9 @@
1
- import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';
2
- import { mkdtemp, mkdir, rm, writeFile } from 'node:fs/promises';
3
- import { join } from 'node:path';
4
- import { tmpdir } from 'node:os';
5
- import { teamListMailbox, teamReadCanonicalMailboxMessageStrict, } from '../team-ops.js';
6
- import { evaluateMailboxNotificationGuard, mailboxNotificationSecurityTupleEquals, readCurrentMailboxNotificationGuard, } from '../mailbox-notification-guard.js';
1
+ import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
2
+ import { mkdtemp, mkdir, rm, writeFile } from "node:fs/promises";
3
+ import { join } from "node:path";
4
+ import { tmpdir } from "node:os";
5
+ import { teamListMailbox, teamReadCanonicalMailboxMessageStrict, } from "../team-ops.js";
6
+ import { evaluateMailboxNotificationGuard, mailboxNotificationSecurityTupleEquals, readCurrentMailboxNotificationGuard, } from "../mailbox-notification-guard.js";
7
7
  function isolateFixtureRoot(root) {
8
8
  const home = process.env.HOME;
9
9
  const userProfile = process.env.USERPROFILE;
@@ -26,54 +26,56 @@ function isolateFixtureRoot(root) {
26
26
  process.env.OMC_STATE_DIR = stateDir;
27
27
  };
28
28
  }
29
- const teamName = 'dispatch-team';
30
- const timestamp = '2026-07-13T00:00:00.000Z';
31
- const instanceId = 'aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa';
32
- const supportsStrictTmuxFixture = process.platform === 'darwin' || process.platform === 'linux';
33
- const tmuxServerIdentity = supportsStrictTmuxFixture ? {
34
- socket_path: '/tmp/dispatch-session.sock',
35
- server_pid: 4242,
36
- process_started_at: process.platform === 'linux'
37
- ? 'linux:fixture:4242'
38
- : 'darwin:4242:123456',
39
- } : undefined;
29
+ const teamName = "dispatch-team";
30
+ const timestamp = "2026-07-13T00:00:00.000Z";
31
+ const instanceId = "aaaaaaaa-aaaa-4aaa-8aaa-aaaaaaaaaaaa";
32
+ const supportsStrictTmuxFixture = process.platform === "darwin" || process.platform === "linux";
33
+ const tmuxServerIdentity = supportsStrictTmuxFixture
34
+ ? {
35
+ socket_path: "/tmp/dispatch-session.sock",
36
+ server_pid: 4242,
37
+ process_started_at: process.platform === "linux"
38
+ ? "linux:fixture:4242"
39
+ : "darwin:4242:123456",
40
+ }
41
+ : undefined;
40
42
  // Deliberately malformed evidence for fail-closed cases; never used as
41
43
  // positive authority (including on unsupported platforms).
42
44
  const malformedServerPidIdentity = {
43
- socket_path: '/tmp/dispatch-session.sock',
45
+ socket_path: "/tmp/dispatch-session.sock",
44
46
  server_pid: 0,
45
- process_started_at: 'darwin:4242:123456',
47
+ process_started_at: "darwin:4242:123456",
46
48
  };
47
49
  const malformedServerStartIdentity = {
48
- socket_path: '/tmp/dispatch-session.sock',
50
+ socket_path: "/tmp/dispatch-session.sock",
49
51
  server_pid: 4242,
50
- process_started_at: 'malformed',
52
+ process_started_at: "malformed",
51
53
  };
52
54
  function strictTmuxIdentity() {
53
55
  if (!tmuxServerIdentity)
54
- throw new Error('strict tmux fixture unsupported on this platform');
56
+ throw new Error("strict tmux fixture unsupported on this platform");
55
57
  return tmuxServerIdentity;
56
58
  }
57
59
  const input = {
58
60
  teamName,
59
- recipient: 'worker-1',
60
- requestId: 'request-1',
61
- messageId: 'message-1',
62
- triggerMessage: 'Read your mailbox and report progress.',
61
+ recipient: "worker-1",
62
+ requestId: "request-1",
63
+ messageId: "message-1",
64
+ triggerMessage: "Read your mailbox and report progress.",
63
65
  };
64
66
  function request(overrides = {}) {
65
67
  return {
66
68
  request_id: input.requestId,
67
- kind: 'mailbox',
69
+ kind: "mailbox",
68
70
  team_name: teamName,
69
71
  to_worker: input.recipient,
70
72
  worker_index: 1,
71
- pane_id: '%9',
73
+ pane_id: "%9",
72
74
  trigger_message: input.triggerMessage,
73
75
  message_id: input.messageId,
74
- transport_preference: 'transport_direct',
76
+ transport_preference: "transport_direct",
75
77
  fallback_allowed: true,
76
- status: 'pending',
78
+ status: "pending",
77
79
  attempt_count: 0,
78
80
  created_at: timestamp,
79
81
  updated_at: timestamp,
@@ -83,32 +85,43 @@ function request(overrides = {}) {
83
85
  function message(overrides = {}) {
84
86
  return {
85
87
  message_id: input.messageId,
86
- from_worker: 'leader-fixed',
88
+ from_worker: "leader-fixed",
87
89
  to_worker: input.recipient,
88
- body: 'Continue.',
90
+ body: "Continue.",
89
91
  created_at: timestamp,
90
92
  ...overrides,
91
93
  };
92
94
  }
93
95
  function config(overrides = {}) {
94
96
  const configuredSession = overrides.tmux_session;
95
- const defaultServerIdentity = configuredSession?.startsWith('cmux:')
97
+ const defaultServerIdentity = configuredSession?.startsWith("cmux:") ||
98
+ configuredSession?.startsWith("herdr:")
96
99
  ? undefined
97
100
  : tmuxServerIdentity;
98
101
  return {
99
102
  name: teamName,
100
103
  instance_id: instanceId,
101
- ...(defaultServerIdentity ? { tmux_server_identity: defaultServerIdentity } : {}),
102
- task: 'dispatch',
103
- agent_type: 'claude',
104
- worker_launch_mode: 'interactive',
104
+ ...(defaultServerIdentity
105
+ ? { tmux_server_identity: defaultServerIdentity }
106
+ : {}),
107
+ task: "dispatch",
108
+ agent_type: "claude",
109
+ worker_launch_mode: "interactive",
105
110
  worker_count: 1,
106
111
  max_workers: 20,
107
- workers: [{ name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [], pane_id: '%9' }],
112
+ workers: [
113
+ {
114
+ name: "worker-1",
115
+ index: 1,
116
+ role: "executor",
117
+ assigned_tasks: [],
118
+ pane_id: "%9",
119
+ },
120
+ ],
108
121
  created_at: timestamp,
109
- tmux_session: 'dispatch-session:0',
122
+ tmux_session: "dispatch-session:0",
110
123
  next_task_id: 2,
111
- leader_pane_id: '%0',
124
+ leader_pane_id: "%0",
112
125
  hud_pane_id: null,
113
126
  resize_hook_name: null,
114
127
  resize_hook_target: null,
@@ -116,19 +129,19 @@ function config(overrides = {}) {
116
129
  };
117
130
  }
118
131
  function strictDispatch(value = request()) {
119
- return { kind: 'valid', request: value };
132
+ return { kind: "valid", request: value };
120
133
  }
121
134
  function strictMailbox(value = message()) {
122
- return { kind: 'valid', message: value };
135
+ return { kind: "valid", message: value };
123
136
  }
124
137
  function owned() {
125
138
  if (!tmuxServerIdentity)
126
- return { kind: 'unavailable' };
139
+ return { kind: "unavailable" };
127
140
  return {
128
- kind: 'owned',
129
- provider: 'tmux',
130
- providerTarget: 'dispatch-session:0',
131
- paneId: '%9',
141
+ kind: "owned",
142
+ provider: "tmux",
143
+ providerTarget: "dispatch-session:0",
144
+ paneId: "%9",
132
145
  tmuxServerIdentity,
133
146
  };
134
147
  }
@@ -141,21 +154,25 @@ function validState(overrides = {}) {
141
154
  ...overrides,
142
155
  };
143
156
  }
144
- describe('teamReadCanonicalMailboxMessageStrict', () => {
157
+ describe("teamReadCanonicalMailboxMessageStrict", () => {
145
158
  let cwd;
146
159
  let restoreFixtureEnv;
147
160
  async function writeMailbox(value, workerName = input.recipient) {
148
- const path = join(cwd, '.omg', 'state', 'team', teamName, 'mailbox', `${workerName}.json`);
149
- await mkdir(join(cwd, '.omg', 'state', 'team', teamName, 'mailbox'), { recursive: true });
150
- await writeFile(path, JSON.stringify(value, null, 2), 'utf8');
161
+ const path = join(cwd, ".omg", "state", "team", teamName, "mailbox", `${workerName}.json`);
162
+ await mkdir(join(cwd, ".omg", "state", "team", teamName, "mailbox"), {
163
+ recursive: true,
164
+ });
165
+ await writeFile(path, JSON.stringify(value, null, 2), "utf8");
151
166
  }
152
167
  async function writeRawMailbox(raw, workerName = input.recipient) {
153
- const path = join(cwd, '.omg', 'state', 'team', teamName, 'mailbox', `${workerName}.json`);
154
- await mkdir(join(cwd, '.omg', 'state', 'team', teamName, 'mailbox'), { recursive: true });
155
- await writeFile(path, raw, 'utf8');
168
+ const path = join(cwd, ".omg", "state", "team", teamName, "mailbox", `${workerName}.json`);
169
+ await mkdir(join(cwd, ".omg", "state", "team", teamName, "mailbox"), {
170
+ recursive: true,
171
+ });
172
+ await writeFile(path, raw, "utf8");
156
173
  }
157
174
  beforeEach(async () => {
158
- cwd = await mkdtemp(join(tmpdir(), 'omc-mailbox-strict-'));
175
+ cwd = await mkdtemp(join(tmpdir(), "omc-mailbox-strict-"));
159
176
  restoreFixtureEnv = isolateFixtureRoot(cwd);
160
177
  });
161
178
  afterEach(async () => {
@@ -168,155 +185,230 @@ describe('teamReadCanonicalMailboxMessageStrict', () => {
168
185
  await rm(cwd, { recursive: true, force: true });
169
186
  }
170
187
  });
171
- it('never falls back to legacy JSONL while compatibility reads still do', async () => {
172
- const legacyPath = join(cwd, '.omg', 'state', 'team', teamName, 'mailbox', 'worker-1.jsonl');
173
- await mkdir(join(cwd, '.omg', 'state', 'team', teamName, 'mailbox'), { recursive: true });
188
+ it("never falls back to legacy JSONL while compatibility reads still do", async () => {
189
+ const legacyPath = join(cwd, ".omg", "state", "team", teamName, "mailbox", "worker-1.jsonl");
190
+ await mkdir(join(cwd, ".omg", "state", "team", teamName, "mailbox"), {
191
+ recursive: true,
192
+ });
174
193
  await writeFile(legacyPath, `${JSON.stringify({
175
194
  id: input.messageId,
176
- from: 'leader-fixed',
195
+ from: "leader-fixed",
177
196
  to: input.recipient,
178
- body: 'Continue.',
197
+ body: "Continue.",
179
198
  createdAt: timestamp,
180
- })}\n`, 'utf8');
199
+ })}\n`, "utf8");
181
200
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
182
- kind: 'store_missing',
201
+ kind: "store_missing",
183
202
  });
184
203
  await expect(teamListMailbox(teamName, input.recipient, cwd)).resolves.toMatchObject([
185
204
  { message_id: input.messageId, to_worker: input.recipient },
186
205
  ]);
187
206
  });
188
- it('distinguishes malformed stores, owner mismatch, malformed messages, missing, and duplicates', async () => {
189
- await writeRawMailbox('{not-json');
207
+ it("distinguishes malformed stores, owner mismatch, malformed messages, missing, and duplicates", async () => {
208
+ await writeRawMailbox("{not-json");
190
209
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
191
- kind: 'malformed_store', cause: 'json',
210
+ kind: "malformed_store",
211
+ cause: "json",
192
212
  });
193
213
  await writeMailbox({ worker: input.recipient, messages: {} });
194
214
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
195
- kind: 'malformed_store', cause: 'messages_non_array',
215
+ kind: "malformed_store",
216
+ cause: "messages_non_array",
196
217
  });
197
- await writeMailbox({ worker: 'other-worker', messages: [message()] });
218
+ await writeMailbox({ worker: "other-worker", messages: [message()] });
198
219
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
199
- kind: 'wrong_owner',
220
+ kind: "wrong_owner",
221
+ });
222
+ await writeMailbox({
223
+ worker: input.recipient,
224
+ messages: [{ ...message(), body: 42 }],
200
225
  });
201
- await writeMailbox({ worker: input.recipient, messages: [{ ...message(), body: 42 }] });
202
226
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
203
- kind: 'malformed_message', messageIndex: 0, field: 'body',
227
+ kind: "malformed_message",
228
+ messageIndex: 0,
229
+ field: "body",
230
+ });
231
+ await writeMailbox({
232
+ worker: input.recipient,
233
+ messages: [message({ message_id: "other-message" })],
204
234
  });
205
- await writeMailbox({ worker: input.recipient, messages: [message({ message_id: 'other-message' })] });
206
235
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
207
- kind: 'message_missing',
236
+ kind: "message_missing",
237
+ });
238
+ await writeMailbox({
239
+ worker: input.recipient,
240
+ messages: [message(), message()],
208
241
  });
209
- await writeMailbox({ worker: input.recipient, messages: [message(), message()] });
210
242
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
211
- kind: 'duplicate_message_id', messageId: input.messageId, messageIndexes: [0, 1],
243
+ kind: "duplicate_message_id",
244
+ messageId: input.messageId,
245
+ messageIndexes: [0, 1],
212
246
  });
213
247
  });
214
- it('rejects recipient mismatch and replay, then returns a fresh exact canonical message', async () => {
215
- await writeMailbox({ worker: input.recipient, messages: [message({ to_worker: 'worker-2' })] });
248
+ it("rejects recipient mismatch and replay, then returns a fresh exact canonical message", async () => {
249
+ await writeMailbox({
250
+ worker: input.recipient,
251
+ messages: [message({ to_worker: "worker-2" })],
252
+ });
216
253
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
217
- kind: 'recipient_mismatch', messageIndex: 0,
254
+ kind: "recipient_mismatch",
255
+ messageIndex: 0,
256
+ });
257
+ await writeMailbox({
258
+ worker: input.recipient,
259
+ messages: [message({ notified_at: "2026-07-13T00:01:00.000Z" })],
218
260
  });
219
- await writeMailbox({ worker: input.recipient, messages: [message({ notified_at: '2026-07-13T00:01:00.000Z' })] });
220
261
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toMatchObject({
221
- kind: 'replay_suppressed', marker: 'notified_at',
262
+ kind: "replay_suppressed",
263
+ marker: "notified_at",
222
264
  });
223
265
  await writeMailbox({ worker: input.recipient, messages: [message()] });
224
266
  await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toMatchObject({
225
- kind: 'valid', message: message(),
267
+ kind: "valid",
268
+ message: message(),
226
269
  });
227
270
  });
228
271
  });
229
- describe('mailbox notification guard', () => {
230
- it.skipIf(!supportsStrictTmuxFixture)('allows the deterministic canonical duplicate-worker target only when strict metadata agrees', () => {
272
+ describe("mailbox notification guard", () => {
273
+ it.skipIf(!supportsStrictTmuxFixture)("allows the deterministic canonical duplicate-worker target only when strict metadata agrees", () => {
231
274
  const duplicateConfig = config({
232
275
  workers: [
233
- { name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [] },
234
- { name: 'worker-1', index: 0, role: 'executor', assigned_tasks: [], pane_id: '%9' },
276
+ { name: "worker-1", index: 1, role: "executor", assigned_tasks: [] },
277
+ {
278
+ name: "worker-1",
279
+ index: 0,
280
+ role: "executor",
281
+ assigned_tasks: [],
282
+ pane_id: "%9",
283
+ },
235
284
  ],
236
285
  });
237
286
  const result = evaluateMailboxNotificationGuard(input, validState({ config: duplicateConfig }));
238
- expect(result).toMatchObject({ kind: 'allow', target: { paneId: '%9', recipientRole: 'worker' } });
287
+ expect(result).toMatchObject({
288
+ kind: "allow",
289
+ target: { paneId: "%9", recipientRole: "worker" },
290
+ });
239
291
  const mismatched = evaluateMailboxNotificationGuard(input, validState({
240
292
  config: duplicateConfig,
241
- dispatch: strictDispatch(request({ pane_id: '%foreign' })),
293
+ dispatch: strictDispatch(request({ pane_id: "%foreign" })),
242
294
  }));
243
295
  expect(mismatched).toMatchObject({
244
- kind: 'suppress', reason: 'mailbox_target_metadata_mismatch',
296
+ kind: "suppress",
297
+ reason: "mailbox_target_metadata_mismatch",
245
298
  });
246
299
  });
247
- it('maps every strict evidence and provider failure to a stable pre-effect reason', () => {
300
+ it("maps every strict evidence and provider failure to a stable pre-effect reason", () => {
248
301
  expect(evaluateMailboxNotificationGuard(input, validState({ config: null }))).toMatchObject({
249
- kind: 'suppress', reason: 'mailbox_team_unavailable',
302
+ kind: "suppress",
303
+ reason: "mailbox_team_unavailable",
250
304
  });
251
- expect(evaluateMailboxNotificationGuard(input, validState({ config: config({ name: 'other-team' }) }))).toMatchObject({
252
- kind: 'suppress', reason: 'mailbox_team_identity_mismatch',
305
+ expect(evaluateMailboxNotificationGuard(input, validState({ config: config({ name: "other-team" }) }))).toMatchObject({
306
+ kind: "suppress",
307
+ reason: "mailbox_team_identity_mismatch",
253
308
  });
254
309
  expect(evaluateMailboxNotificationGuard(input, validState({ config: config({ workers: [] }) }))).toMatchObject({
255
- kind: 'suppress', reason: 'mailbox_target_missing',
310
+ kind: "suppress",
311
+ reason: "mailbox_target_missing",
256
312
  });
257
313
  expect(evaluateMailboxNotificationGuard(input, validState({
258
- dispatch: { kind: 'malformed_row', rowIndex: 0, field: 'status' },
259
- }))).toMatchObject({ kind: 'suppress', reason: 'mailbox_dispatch_store_invalid' });
314
+ dispatch: { kind: "malformed_row", rowIndex: 0, field: "status" },
315
+ }))).toMatchObject({
316
+ kind: "suppress",
317
+ reason: "mailbox_dispatch_store_invalid",
318
+ });
260
319
  expect(evaluateMailboxNotificationGuard(input, validState({
261
- dispatch: { kind: 'duplicate_request_id', requestId: input.requestId, rowIndexes: [0, 1] },
262
- }))).toMatchObject({ kind: 'suppress', reason: 'mailbox_request_ambiguous' });
320
+ dispatch: {
321
+ kind: "duplicate_request_id",
322
+ requestId: input.requestId,
323
+ rowIndexes: [0, 1],
324
+ },
325
+ }))).toMatchObject({ kind: "suppress", reason: "mailbox_request_ambiguous" });
263
326
  expect(evaluateMailboxNotificationGuard(input, validState({
264
- dispatch: strictDispatch(request({ status: 'notified' })),
265
- }))).toMatchObject({ kind: 'suppress', reason: 'mailbox_request_not_pending' });
327
+ dispatch: strictDispatch(request({ status: "notified" })),
328
+ }))).toMatchObject({
329
+ kind: "suppress",
330
+ reason: "mailbox_request_not_pending",
331
+ });
266
332
  expect(evaluateMailboxNotificationGuard(input, validState({
267
- dispatch: strictDispatch(request({ trigger_message: 'Different trigger.' })),
268
- }))).toMatchObject({ kind: 'suppress', reason: 'mailbox_request_identity_mismatch' });
333
+ dispatch: strictDispatch(request({ trigger_message: "Different trigger." })),
334
+ }))).toMatchObject({
335
+ kind: "suppress",
336
+ reason: "mailbox_request_identity_mismatch",
337
+ });
269
338
  expect(evaluateMailboxNotificationGuard(input, validState({
270
- mailbox: { kind: 'replay_suppressed', message: message({ notified_at: timestamp }), marker: 'notified_at' },
271
- }))).toMatchObject({ kind: 'suppress', reason: 'mailbox_replay_suppressed' });
339
+ mailbox: {
340
+ kind: "replay_suppressed",
341
+ message: message({ notified_at: timestamp }),
342
+ marker: "notified_at",
343
+ },
344
+ }))).toMatchObject({ kind: "suppress", reason: "mailbox_replay_suppressed" });
272
345
  const foreignState = supportsStrictTmuxFixture
273
- ? validState({ ownership: { kind: 'foreign' } })
346
+ ? validState({ ownership: { kind: "foreign" } })
274
347
  : validState({
275
348
  config: config({
276
- tmux_session: 'cmux:workspace-1',
277
- workers: [{ name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [], pane_id: 'surface-worker-1' }],
349
+ tmux_session: "cmux:workspace-1",
350
+ workers: [
351
+ {
352
+ name: "worker-1",
353
+ index: 1,
354
+ role: "executor",
355
+ assigned_tasks: [],
356
+ pane_id: "surface-worker-1",
357
+ },
358
+ ],
278
359
  }),
279
- dispatch: strictDispatch(request({ pane_id: 'surface-worker-1' })),
280
- ownership: { kind: 'foreign' },
360
+ dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
361
+ ownership: { kind: "foreign" },
281
362
  });
282
363
  expect(evaluateMailboxNotificationGuard(input, foreignState)).toMatchObject({
283
- kind: 'suppress', reason: 'mailbox_target_foreign',
364
+ kind: "suppress",
365
+ reason: "mailbox_target_foreign",
284
366
  });
285
- expect(evaluateMailboxNotificationGuard(input, validState({ ownership: { kind: 'unavailable' } }))).toMatchObject({
286
- kind: 'suppress', reason: 'mailbox_membership_unresolvable',
367
+ expect(evaluateMailboxNotificationGuard(input, validState({ ownership: { kind: "unavailable" } }))).toMatchObject({
368
+ kind: "suppress",
369
+ reason: "mailbox_membership_unresolvable",
287
370
  });
288
371
  const mismatchedOwnershipState = supportsStrictTmuxFixture
289
372
  ? validState({
290
373
  ownership: {
291
- kind: 'owned',
292
- provider: 'tmux',
293
- providerTarget: 'dispatch-session:0',
294
- paneId: '%9',
374
+ kind: "owned",
375
+ provider: "tmux",
376
+ providerTarget: "dispatch-session:0",
377
+ paneId: "%9",
295
378
  tmuxServerIdentity: { ...strictTmuxIdentity(), server_pid: 4343 },
296
379
  },
297
380
  })
298
381
  : validState({
299
382
  config: config({
300
- tmux_session: 'cmux:workspace-1',
301
- workers: [{ name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [], pane_id: 'surface-worker-1' }],
383
+ tmux_session: "cmux:workspace-1",
384
+ workers: [
385
+ {
386
+ name: "worker-1",
387
+ index: 1,
388
+ role: "executor",
389
+ assigned_tasks: [],
390
+ pane_id: "surface-worker-1",
391
+ },
392
+ ],
302
393
  }),
303
- dispatch: strictDispatch(request({ pane_id: 'surface-worker-1' })),
394
+ dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
304
395
  ownership: {
305
- kind: 'owned',
306
- provider: 'cmux',
307
- providerTarget: 'cmux:workspace-1',
308
- paneId: 'surface-worker-1',
396
+ kind: "owned",
397
+ provider: "cmux",
398
+ providerTarget: "cmux:workspace-1",
399
+ paneId: "surface-worker-1",
309
400
  tmuxServerIdentity: undefined,
310
401
  },
311
402
  });
312
403
  expect(evaluateMailboxNotificationGuard(input, mismatchedOwnershipState)).toMatchObject({
313
- kind: 'suppress', reason: 'mailbox_provider_mismatch',
404
+ kind: "suppress",
405
+ reason: "mailbox_provider_mismatch",
314
406
  });
315
407
  });
316
- it('defers tmux effects when immutable instance or server proof is absent or malformed', () => {
408
+ it("defers tmux effects when immutable instance or server proof is absent or malformed", () => {
317
409
  for (const override of [
318
410
  { instance_id: undefined },
319
- { instance_id: 'not-an-instance-id' },
411
+ { instance_id: "not-an-instance-id" },
320
412
  { tmux_server_identity: undefined },
321
413
  { tmux_server_identity: malformedServerPidIdentity },
322
414
  { tmux_server_identity: malformedServerStartIdentity },
@@ -325,36 +417,44 @@ describe('mailbox notification guard', () => {
325
417
  config: config(override),
326
418
  }));
327
419
  expect(result).toMatchObject({
328
- kind: 'suppress',
329
- reason: 'mailbox_membership_unresolvable',
420
+ kind: "suppress",
421
+ reason: "mailbox_membership_unresolvable",
330
422
  safePendingRequest: request(),
331
423
  });
332
424
  }
333
425
  });
334
- it('requires an instance UUID for CMUX while never attaching a fake tmux identity', () => {
426
+ it("requires an instance UUID for CMUX while never attaching a fake tmux identity", () => {
335
427
  const cmuxTarget = {
336
- kind: 'owned',
337
- provider: 'cmux',
338
- providerTarget: 'cmux:workspace-1',
339
- paneId: 'surface-worker-1',
428
+ kind: "owned",
429
+ provider: "cmux",
430
+ providerTarget: "cmux:workspace-1",
431
+ paneId: "surface-worker-1",
340
432
  };
341
433
  const result = evaluateMailboxNotificationGuard(input, validState({
342
434
  config: config({
343
- tmux_session: 'cmux:workspace-1',
344
- workers: [{ name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [], pane_id: 'surface-worker-1' }],
435
+ tmux_session: "cmux:workspace-1",
436
+ workers: [
437
+ {
438
+ name: "worker-1",
439
+ index: 1,
440
+ role: "executor",
441
+ assigned_tasks: [],
442
+ pane_id: "surface-worker-1",
443
+ },
444
+ ],
345
445
  }),
346
- dispatch: strictDispatch(request({ pane_id: 'surface-worker-1' })),
446
+ dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
347
447
  ownership: cmuxTarget,
348
448
  }));
349
449
  expect(result).toMatchObject({
350
- kind: 'allow',
450
+ kind: "allow",
351
451
  target: {
352
- provider: 'cmux',
353
- providerTarget: 'cmux:workspace-1',
354
- paneId: 'surface-worker-1',
452
+ provider: "cmux",
453
+ providerTarget: "cmux:workspace-1",
454
+ paneId: "surface-worker-1",
355
455
  },
356
456
  });
357
- if (result.kind !== 'allow')
457
+ if (result.kind !== "allow")
358
458
  return;
359
459
  expect(result.target.tmuxServerIdentity).toBeUndefined();
360
460
  expect(result.securityTuple.configTmuxServerSocketPath).toBeUndefined();
@@ -362,57 +462,179 @@ describe('mailbox notification guard', () => {
362
462
  expect(result.securityTuple.configTmuxServerProcessStartedAt).toBeUndefined();
363
463
  expect(evaluateMailboxNotificationGuard(input, validState({
364
464
  config: config({
365
- tmux_session: 'cmux:workspace-1',
465
+ tmux_session: "cmux:workspace-1",
366
466
  instance_id: undefined,
367
- workers: [{ name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [], pane_id: 'surface-worker-1' }],
467
+ workers: [
468
+ {
469
+ name: "worker-1",
470
+ index: 1,
471
+ role: "executor",
472
+ assigned_tasks: [],
473
+ pane_id: "surface-worker-1",
474
+ },
475
+ ],
368
476
  }),
369
- dispatch: strictDispatch(request({ pane_id: 'surface-worker-1' })),
477
+ dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
370
478
  ownership: cmuxTarget,
371
479
  }))).toMatchObject({
372
- kind: 'suppress',
373
- reason: 'mailbox_membership_unresolvable',
480
+ kind: "suppress",
481
+ reason: "mailbox_membership_unresolvable",
374
482
  });
375
483
  expect(evaluateMailboxNotificationGuard(input, validState({
376
484
  config: config({
377
- tmux_session: 'cmux:workspace-1',
378
- workers: [{ name: 'worker-1', index: 1, role: 'executor', assigned_tasks: [], pane_id: 'surface-worker-1' }],
485
+ tmux_session: "cmux:workspace-1",
486
+ workers: [
487
+ {
488
+ name: "worker-1",
489
+ index: 1,
490
+ role: "executor",
491
+ assigned_tasks: [],
492
+ pane_id: "surface-worker-1",
493
+ },
494
+ ],
379
495
  }),
380
- dispatch: strictDispatch(request({ pane_id: 'surface-worker-1' })),
496
+ dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
381
497
  ownership: {
382
498
  ...cmuxTarget,
383
499
  tmuxServerIdentity,
384
500
  },
385
501
  }))).toMatchObject({
386
- kind: 'suppress',
387
- reason: 'mailbox_provider_mismatch',
502
+ kind: "suppress",
503
+ reason: "mailbox_provider_mismatch",
504
+ });
505
+ });
506
+ it("resolves herdr targets as a non-tmux provider without demanding a tmux identity", () => {
507
+ const herdrOwned = {
508
+ kind: "owned",
509
+ provider: "herdr",
510
+ providerTarget: "herdr:w2",
511
+ paneId: "w2:p5",
512
+ };
513
+ const herdrState = validState({
514
+ config: config({
515
+ tmux_session: "herdr:w2",
516
+ workers: [
517
+ {
518
+ name: "worker-1",
519
+ index: 1,
520
+ role: "executor",
521
+ assigned_tasks: [],
522
+ pane_id: "w2:p5",
523
+ },
524
+ ],
525
+ }),
526
+ dispatch: strictDispatch(request({ pane_id: "w2:p5" })),
527
+ ownership: herdrOwned,
528
+ });
529
+ const result = evaluateMailboxNotificationGuard(input, herdrState);
530
+ expect(result).toMatchObject({
531
+ kind: "allow",
532
+ target: {
533
+ provider: "herdr",
534
+ providerTarget: "herdr:w2",
535
+ paneId: "w2:p5",
536
+ },
537
+ });
538
+ if (result.kind !== "allow")
539
+ return;
540
+ expect(result.target.tmuxServerIdentity).toBeUndefined();
541
+ expect(result.securityTuple.provider).toBe("herdr");
542
+ expect(result.securityTuple.configTmuxServerSocketPath).toBeUndefined();
543
+ // A missing instance UUID still defers the effect (same rule as cmux).
544
+ expect(evaluateMailboxNotificationGuard(input, {
545
+ ...herdrState,
546
+ config: config({
547
+ tmux_session: "herdr:w2",
548
+ instance_id: undefined,
549
+ workers: [
550
+ {
551
+ name: "worker-1",
552
+ index: 1,
553
+ role: "executor",
554
+ assigned_tasks: [],
555
+ pane_id: "w2:p5",
556
+ },
557
+ ],
558
+ }),
559
+ })).toMatchObject({
560
+ kind: "suppress",
561
+ reason: "mailbox_membership_unresolvable",
562
+ });
563
+ // A herdr ownership record that smuggles a tmux identity is rejected.
564
+ expect(evaluateMailboxNotificationGuard(input, {
565
+ ...herdrState,
566
+ ownership: {
567
+ ...herdrOwned,
568
+ tmuxServerIdentity,
569
+ },
570
+ })).toMatchObject({
571
+ kind: "suppress",
572
+ reason: "mailbox_provider_mismatch",
573
+ });
574
+ });
575
+ it("delivers herdr mailbox notifications through the provider verifier", async () => {
576
+ const verifyProviderOwnership = vi.fn(async (target) => {
577
+ // The verifier must receive the herdr provider classification; before
578
+ // the fix, canonical resolution classified herdr targets as tmux and
579
+ // the guard suppressed before ever calling this.
580
+ expect(target.provider).toBe("herdr");
581
+ expect(target.tmuxServerIdentity).toBeUndefined();
582
+ return {
583
+ kind: "owned",
584
+ provider: "herdr",
585
+ providerTarget: "herdr:w2",
586
+ paneId: "w2:p5",
587
+ };
588
+ });
589
+ const result = await readCurrentMailboxNotificationGuard(input, "/unused", {
590
+ readConfig: vi.fn(async () => config({
591
+ tmux_session: "herdr:w2",
592
+ workers: [
593
+ {
594
+ name: "worker-1",
595
+ index: 1,
596
+ role: "executor",
597
+ assigned_tasks: [],
598
+ pane_id: "w2:p5",
599
+ },
600
+ ],
601
+ })),
602
+ readStrictDispatchRequest: vi.fn(async () => strictDispatch(request({ pane_id: "w2:p5" }))),
603
+ readStrictMailboxMessage: vi.fn(async () => strictMailbox()),
604
+ verifyProviderOwnership,
605
+ });
606
+ expect(result).toMatchObject({
607
+ kind: "allow",
608
+ target: { provider: "herdr", paneId: "w2:p5" },
388
609
  });
610
+ expect(verifyProviderOwnership).toHaveBeenCalledOnce();
389
611
  });
390
- it.skipIf(!supportsStrictTmuxFixture)('compares named security fields while ignoring diagnostic-only dispatch changes', () => {
612
+ it.skipIf(!supportsStrictTmuxFixture)("compares named security fields while ignoring diagnostic-only dispatch changes", () => {
391
613
  const identity = strictTmuxIdentity();
392
614
  const first = evaluateMailboxNotificationGuard(input, validState());
393
615
  const diagnosticsOnly = evaluateMailboxNotificationGuard(input, validState({
394
616
  dispatch: strictDispatch(request({
395
617
  attempt_count: 3,
396
- updated_at: '2026-07-13T00:03:00.000Z',
397
- last_reason: 'mailbox_membership_unresolvable',
618
+ updated_at: "2026-07-13T00:03:00.000Z",
619
+ last_reason: "mailbox_membership_unresolvable",
398
620
  })),
399
621
  }));
400
- expect(first.kind).toBe('allow');
401
- expect(diagnosticsOnly.kind).toBe('allow');
402
- if (first.kind !== 'allow' || diagnosticsOnly.kind !== 'allow')
622
+ expect(first.kind).toBe("allow");
623
+ expect(diagnosticsOnly.kind).toBe("allow");
624
+ if (first.kind !== "allow" || diagnosticsOnly.kind !== "allow")
403
625
  return;
404
626
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, diagnosticsOnly.securityTuple)).toBe(true);
405
627
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
406
628
  ...first.securityTuple,
407
- requestTriggerMessage: 'Different trigger.',
629
+ requestTriggerMessage: "Different trigger.",
408
630
  })).toBe(false);
409
631
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
410
632
  ...first.securityTuple,
411
- configInstanceId: 'bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb',
633
+ configInstanceId: "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
412
634
  })).toBe(false);
413
635
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
414
636
  ...first.securityTuple,
415
- configTmuxServerSocketPath: '/tmp/other.sock',
637
+ configTmuxServerSocketPath: "/tmp/other.sock",
416
638
  })).toBe(false);
417
639
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
418
640
  ...first.securityTuple,
@@ -420,26 +642,26 @@ describe('mailbox notification guard', () => {
420
642
  })).toBe(false);
421
643
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
422
644
  ...first.securityTuple,
423
- configTmuxServerProcessStartedAt: process.platform === 'linux'
424
- ? 'linux:fixture:4243'
425
- : 'darwin:4242:123457',
645
+ configTmuxServerProcessStartedAt: process.platform === "linux"
646
+ ? "linux:fixture:4243"
647
+ : "darwin:4242:123457",
426
648
  })).toBe(false);
427
649
  const changedSecurity = evaluateMailboxNotificationGuard(input, validState({
428
- config: config({ tmux_session: 'other-session:0' }),
650
+ config: config({ tmux_session: "other-session:0" }),
429
651
  ownership: {
430
- kind: 'owned',
431
- provider: 'tmux',
432
- providerTarget: 'other-session:0',
433
- paneId: '%9',
652
+ kind: "owned",
653
+ provider: "tmux",
654
+ providerTarget: "other-session:0",
655
+ paneId: "%9",
434
656
  tmuxServerIdentity: identity,
435
657
  },
436
658
  }));
437
- expect(changedSecurity.kind).toBe('allow');
438
- if (changedSecurity.kind !== 'allow')
659
+ expect(changedSecurity.kind).toBe("allow");
660
+ if (changedSecurity.kind !== "allow")
439
661
  return;
440
662
  expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, changedSecurity.securityTuple)).toBe(false);
441
663
  });
442
- it.skipIf(!supportsStrictTmuxFixture)('performs strict current reads and an injected ownership check with zero marker or pane effects', async () => {
664
+ it.skipIf(!supportsStrictTmuxFixture)("performs strict current reads and an injected ownership check with zero marker or pane effects", async () => {
443
665
  const identity = strictTmuxIdentity();
444
666
  const markMailbox = vi.fn();
445
667
  const markDispatch = vi.fn();
@@ -451,21 +673,21 @@ describe('mailbox notification guard', () => {
451
673
  expect(target.tmuxServerIdentity).toEqual(identity);
452
674
  return owned();
453
675
  });
454
- const result = await readCurrentMailboxNotificationGuard(input, '/unused', {
676
+ const result = await readCurrentMailboxNotificationGuard(input, "/unused", {
455
677
  readConfig,
456
678
  readStrictDispatchRequest,
457
679
  readStrictMailboxMessage,
458
680
  verifyProviderOwnership,
459
681
  });
460
- expect(result).toMatchObject({ kind: 'allow', target: { paneId: '%9' } });
461
- expect(readStrictDispatchRequest).toHaveBeenCalledWith(teamName, input.requestId, '/unused');
462
- expect(readStrictMailboxMessage).toHaveBeenCalledWith(teamName, input.recipient, input.messageId, '/unused');
463
- expect(verifyProviderOwnership).toHaveBeenCalledWith(expect.objectContaining({ paneId: '%9' }));
682
+ expect(result).toMatchObject({ kind: "allow", target: { paneId: "%9" } });
683
+ expect(readStrictDispatchRequest).toHaveBeenCalledWith(teamName, input.requestId, "/unused");
684
+ expect(readStrictMailboxMessage).toHaveBeenCalledWith(teamName, input.recipient, input.messageId, "/unused");
685
+ expect(verifyProviderOwnership).toHaveBeenCalledWith(expect.objectContaining({ paneId: "%9" }));
464
686
  expect(markMailbox).not.toHaveBeenCalled();
465
687
  expect(markDispatch).not.toHaveBeenCalled();
466
688
  expect(paneEffect).not.toHaveBeenCalled();
467
689
  });
468
- it.skipIf(!supportsStrictTmuxFixture)('keeps the persisted target snapshot stable when ownership probing mutates its argument', async () => {
690
+ it.skipIf(!supportsStrictTmuxFixture)("keeps the persisted target snapshot stable when ownership probing mutates its argument", async () => {
469
691
  const identity = strictTmuxIdentity();
470
692
  const readConfig = vi.fn(async () => config());
471
693
  const readStrictDispatchRequest = vi.fn(async () => strictDispatch());
@@ -474,14 +696,14 @@ describe('mailbox notification guard', () => {
474
696
  target.tmuxServerIdentity.server_pid = 9001;
475
697
  return owned();
476
698
  });
477
- const result = await readCurrentMailboxNotificationGuard(input, '/unused', {
699
+ const result = await readCurrentMailboxNotificationGuard(input, "/unused", {
478
700
  readConfig,
479
701
  readStrictDispatchRequest,
480
702
  readStrictMailboxMessage,
481
703
  verifyProviderOwnership,
482
704
  });
483
705
  expect(result).toMatchObject({
484
- kind: 'allow',
706
+ kind: "allow",
485
707
  target: { tmuxServerIdentity: identity },
486
708
  securityTuple: {
487
709
  configTmuxServerPid: identity.server_pid,
@@ -489,17 +711,17 @@ describe('mailbox notification guard', () => {
489
711
  });
490
712
  expect(readConfig).toHaveBeenCalledOnce();
491
713
  });
492
- it('does not invoke an ownership probe that could fill missing historical proof', async () => {
714
+ it("does not invoke an ownership probe that could fill missing historical proof", async () => {
493
715
  const verifyProviderOwnership = vi.fn(async () => owned());
494
- const result = await readCurrentMailboxNotificationGuard(input, '/unused', {
716
+ const result = await readCurrentMailboxNotificationGuard(input, "/unused", {
495
717
  readConfig: vi.fn(async () => config({ tmux_server_identity: undefined })),
496
718
  readStrictDispatchRequest: vi.fn(async () => strictDispatch()),
497
719
  readStrictMailboxMessage: vi.fn(async () => strictMailbox()),
498
720
  verifyProviderOwnership,
499
721
  });
500
722
  expect(result).toMatchObject({
501
- kind: 'suppress',
502
- reason: 'mailbox_membership_unresolvable',
723
+ kind: "suppress",
724
+ reason: "mailbox_membership_unresolvable",
503
725
  });
504
726
  expect(verifyProviderOwnership).not.toHaveBeenCalled();
505
727
  });