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.
- package/.claude-plugin/marketplace.json +2 -2
- package/.claude-plugin/plugin.json +2 -1
- package/agents/executor.md +1 -0
- package/bridge/claude-md-coordinator.cjs +2 -2
- package/bridge/cli.cjs +23572 -17129
- package/bridge/mcp-server.cjs +2721 -1497
- package/bridge/runtime-cli.cjs +4707 -1925
- package/bridge/team-mcp.cjs +2917 -816
- package/bridge/team.js +5397 -2381
- package/copilot/agents/executor.md +1 -0
- package/copilot/hooks.json +3 -3
- package/dist/__tests__/arguments-literal-substitution.test.d.ts +2 -0
- package/dist/__tests__/arguments-literal-substitution.test.d.ts.map +1 -0
- package/dist/__tests__/arguments-literal-substitution.test.js +34 -0
- package/dist/__tests__/arguments-literal-substitution.test.js.map +1 -0
- package/dist/__tests__/bridge-self-contained.test.d.ts +2 -0
- package/dist/__tests__/bridge-self-contained.test.d.ts.map +1 -0
- package/dist/__tests__/bridge-self-contained.test.js +44 -0
- package/dist/__tests__/bridge-self-contained.test.js.map +1 -0
- package/dist/__tests__/context-safety.test.js +1 -1
- package/dist/__tests__/context-safety.test.js.map +1 -1
- package/dist/__tests__/copilot-hook-dispatch.test.js +5 -1
- package/dist/__tests__/copilot-hook-dispatch.test.js.map +1 -1
- package/dist/__tests__/copilot-hooks-manifest.test.js +15 -1
- package/dist/__tests__/copilot-hooks-manifest.test.js.map +1 -1
- package/dist/__tests__/directory-context-injector-registration.test.js +5 -2
- package/dist/__tests__/directory-context-injector-registration.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +61 -0
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/hook-command-normalizer.test.js +96 -58
- package/dist/__tests__/hook-command-normalizer.test.js.map +1 -1
- package/dist/__tests__/hooks/session-end-cleanup.test.js +87 -1
- package/dist/__tests__/hooks/session-end-cleanup.test.js.map +1 -1
- package/dist/__tests__/hooks-command-escaping.test.js +18 -16
- package/dist/__tests__/hooks-command-escaping.test.js.map +1 -1
- package/dist/__tests__/hud/omc-state.test.js +62 -1
- package/dist/__tests__/hud/omc-state.test.js.map +1 -1
- package/dist/__tests__/installer-mcp-config.test.js +39 -1
- package/dist/__tests__/installer-mcp-config.test.js.map +1 -1
- package/dist/__tests__/issue-2652-runtime-wiring-and-output-contract.test.js +1 -1
- package/dist/__tests__/issue-2652-runtime-wiring-and-output-contract.test.js.map +1 -1
- package/dist/__tests__/keyword-detector-echo-guard.test.js +13 -1
- package/dist/__tests__/keyword-detector-echo-guard.test.js.map +1 -1
- package/dist/__tests__/keyword-detector-script.test.js +201 -0
- package/dist/__tests__/keyword-detector-script.test.js.map +1 -1
- package/dist/__tests__/npm-package-surface-helpers.d.ts.map +1 -1
- package/dist/__tests__/npm-package-surface-helpers.js +8 -4
- package/dist/__tests__/npm-package-surface-helpers.js.map +1 -1
- package/dist/__tests__/plugin-setup-deps.test.js +144 -71
- package/dist/__tests__/plugin-setup-deps.test.js.map +1 -1
- package/dist/__tests__/preemptive-compaction-hook.test.js +62 -5
- package/dist/__tests__/preemptive-compaction-hook.test.js.map +1 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js +3 -0
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.d.ts +10 -0
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.js +241 -0
- package/dist/__tests__/rate-limit-wait/herdr-daemon.test.js.map +1 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.d.ts +9 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.d.ts.map +1 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.js +162 -0
- package/dist/__tests__/rate-limit-wait/herdr-detector.test.js.map +1 -0
- package/dist/__tests__/repair-plugin-cache-script.test.js +7 -1
- package/dist/__tests__/repair-plugin-cache-script.test.js.map +1 -1
- package/dist/__tests__/run-cjs-graceful-fallback.test.js +3 -2
- package/dist/__tests__/run-cjs-graceful-fallback.test.js.map +1 -1
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js +4 -1
- package/dist/__tests__/run-cjs-windows-stdio-contract.test.js.map +1 -1
- package/dist/__tests__/setup-contracts-regression.test.js +13 -10
- package/dist/__tests__/setup-contracts-regression.test.js.map +1 -1
- package/dist/__tests__/skills.test.js +10 -9
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/alias-retirement/__tests__/registry.test.js +2 -2
- package/dist/cli/__tests__/doctor-conflicts-json.test.js +2 -2
- package/dist/cli/__tests__/doctor-conflicts-json.test.js.map +1 -1
- package/dist/cli/__tests__/herdr-no-raw-calls.test.d.ts +10 -0
- package/dist/cli/__tests__/herdr-no-raw-calls.test.d.ts.map +1 -0
- package/dist/cli/__tests__/herdr-no-raw-calls.test.js +54 -0
- package/dist/cli/__tests__/herdr-no-raw-calls.test.js.map +1 -0
- package/dist/cli/__tests__/interop-herdr.test.d.ts +9 -0
- package/dist/cli/__tests__/interop-herdr.test.d.ts.map +1 -0
- package/dist/cli/__tests__/interop-herdr.test.js +138 -0
- package/dist/cli/__tests__/interop-herdr.test.js.map +1 -0
- package/dist/cli/__tests__/launch-herdr.test.d.ts +10 -0
- package/dist/cli/__tests__/launch-herdr.test.d.ts.map +1 -0
- package/dist/cli/__tests__/launch-herdr.test.js +141 -0
- package/dist/cli/__tests__/launch-herdr.test.js.map +1 -0
- package/dist/cli/__tests__/launch.test.js +140 -10
- package/dist/cli/__tests__/launch.test.js.map +1 -1
- package/dist/cli/__tests__/plugin-dir-capture.test.js +2 -0
- package/dist/cli/__tests__/plugin-dir-capture.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-afk.test.js +392 -2
- package/dist/cli/__tests__/ralph-afk.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-closeout.test.d.ts +2 -0
- package/dist/cli/__tests__/ralph-closeout.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralph-closeout.test.js +156 -0
- package/dist/cli/__tests__/ralph-closeout.test.js.map +1 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.d.ts +2 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.d.ts.map +1 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.js +86 -0
- package/dist/cli/__tests__/subcommand-json-flag.test.js.map +1 -0
- package/dist/cli/__tests__/team-resume-v2.test.js +46 -0
- package/dist/cli/__tests__/team-resume-v2.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +24 -0
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/wait-teleport-json.test.js +2 -2
- package/dist/cli/__tests__/wait-teleport-json.test.js.map +1 -1
- package/dist/cli/commands/__tests__/factory-run-cli.test.js +20 -0
- package/dist/cli/commands/__tests__/factory-run-cli.test.js.map +1 -1
- package/dist/cli/commands/__tests__/release-cli.test.js +11 -0
- package/dist/cli/commands/__tests__/release-cli.test.js.map +1 -1
- package/dist/cli/commands/__tests__/ship-cli.test.js +1 -1
- package/dist/cli/commands/__tests__/ship-cli.test.js.map +1 -1
- package/dist/cli/commands/__tests__/teleport.test.js +42 -0
- package/dist/cli/commands/__tests__/teleport.test.js.map +1 -1
- package/dist/cli/commands/__tests__/wait.test.js +33 -1
- package/dist/cli/commands/__tests__/wait.test.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +6 -2
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/factory-bench.d.ts.map +1 -1
- package/dist/cli/commands/factory-bench.js +17 -3
- package/dist/cli/commands/factory-bench.js.map +1 -1
- package/dist/cli/commands/factory-dashboard.d.ts +5 -1
- package/dist/cli/commands/factory-dashboard.d.ts.map +1 -1
- package/dist/cli/commands/factory-dashboard.js +6 -2
- package/dist/cli/commands/factory-dashboard.js.map +1 -1
- package/dist/cli/commands/factory.d.ts +6 -0
- package/dist/cli/commands/factory.d.ts.map +1 -1
- package/dist/cli/commands/factory.js +45 -4
- package/dist/cli/commands/factory.js.map +1 -1
- package/dist/cli/commands/ralph.d.ts +36 -1
- package/dist/cli/commands/ralph.d.ts.map +1 -1
- package/dist/cli/commands/ralph.js +298 -50
- package/dist/cli/commands/ralph.js.map +1 -1
- package/dist/cli/commands/release.d.ts +3 -1
- package/dist/cli/commands/release.d.ts.map +1 -1
- package/dist/cli/commands/release.js +12 -3
- package/dist/cli/commands/release.js.map +1 -1
- package/dist/cli/commands/ship.d.ts.map +1 -1
- package/dist/cli/commands/ship.js +8 -4
- package/dist/cli/commands/ship.js.map +1 -1
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +2 -0
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/commands/teleport.d.ts.map +1 -1
- package/dist/cli/commands/teleport.js +6 -1
- package/dist/cli/commands/teleport.js.map +1 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +3 -1
- package/dist/cli/commands/wait.js.map +1 -1
- package/dist/cli/index.js +8 -8
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/interop.d.ts +4 -3
- package/dist/cli/interop.d.ts.map +1 -1
- package/dist/cli/interop.js +95 -4
- package/dist/cli/interop.js.map +1 -1
- package/dist/cli/launch.d.ts +17 -2
- package/dist/cli/launch.d.ts.map +1 -1
- package/dist/cli/launch.js +110 -12
- package/dist/cli/launch.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +4 -1
- package/dist/cli/team.js.map +1 -1
- package/dist/commands/index.js +1 -1
- package/dist/commands/index.js.map +1 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +17 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/copilot-run/job.d.ts +2 -0
- package/dist/copilot-run/job.d.ts.map +1 -1
- package/dist/copilot-run/job.js +3 -0
- package/dist/copilot-run/job.js.map +1 -1
- package/dist/copilot-run/sandbox.d.ts +16 -0
- package/dist/copilot-run/sandbox.d.ts.map +1 -1
- package/dist/copilot-run/sandbox.js +29 -2
- package/dist/copilot-run/sandbox.js.map +1 -1
- package/dist/factory/bench/__tests__/bench.units.test.js +133 -1
- package/dist/factory/bench/__tests__/bench.units.test.js.map +1 -1
- package/dist/factory/bench/score.d.ts +33 -1
- package/dist/factory/bench/score.d.ts.map +1 -1
- package/dist/factory/bench/score.js +95 -5
- package/dist/factory/bench/score.js.map +1 -1
- package/dist/factory/board/__tests__/board.test.js +31 -1
- package/dist/factory/board/__tests__/board.test.js.map +1 -1
- package/dist/factory/board/collect.d.ts +5 -2
- package/dist/factory/board/collect.d.ts.map +1 -1
- package/dist/factory/board/collect.js +7 -2
- package/dist/factory/board/collect.js.map +1 -1
- package/dist/factory/check/cli.d.ts.map +1 -1
- package/dist/factory/check/cli.js +6 -2
- package/dist/factory/check/cli.js.map +1 -1
- package/dist/factory/dashboard/__tests__/dashboard.test.js +10 -0
- package/dist/factory/dashboard/__tests__/dashboard.test.js.map +1 -1
- package/dist/factory/run/__tests__/auto-merge.test.js +2 -0
- package/dist/factory/run/__tests__/auto-merge.test.js.map +1 -1
- package/dist/factory/run/__tests__/claims.test.js +15 -0
- package/dist/factory/run/__tests__/claims.test.js.map +1 -1
- package/dist/factory/run/__tests__/container-gate.test.js +59 -1
- package/dist/factory/run/__tests__/container-gate.test.js.map +1 -1
- package/dist/factory/run/__tests__/engine-local-harness.d.ts.map +1 -1
- package/dist/factory/run/__tests__/engine-local-harness.js +6 -0
- package/dist/factory/run/__tests__/engine-local-harness.js.map +1 -1
- package/dist/factory/run/__tests__/engine-local-harness.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine-local-harness.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine-local-harness.test.js +23 -0
- package/dist/factory/run/__tests__/engine-local-harness.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.js +392 -0
- package/dist/factory/run/__tests__/engine.gates-git-transport.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.js +347 -0
- package/dist/factory/run/__tests__/engine.gates-test-delta.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.js +235 -0
- package/dist/factory/run/__tests__/engine.gates-tree-copy.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.js +171 -0
- package/dist/factory/run/__tests__/engine.human-merged.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.js +56 -0
- package/dist/factory/run/__tests__/engine.local.conflict-reprepare.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.js +48 -0
- package/dist/factory/run/__tests__/engine.local.human-merged.test.js.map +1 -0
- package/dist/factory/run/__tests__/engine.stall.test.d.ts +2 -0
- package/dist/factory/run/__tests__/engine.stall.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/engine.stall.test.js +137 -0
- package/dist/factory/run/__tests__/engine.stall.test.js.map +1 -0
- package/dist/factory/run/__tests__/fake-lanes.d.ts +6 -0
- package/dist/factory/run/__tests__/fake-lanes.d.ts.map +1 -1
- package/dist/factory/run/__tests__/fake-lanes.js +17 -1
- package/dist/factory/run/__tests__/fake-lanes.js.map +1 -1
- package/dist/factory/run/__tests__/human-merged.test.d.ts +2 -0
- package/dist/factory/run/__tests__/human-merged.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/human-merged.test.js +301 -0
- package/dist/factory/run/__tests__/human-merged.test.js.map +1 -0
- package/dist/factory/run/__tests__/lane.test.js +2 -0
- package/dist/factory/run/__tests__/lane.test.js.map +1 -1
- package/dist/factory/run/__tests__/merge-policy.test.js +16 -0
- package/dist/factory/run/__tests__/merge-policy.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.d.ts +2 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.js +137 -0
- package/dist/factory/run/__tests__/prepare-gates.conflict-reprepare.test.js.map +1 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.js +21 -0
- package/dist/factory/run/__tests__/prepare-gates.crash.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js +11 -0
- package/dist/factory/run/__tests__/prepare-gates.gates-resume.test.js.map +1 -1
- package/dist/factory/run/__tests__/prepare-gates.test.js +39 -0
- package/dist/factory/run/__tests__/prepare-gates.test.js.map +1 -1
- package/dist/factory/run/__tests__/private-store.test.js +22 -1
- package/dist/factory/run/__tests__/private-store.test.js.map +1 -1
- package/dist/factory/run/__tests__/test-delta.test.d.ts +2 -0
- package/dist/factory/run/__tests__/test-delta.test.d.ts.map +1 -0
- package/dist/factory/run/__tests__/test-delta.test.js +239 -0
- package/dist/factory/run/__tests__/test-delta.test.js.map +1 -0
- package/dist/factory/run/__tests__/units.test.js +219 -2
- package/dist/factory/run/__tests__/units.test.js.map +1 -1
- package/dist/factory/run/__tests__/workspace-tree.test.js +16 -4
- package/dist/factory/run/__tests__/workspace-tree.test.js.map +1 -1
- package/dist/factory/run/auto-merge.d.ts +4 -0
- package/dist/factory/run/auto-merge.d.ts.map +1 -1
- package/dist/factory/run/auto-merge.js +3 -0
- package/dist/factory/run/auto-merge.js.map +1 -1
- package/dist/factory/run/budget.d.ts +6 -0
- package/dist/factory/run/budget.d.ts.map +1 -1
- package/dist/factory/run/budget.js +5 -0
- package/dist/factory/run/budget.js.map +1 -1
- package/dist/factory/run/claims.d.ts.map +1 -1
- package/dist/factory/run/claims.js +5 -3
- package/dist/factory/run/claims.js.map +1 -1
- package/dist/factory/run/container-gate.d.ts +14 -1
- package/dist/factory/run/container-gate.d.ts.map +1 -1
- package/dist/factory/run/container-gate.js +42 -4
- package/dist/factory/run/container-gate.js.map +1 -1
- package/dist/factory/run/engine.d.ts +46 -1
- package/dist/factory/run/engine.d.ts.map +1 -1
- package/dist/factory/run/engine.js +779 -68
- package/dist/factory/run/engine.js.map +1 -1
- package/dist/factory/run/human-merged.d.ts +105 -0
- package/dist/factory/run/human-merged.d.ts.map +1 -0
- package/dist/factory/run/human-merged.js +256 -0
- package/dist/factory/run/human-merged.js.map +1 -0
- package/dist/factory/run/lane.d.ts +2 -0
- package/dist/factory/run/lane.d.ts.map +1 -1
- package/dist/factory/run/lane.js +1 -0
- package/dist/factory/run/lane.js.map +1 -1
- package/dist/factory/run/merge-policy.d.ts +1 -2
- package/dist/factory/run/merge-policy.d.ts.map +1 -1
- package/dist/factory/run/merge-policy.js +5 -12
- package/dist/factory/run/merge-policy.js.map +1 -1
- package/dist/factory/run/prepare.d.ts +40 -1
- package/dist/factory/run/prepare.d.ts.map +1 -1
- package/dist/factory/run/prepare.js +240 -38
- package/dist/factory/run/prepare.js.map +1 -1
- package/dist/factory/run/private-run.d.ts +2 -1
- package/dist/factory/run/private-run.d.ts.map +1 -1
- package/dist/factory/run/private-run.js +5 -2
- package/dist/factory/run/private-run.js.map +1 -1
- package/dist/factory/run/prompts.d.ts +2 -2
- package/dist/factory/run/prompts.d.ts.map +1 -1
- package/dist/factory/run/prompts.js +7 -6
- package/dist/factory/run/prompts.js.map +1 -1
- package/dist/factory/run/sandbox-exec.d.ts +9 -1
- package/dist/factory/run/sandbox-exec.d.ts.map +1 -1
- package/dist/factory/run/sandbox-exec.js.map +1 -1
- package/dist/factory/run/state.d.ts +54 -1
- package/dist/factory/run/state.d.ts.map +1 -1
- package/dist/factory/run/state.js +23 -2
- package/dist/factory/run/state.js.map +1 -1
- package/dist/factory/run/test-delta.d.ts +123 -0
- package/dist/factory/run/test-delta.d.ts.map +1 -0
- package/dist/factory/run/test-delta.js +236 -0
- package/dist/factory/run/test-delta.js.map +1 -0
- package/dist/features/__tests__/checkpoint.test.js +118 -1
- package/dist/features/__tests__/checkpoint.test.js.map +1 -1
- package/dist/features/__tests__/jev-model-routing.test.js +20 -2
- package/dist/features/__tests__/jev-model-routing.test.js.map +1 -1
- package/dist/features/__tests__/jev-slop-warning.test.js +22 -2
- package/dist/features/__tests__/jev-slop-warning.test.js.map +1 -1
- package/dist/features/checkpoint/index.d.ts.map +1 -1
- package/dist/features/checkpoint/index.js +25 -8
- package/dist/features/checkpoint/index.js.map +1 -1
- package/dist/features/jev-slop-warning.d.ts +3 -2
- package/dist/features/jev-slop-warning.d.ts.map +1 -1
- package/dist/features/jev-slop-warning.js +5 -3
- package/dist/features/jev-slop-warning.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +55 -9
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +33 -0
- package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.js +156 -0
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js +4 -2
- package/dist/forge/__tests__/gh-argv-baseline.factory.test.js.map +1 -1
- package/dist/forge/ado/__tests__/adapter.test.js +7 -0
- package/dist/forge/ado/__tests__/adapter.test.js.map +1 -1
- package/dist/forge/ado/reviews.d.ts.map +1 -1
- package/dist/forge/ado/reviews.js +6 -0
- package/dist/forge/ado/reviews.js.map +1 -1
- package/dist/forge/github/__tests__/mergeability.test.d.ts +2 -0
- package/dist/forge/github/__tests__/mergeability.test.d.ts.map +1 -0
- package/dist/forge/github/__tests__/mergeability.test.js +34 -0
- package/dist/forge/github/__tests__/mergeability.test.js.map +1 -0
- package/dist/forge/github/reviews.d.ts +7 -1
- package/dist/forge/github/reviews.d.ts.map +1 -1
- package/dist/forge/github/reviews.js +13 -0
- package/dist/forge/github/reviews.js.map +1 -1
- package/dist/forge/local/__tests__/mirror.test.js +3 -1
- package/dist/forge/local/__tests__/mirror.test.js.map +1 -1
- package/dist/forge/local/__tests__/reviews.test.js +19 -0
- package/dist/forge/local/__tests__/reviews.test.js.map +1 -1
- package/dist/forge/local/mirror.d.ts +2 -0
- package/dist/forge/local/mirror.d.ts.map +1 -1
- package/dist/forge/local/mirror.js +2 -0
- package/dist/forge/local/mirror.js.map +1 -1
- package/dist/forge/local/reviews.d.ts.map +1 -1
- package/dist/forge/local/reviews.js +12 -1
- package/dist/forge/local/reviews.js.map +1 -1
- package/dist/forge/types.d.ts +13 -0
- package/dist/forge/types.d.ts.map +1 -1
- package/dist/graph/schema.d.ts +10 -10
- package/dist/hooks/__tests__/precompact-restore.test.js +38 -0
- package/dist/hooks/__tests__/precompact-restore.test.js.map +1 -1
- package/dist/hooks/__tests__/workflow-drift-guard-script.test.js +7 -2
- package/dist/hooks/__tests__/workflow-drift-guard-script.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +1 -1
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/code-simplifier/__tests__/jev-trigger-shadow.test.js +24 -2
- package/dist/hooks/code-simplifier/__tests__/jev-trigger-shadow.test.js.map +1 -1
- package/dist/hooks/code-simplifier/jev-shadow.d.ts.map +1 -1
- package/dist/hooks/code-simplifier/jev-shadow.js +6 -4
- package/dist/hooks/code-simplifier/jev-shadow.js.map +1 -1
- package/dist/hooks/jev/__tests__/client.test.js +20 -1
- package/dist/hooks/jev/__tests__/client.test.js.map +1 -1
- package/dist/hooks/jev/__tests__/log-context.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/log-context.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/log-context.test.js +97 -0
- package/dist/hooks/jev/__tests__/log-context.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.js +148 -0
- package/dist/hooks/jev/__tests__/log-rotation.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.js +117 -0
- package/dist/hooks/jev/__tests__/resolver-request-count.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/resolver.test.js +63 -1
- package/dist/hooks/jev/__tests__/resolver.test.js.map +1 -1
- package/dist/hooks/jev/__tests__/shared-breaker.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/shared-breaker.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/shared-breaker.test.js +294 -0
- package/dist/hooks/jev/__tests__/shared-breaker.test.js.map +1 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.d.ts +2 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.d.ts.map +1 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.js +88 -0
- package/dist/hooks/jev/__tests__/state-omit-ids.test.js.map +1 -0
- package/dist/hooks/jev/client.d.ts +34 -2
- package/dist/hooks/jev/client.d.ts.map +1 -1
- package/dist/hooks/jev/client.js +80 -5
- package/dist/hooks/jev/client.js.map +1 -1
- package/dist/hooks/jev/config.d.ts +78 -4
- package/dist/hooks/jev/config.d.ts.map +1 -1
- package/dist/hooks/jev/config.js +123 -9
- package/dist/hooks/jev/config.js.map +1 -1
- package/dist/hooks/jev/points.d.ts +2 -0
- package/dist/hooks/jev/points.d.ts.map +1 -1
- package/dist/hooks/jev/points.js +41 -10
- package/dist/hooks/jev/points.js.map +1 -1
- package/dist/hooks/jev/resolver.d.ts +27 -2
- package/dist/hooks/jev/resolver.d.ts.map +1 -1
- package/dist/hooks/jev/resolver.js +176 -20
- package/dist/hooks/jev/resolver.js.map +1 -1
- package/dist/hooks/jev/types.d.ts +21 -4
- package/dist/hooks/jev/types.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.d.ts +2 -0
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.d.ts.map +1 -0
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.js +209 -0
- package/dist/hooks/keyword-detector/__tests__/autopilot-command-parity.test.js.map +1 -0
- package/dist/hooks/keyword-detector/__tests__/index.test.js +6 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/jev-shadow.test.js +15 -0
- package/dist/hooks/keyword-detector/__tests__/jev-shadow.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +200 -2
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/keyword-detector/jev-shadow.js +3 -3
- package/dist/hooks/keyword-detector/jev-shadow.js.map +1 -1
- package/dist/hooks/learner/__tests__/jev-extraction-shadow.test.js +20 -1
- package/dist/hooks/learner/__tests__/jev-extraction-shadow.test.js.map +1 -1
- package/dist/hooks/learner/jev-shadow.js +3 -3
- package/dist/hooks/learner/jev-shadow.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.js +280 -0
- package/dist/hooks/persistent-mode/__tests__/architect-approval-transcript.test.js.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.js +2 -2
- package/dist/hooks/persistent-mode/__tests__/error-handling.test.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/jev-loop-continuation-shadow.test.js +47 -1
- package/dist/hooks/persistent-mode/__tests__/jev-loop-continuation-shadow.test.js.map +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +136 -40
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/jev-shadow.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/jev-shadow.js +11 -7
- package/dist/hooks/persistent-mode/jev-shadow.js.map +1 -1
- package/dist/hooks/pre-compact/index.d.ts.map +1 -1
- package/dist/hooks/pre-compact/index.js +8 -5
- package/dist/hooks/pre-compact/index.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.d.ts +11 -0
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.d.ts.map +1 -0
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.js +227 -0
- package/dist/hooks/project-memory/__tests__/rescan-concurrency.test.js.map +1 -0
- package/dist/hooks/project-memory/index.d.ts.map +1 -1
- package/dist/hooks/project-memory/index.js +26 -6
- package/dist/hooks/project-memory/index.js.map +1 -1
- package/dist/hooks/ralph/__tests__/closeout.test.d.ts +2 -0
- package/dist/hooks/ralph/__tests__/closeout.test.d.ts.map +1 -0
- package/dist/hooks/ralph/__tests__/closeout.test.js +82 -0
- package/dist/hooks/ralph/__tests__/closeout.test.js.map +1 -0
- package/dist/hooks/ralph/__tests__/feedback-baseline.test.js +572 -4
- package/dist/hooks/ralph/__tests__/feedback-baseline.test.js.map +1 -1
- package/dist/hooks/ralph/__tests__/jev-verdict-shadow.test.js +23 -2
- package/dist/hooks/ralph/__tests__/jev-verdict-shadow.test.js.map +1 -1
- package/dist/hooks/ralph/closeout.d.ts +34 -0
- package/dist/hooks/ralph/closeout.d.ts.map +1 -0
- package/dist/hooks/ralph/closeout.js +66 -0
- package/dist/hooks/ralph/closeout.js.map +1 -0
- package/dist/hooks/ralph/feedback-baseline.d.ts +60 -6
- package/dist/hooks/ralph/feedback-baseline.d.ts.map +1 -1
- package/dist/hooks/ralph/feedback-baseline.js +302 -15
- package/dist/hooks/ralph/feedback-baseline.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +1 -1
- package/dist/hooks/ralph/index.d.ts.map +1 -1
- package/dist/hooks/ralph/index.js +1 -1
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/jev-shadow.js +3 -3
- package/dist/hooks/ralph/jev-shadow.js.map +1 -1
- package/dist/hooks/ralph/verifier.d.ts +5 -0
- package/dist/hooks/ralph/verifier.d.ts.map +1 -1
- package/dist/hooks/ralph/verifier.js +21 -10
- package/dist/hooks/ralph/verifier.js.map +1 -1
- package/dist/hooks/registry/__tests__/registry.test.js +6 -0
- package/dist/hooks/registry/__tests__/registry.test.js.map +1 -1
- package/dist/hooks/registry/registry.d.ts +6 -2
- package/dist/hooks/registry/registry.d.ts.map +1 -1
- package/dist/hooks/registry/registry.js +21 -6
- package/dist/hooks/registry/registry.js.map +1 -1
- package/dist/hooks/registry/types.d.ts +2 -0
- package/dist/hooks/registry/types.d.ts.map +1 -1
- package/dist/hooks/session-end/__tests__/callbacks.test.js +10 -1
- package/dist/hooks/session-end/__tests__/callbacks.test.js.map +1 -1
- package/dist/hooks/session-end/__tests__/worker.test.js +111 -2
- package/dist/hooks/session-end/__tests__/worker.test.js.map +1 -1
- package/dist/hooks/session-end/callbacks.js +1 -1
- package/dist/hooks/session-end/callbacks.js.map +1 -1
- package/dist/hooks/session-end/cleanup-manifest.d.ts +2 -0
- package/dist/hooks/session-end/cleanup-manifest.d.ts.map +1 -1
- package/dist/hooks/session-end/cleanup-manifest.js +8 -0
- package/dist/hooks/session-end/cleanup-manifest.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +21 -3
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/session-end/worker.d.ts.map +1 -1
- package/dist/hooks/session-end/worker.js +32 -2
- package/dist/hooks/session-end/worker.js.map +1 -1
- package/dist/hooks/setup/__tests__/windows-patch.test.js +89 -17
- package/dist/hooks/setup/__tests__/windows-patch.test.js.map +1 -1
- package/dist/hooks/setup/index.d.ts +10 -21
- package/dist/hooks/setup/index.d.ts.map +1 -1
- package/dist/hooks/setup/index.js +14 -48
- package/dist/hooks/setup/index.js.map +1 -1
- package/dist/hooks/task-size-detector/__tests__/jev-shadow.test.js +2 -1
- package/dist/hooks/task-size-detector/__tests__/jev-shadow.test.js.map +1 -1
- package/dist/hud/omc-state.d.ts +8 -0
- package/dist/hud/omc-state.d.ts.map +1 -1
- package/dist/hud/omc-state.js +23 -2
- package/dist/hud/omc-state.js.map +1 -1
- package/dist/installer/__tests__/claude-mcp-config-path.test.d.ts +2 -0
- package/dist/installer/__tests__/claude-mcp-config-path.test.d.ts.map +1 -0
- package/dist/installer/__tests__/claude-mcp-config-path.test.js +323 -0
- package/dist/installer/__tests__/claude-mcp-config-path.test.js.map +1 -0
- package/dist/installer/__tests__/mcp-registry.test.js +81 -3
- package/dist/installer/__tests__/mcp-registry.test.js.map +1 -1
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js +36 -0
- package/dist/installer/__tests__/standalone-hook-reconcile.test.js.map +1 -1
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +16 -4
- package/dist/installer/index.js.map +1 -1
- package/dist/installer/mcp-registry.d.ts +21 -1
- package/dist/installer/mcp-registry.d.ts.map +1 -1
- package/dist/installer/mcp-registry.js +101 -20
- package/dist/installer/mcp-registry.js.map +1 -1
- package/dist/lib/atomic-write.d.ts.map +1 -1
- package/dist/lib/atomic-write.js +61 -2
- package/dist/lib/atomic-write.js.map +1 -1
- package/dist/lib/one-line.d.ts +3 -0
- package/dist/lib/one-line.d.ts.map +1 -0
- package/dist/lib/one-line.js +5 -0
- package/dist/lib/one-line.js.map +1 -0
- package/dist/mcp/__tests__/team-cleanup.test.js +13 -0
- package/dist/mcp/__tests__/team-cleanup.test.js.map +1 -1
- package/dist/mcp/team-job-convergence.d.ts.map +1 -1
- package/dist/mcp/team-job-convergence.js +4 -1
- package/dist/mcp/team-job-convergence.js.map +1 -1
- package/dist/mcp/team-server.js +2 -2
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/notifications/__tests__/approval-reply.test.js +8 -0
- package/dist/notifications/__tests__/approval-reply.test.js.map +1 -1
- package/dist/notifications/__tests__/reply-herdr.test.d.ts +8 -0
- package/dist/notifications/__tests__/reply-herdr.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/reply-herdr.test.js +125 -0
- package/dist/notifications/__tests__/reply-herdr.test.js.map +1 -0
- package/dist/notifications/__tests__/tmux.test.js +56 -1
- package/dist/notifications/__tests__/tmux.test.js.map +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +22 -7
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts +28 -12
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +326 -172
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/tmux.d.ts +22 -2
- package/dist/notifications/tmux.d.ts.map +1 -1
- package/dist/notifications/tmux.js +57 -2
- package/dist/notifications/tmux.js.map +1 -1
- package/dist/release/__tests__/engine.test.js +74 -2
- package/dist/release/__tests__/engine.test.js.map +1 -1
- package/dist/release/engine.d.ts +9 -1
- package/dist/release/engine.d.ts.map +1 -1
- package/dist/release/engine.js +41 -4
- package/dist/release/engine.js.map +1 -1
- package/dist/shared/types.d.ts +5 -0
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/ship/__tests__/check-name.test.d.ts +2 -0
- package/dist/ship/__tests__/check-name.test.d.ts.map +1 -0
- package/dist/ship/__tests__/check-name.test.js +17 -0
- package/dist/ship/__tests__/check-name.test.js.map +1 -0
- package/dist/ship/__tests__/gates-settle.test.js +13 -1
- package/dist/ship/__tests__/gates-settle.test.js.map +1 -1
- package/dist/ship/__tests__/prepare-build.test.d.ts +2 -0
- package/dist/ship/__tests__/prepare-build.test.d.ts.map +1 -0
- package/dist/ship/__tests__/prepare-build.test.js +287 -0
- package/dist/ship/__tests__/prepare-build.test.js.map +1 -0
- package/dist/ship/__tests__/prepare-merge.test.js +8 -1
- package/dist/ship/__tests__/prepare-merge.test.js.map +1 -1
- package/dist/ship/__tests__/safety-state.test.js +4 -0
- package/dist/ship/__tests__/safety-state.test.js.map +1 -1
- package/dist/ship/check-name.d.ts +12 -0
- package/dist/ship/check-name.d.ts.map +1 -0
- package/dist/ship/check-name.js +13 -0
- package/dist/ship/check-name.js.map +1 -0
- package/dist/ship/config.d.ts +13 -0
- package/dist/ship/config.d.ts.map +1 -1
- package/dist/ship/config.js +18 -1
- package/dist/ship/config.js.map +1 -1
- package/dist/ship/exec.d.ts +8 -0
- package/dist/ship/exec.d.ts.map +1 -1
- package/dist/ship/exec.js +33 -5
- package/dist/ship/exec.js.map +1 -1
- package/dist/ship/gates.d.ts.map +1 -1
- package/dist/ship/gates.js +3 -2
- package/dist/ship/gates.js.map +1 -1
- package/dist/ship/merge.d.ts +11 -2
- package/dist/ship/merge.d.ts.map +1 -1
- package/dist/ship/merge.js +55 -10
- package/dist/ship/merge.js.map +1 -1
- package/dist/ship/prepare.d.ts +16 -4
- package/dist/ship/prepare.d.ts.map +1 -1
- package/dist/ship/prepare.js +108 -2
- package/dist/ship/prepare.js.map +1 -1
- package/dist/team/__tests__/herdr-session-realherdr.test.d.ts +9 -0
- package/dist/team/__tests__/herdr-session-realherdr.test.d.ts.map +1 -0
- package/dist/team/__tests__/herdr-session-realherdr.test.js +140 -0
- package/dist/team/__tests__/herdr-session-realherdr.test.js.map +1 -0
- package/dist/team/__tests__/herdr-session.test.d.ts +9 -0
- package/dist/team/__tests__/herdr-session.test.d.ts.map +1 -0
- package/dist/team/__tests__/herdr-session.test.js +270 -0
- package/dist/team/__tests__/herdr-session.test.js.map +1 -0
- package/dist/team/__tests__/idle-nudge.test.js +17 -0
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -1
- package/dist/team/__tests__/mailbox-notification-guard.test.js +403 -181
- package/dist/team/__tests__/mailbox-notification-guard.test.js.map +1 -1
- package/dist/team/__tests__/scaling-launch-config.test.js +12 -0
- package/dist/team/__tests__/scaling-launch-config.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +12 -0
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/task-claim-renewal.test.d.ts +2 -0
- package/dist/team/__tests__/task-claim-renewal.test.d.ts.map +1 -0
- package/dist/team/__tests__/task-claim-renewal.test.js +421 -0
- package/dist/team/__tests__/task-claim-renewal.test.js.map +1 -0
- package/dist/team/__tests__/task-storage-integrity.test.js +34 -0
- package/dist/team/__tests__/task-storage-integrity.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.d.ts +11 -0
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.js +99 -0
- package/dist/team/__tests__/tmux-session.create-team-herdr.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.d.ts +10 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.js +226 -0
- package/dist/team/__tests__/tmux-session.herdr-arms.test.js.map +1 -0
- package/dist/team/__tests__/tmux-session.test.js +888 -721
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +19 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/api-interop.d.ts +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +13 -1
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/herdr-session.d.ts +267 -0
- package/dist/team/herdr-session.d.ts.map +1 -0
- package/dist/team/herdr-session.js +508 -0
- package/dist/team/herdr-session.js.map +1 -0
- package/dist/team/idle-nudge.d.ts +1 -1
- package/dist/team/idle-nudge.d.ts.map +1 -1
- package/dist/team/idle-nudge.js +4 -4
- package/dist/team/idle-nudge.js.map +1 -1
- package/dist/team/mailbox-notification-guard.d.ts +24 -19
- package/dist/team/mailbox-notification-guard.d.ts.map +1 -1
- package/dist/team/mailbox-notification-guard.js +241 -148
- package/dist/team/mailbox-notification-guard.js.map +1 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +1 -0
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/runtime-v2.d.ts +33 -33
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +2810 -1591
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/scaling.d.ts +3 -3
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +766 -402
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/tasks.d.ts +15 -1
- package/dist/team/state/tasks.d.ts.map +1 -1
- package/dist/team/state/tasks.js +56 -2
- package/dist/team/state/tasks.js.map +1 -1
- package/dist/team/team-ops.d.ts +3 -2
- package/dist/team/team-ops.d.ts.map +1 -1
- package/dist/team/team-ops.js +32 -5
- package/dist/team/team-ops.js.map +1 -1
- package/dist/team/tmux-session.d.ts +66 -40
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +1733 -1096
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/types.d.ts +8 -0
- package/dist/team/types.d.ts.map +1 -1
- package/dist/team/types.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +3 -0
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/tools/lsp/__tests__/devcontainer.test.js +39 -5
- package/dist/tools/lsp/__tests__/devcontainer.test.js.map +1 -1
- package/dist/tools/lsp/devcontainer.d.ts.map +1 -1
- package/dist/tools/lsp/devcontainer.js +25 -8
- package/dist/tools/lsp/devcontainer.js.map +1 -1
- package/dist/utils/__tests__/windows-search.test.js +17 -3
- package/dist/utils/__tests__/windows-search.test.js.map +1 -1
- package/dist/utils/plugin-cache-validation.d.ts.map +1 -1
- package/dist/utils/plugin-cache-validation.js +27 -18
- package/dist/utils/plugin-cache-validation.js.map +1 -1
- package/dist/workflow/__tests__/projections.test.js +3 -3
- package/dist/workflow/__tests__/projections.test.js.map +1 -1
- package/dist/workflow/__tests__/registry.test.js +3 -3
- package/dist/workflow/__tests__/registry.test.js.map +1 -1
- package/dist/workflow/registry.d.ts.map +1 -1
- package/dist/workflow/registry.js +1 -0
- package/dist/workflow/registry.js.map +1 -1
- package/docs/ARCHITECTURE.md +1 -1
- package/docs/CLAUDE.md +1 -1
- package/docs/CREDITS.md +1 -0
- package/docs/FEATURES.md +18 -0
- package/docs/FIELD-TESTING.md +10 -0
- package/docs/HOOKS.md +339 -36
- package/docs/REFERENCE.md +82 -17
- package/docs/TEAM-MULTIPLEXER.md +107 -0
- package/hooks/hooks.json +204 -66
- package/hooks/jev-compaction.mjs +2404 -0
- package/package.json +2 -2
- package/plugin.json +1 -1
- package/scripts/check-omc-playbooks.mjs +214 -124
- package/scripts/code-simplifier.mjs +26 -3
- package/scripts/copilot/build-hooks.mjs +24 -7
- package/scripts/generate-inventory-graph.mjs +77 -92
- package/scripts/jev-eval.mjs +123 -22
- package/scripts/jev-repair-transcript.mjs +331 -0
- package/scripts/jev-resolve.mjs +374 -22
- package/scripts/keyword-detector.mjs +427 -29
- package/scripts/lib/hook-command-normalizer.d.mts +33 -0
- package/scripts/lib/hook-command-normalizer.mjs +157 -60
- package/scripts/lib/jev-breaker.d.mts +73 -0
- package/scripts/lib/jev-breaker.mjs +830 -0
- package/scripts/lib/jev-compaction-state.mjs +320 -0
- package/scripts/lib/jev-delivery-guard.mjs +567 -0
- package/scripts/lib/jev-mask.mjs +36 -0
- package/scripts/lib/jev-shadow.mjs +363 -14
- package/scripts/lib/shell-checks.mjs +1121 -0
- package/scripts/lib/state-root.cjs +19 -8
- package/scripts/lib/state-root.mjs +19 -8
- package/scripts/persistent-mode.cjs +289 -1
- package/scripts/persistent-mode.mjs +540 -91
- package/scripts/plugin-setup.mjs +26 -30
- package/scripts/plugin-shipping-surface.mjs +4 -1
- package/scripts/post-tool-use-failure.mjs +18 -0
- package/scripts/post-tool-verifier.mjs +49 -3
- package/scripts/pre-tool-enforcer.mjs +658 -64
- package/scripts/run.cjs +4 -2
- package/scripts/session-start.mjs +54 -0
- package/skills/AGENTS.md +1 -0
- package/skills/ai-slop-cleaner/SKILL.md +14 -0
- package/skills/arena/SKILL.md +8 -1
- package/skills/babysit/SKILL.md +2 -1
- package/skills/create-formal-verification-skill/SKILL.md +6 -4
- package/skills/figure-it-out/SKILL.md +5 -0
- package/skills/fix-ci/SKILL.md +3 -1
- package/skills/how/references/explainer-prompt.md +7 -4
- package/skills/interrogate/SKILL.md +10 -6
- package/skills/ralph/SKILL.md +27 -2
- package/skills/ralph-experiment/SKILL.md +1 -1
- package/skills/sdd/SKILL.md +67 -0
- package/skills/sdd/phases/criteria.md +144 -0
- package/skills/sdd/phases/execute.md +226 -0
- package/skills/sdd/phases/review.md +216 -0
- package/skills/sdd/phases/rules.md +195 -0
- package/skills/sdd/phases/spec.md +75 -0
- package/skills/sdd/phases/tasks.md +162 -0
- package/skills/statechart/scripts/run.ts +6 -3
- package/skills/statechart/scripts/test/child-env.test.ts +53 -0
- package/templates/hooks/keyword-detector.mjs +172 -5
- package/templates/hooks/lib/state-root.mjs +19 -8
- package/templates/hooks/persistent-mode.mjs +296 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { afterEach, beforeEach, describe, expect, it, vi } from
|
|
2
|
-
import { mkdtemp, mkdir, rm, writeFile } from
|
|
3
|
-
import { join } from
|
|
4
|
-
import { tmpdir } from
|
|
5
|
-
import { teamListMailbox, teamReadCanonicalMailboxMessageStrict, } from
|
|
6
|
-
import { evaluateMailboxNotificationGuard, mailboxNotificationSecurityTupleEquals, readCurrentMailboxNotificationGuard, } from
|
|
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 =
|
|
30
|
-
const timestamp =
|
|
31
|
-
const instanceId =
|
|
32
|
-
const supportsStrictTmuxFixture = process.platform ===
|
|
33
|
-
const tmuxServerIdentity = supportsStrictTmuxFixture
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
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:
|
|
45
|
+
socket_path: "/tmp/dispatch-session.sock",
|
|
44
46
|
server_pid: 0,
|
|
45
|
-
process_started_at:
|
|
47
|
+
process_started_at: "darwin:4242:123456",
|
|
46
48
|
};
|
|
47
49
|
const malformedServerStartIdentity = {
|
|
48
|
-
socket_path:
|
|
50
|
+
socket_path: "/tmp/dispatch-session.sock",
|
|
49
51
|
server_pid: 4242,
|
|
50
|
-
process_started_at:
|
|
52
|
+
process_started_at: "malformed",
|
|
51
53
|
};
|
|
52
54
|
function strictTmuxIdentity() {
|
|
53
55
|
if (!tmuxServerIdentity)
|
|
54
|
-
throw new Error(
|
|
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:
|
|
60
|
-
requestId:
|
|
61
|
-
messageId:
|
|
62
|
-
triggerMessage:
|
|
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:
|
|
69
|
+
kind: "mailbox",
|
|
68
70
|
team_name: teamName,
|
|
69
71
|
to_worker: input.recipient,
|
|
70
72
|
worker_index: 1,
|
|
71
|
-
pane_id:
|
|
73
|
+
pane_id: "%9",
|
|
72
74
|
trigger_message: input.triggerMessage,
|
|
73
75
|
message_id: input.messageId,
|
|
74
|
-
transport_preference:
|
|
76
|
+
transport_preference: "transport_direct",
|
|
75
77
|
fallback_allowed: true,
|
|
76
|
-
status:
|
|
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:
|
|
88
|
+
from_worker: "leader-fixed",
|
|
87
89
|
to_worker: input.recipient,
|
|
88
|
-
body:
|
|
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(
|
|
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
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
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: [
|
|
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:
|
|
122
|
+
tmux_session: "dispatch-session:0",
|
|
110
123
|
next_task_id: 2,
|
|
111
|
-
leader_pane_id:
|
|
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:
|
|
132
|
+
return { kind: "valid", request: value };
|
|
120
133
|
}
|
|
121
134
|
function strictMailbox(value = message()) {
|
|
122
|
-
return { kind:
|
|
135
|
+
return { kind: "valid", message: value };
|
|
123
136
|
}
|
|
124
137
|
function owned() {
|
|
125
138
|
if (!tmuxServerIdentity)
|
|
126
|
-
return { kind:
|
|
139
|
+
return { kind: "unavailable" };
|
|
127
140
|
return {
|
|
128
|
-
kind:
|
|
129
|
-
provider:
|
|
130
|
-
providerTarget:
|
|
131
|
-
paneId:
|
|
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(
|
|
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,
|
|
149
|
-
await mkdir(join(cwd,
|
|
150
|
-
|
|
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,
|
|
154
|
-
await mkdir(join(cwd,
|
|
155
|
-
|
|
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(),
|
|
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(
|
|
172
|
-
const legacyPath = join(cwd,
|
|
173
|
-
await mkdir(join(cwd,
|
|
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:
|
|
195
|
+
from: "leader-fixed",
|
|
177
196
|
to: input.recipient,
|
|
178
|
-
body:
|
|
197
|
+
body: "Continue.",
|
|
179
198
|
createdAt: timestamp,
|
|
180
|
-
})}\n`,
|
|
199
|
+
})}\n`, "utf8");
|
|
181
200
|
await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
|
|
182
|
-
kind:
|
|
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(
|
|
189
|
-
await writeRawMailbox(
|
|
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:
|
|
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:
|
|
215
|
+
kind: "malformed_store",
|
|
216
|
+
cause: "messages_non_array",
|
|
196
217
|
});
|
|
197
|
-
await writeMailbox({ worker:
|
|
218
|
+
await writeMailbox({ worker: "other-worker", messages: [message()] });
|
|
198
219
|
await expect(teamReadCanonicalMailboxMessageStrict(teamName, input.recipient, input.messageId, cwd)).resolves.toEqual({
|
|
199
|
-
kind:
|
|
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:
|
|
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:
|
|
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:
|
|
243
|
+
kind: "duplicate_message_id",
|
|
244
|
+
messageId: input.messageId,
|
|
245
|
+
messageIndexes: [0, 1],
|
|
212
246
|
});
|
|
213
247
|
});
|
|
214
|
-
it(
|
|
215
|
-
await writeMailbox({
|
|
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:
|
|
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:
|
|
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:
|
|
267
|
+
kind: "valid",
|
|
268
|
+
message: message(),
|
|
226
269
|
});
|
|
227
270
|
});
|
|
228
271
|
});
|
|
229
|
-
describe(
|
|
230
|
-
it.skipIf(!supportsStrictTmuxFixture)(
|
|
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:
|
|
234
|
-
{
|
|
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({
|
|
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:
|
|
293
|
+
dispatch: strictDispatch(request({ pane_id: "%foreign" })),
|
|
242
294
|
}));
|
|
243
295
|
expect(mismatched).toMatchObject({
|
|
244
|
-
kind:
|
|
296
|
+
kind: "suppress",
|
|
297
|
+
reason: "mailbox_target_metadata_mismatch",
|
|
245
298
|
});
|
|
246
299
|
});
|
|
247
|
-
it(
|
|
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:
|
|
302
|
+
kind: "suppress",
|
|
303
|
+
reason: "mailbox_team_unavailable",
|
|
250
304
|
});
|
|
251
|
-
expect(evaluateMailboxNotificationGuard(input, validState({ config: config({ name:
|
|
252
|
-
kind:
|
|
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:
|
|
310
|
+
kind: "suppress",
|
|
311
|
+
reason: "mailbox_target_missing",
|
|
256
312
|
});
|
|
257
313
|
expect(evaluateMailboxNotificationGuard(input, validState({
|
|
258
|
-
dispatch: { kind:
|
|
259
|
-
}))).toMatchObject({
|
|
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: {
|
|
262
|
-
|
|
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:
|
|
265
|
-
}))).toMatchObject({
|
|
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:
|
|
268
|
-
}))).toMatchObject({
|
|
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: {
|
|
271
|
-
|
|
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:
|
|
346
|
+
? validState({ ownership: { kind: "foreign" } })
|
|
274
347
|
: validState({
|
|
275
348
|
config: config({
|
|
276
|
-
tmux_session:
|
|
277
|
-
workers: [
|
|
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:
|
|
280
|
-
ownership: { kind:
|
|
360
|
+
dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
|
|
361
|
+
ownership: { kind: "foreign" },
|
|
281
362
|
});
|
|
282
363
|
expect(evaluateMailboxNotificationGuard(input, foreignState)).toMatchObject({
|
|
283
|
-
kind:
|
|
364
|
+
kind: "suppress",
|
|
365
|
+
reason: "mailbox_target_foreign",
|
|
284
366
|
});
|
|
285
|
-
expect(evaluateMailboxNotificationGuard(input, validState({ ownership: { kind:
|
|
286
|
-
kind:
|
|
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:
|
|
292
|
-
provider:
|
|
293
|
-
providerTarget:
|
|
294
|
-
paneId:
|
|
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:
|
|
301
|
-
workers: [
|
|
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:
|
|
394
|
+
dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
|
|
304
395
|
ownership: {
|
|
305
|
-
kind:
|
|
306
|
-
provider:
|
|
307
|
-
providerTarget:
|
|
308
|
-
paneId:
|
|
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:
|
|
404
|
+
kind: "suppress",
|
|
405
|
+
reason: "mailbox_provider_mismatch",
|
|
314
406
|
});
|
|
315
407
|
});
|
|
316
|
-
it(
|
|
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:
|
|
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:
|
|
329
|
-
reason:
|
|
420
|
+
kind: "suppress",
|
|
421
|
+
reason: "mailbox_membership_unresolvable",
|
|
330
422
|
safePendingRequest: request(),
|
|
331
423
|
});
|
|
332
424
|
}
|
|
333
425
|
});
|
|
334
|
-
it(
|
|
426
|
+
it("requires an instance UUID for CMUX while never attaching a fake tmux identity", () => {
|
|
335
427
|
const cmuxTarget = {
|
|
336
|
-
kind:
|
|
337
|
-
provider:
|
|
338
|
-
providerTarget:
|
|
339
|
-
paneId:
|
|
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:
|
|
344
|
-
workers: [
|
|
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:
|
|
446
|
+
dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
|
|
347
447
|
ownership: cmuxTarget,
|
|
348
448
|
}));
|
|
349
449
|
expect(result).toMatchObject({
|
|
350
|
-
kind:
|
|
450
|
+
kind: "allow",
|
|
351
451
|
target: {
|
|
352
|
-
provider:
|
|
353
|
-
providerTarget:
|
|
354
|
-
paneId:
|
|
452
|
+
provider: "cmux",
|
|
453
|
+
providerTarget: "cmux:workspace-1",
|
|
454
|
+
paneId: "surface-worker-1",
|
|
355
455
|
},
|
|
356
456
|
});
|
|
357
|
-
if (result.kind !==
|
|
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:
|
|
465
|
+
tmux_session: "cmux:workspace-1",
|
|
366
466
|
instance_id: undefined,
|
|
367
|
-
workers: [
|
|
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:
|
|
477
|
+
dispatch: strictDispatch(request({ pane_id: "surface-worker-1" })),
|
|
370
478
|
ownership: cmuxTarget,
|
|
371
479
|
}))).toMatchObject({
|
|
372
|
-
kind:
|
|
373
|
-
reason:
|
|
480
|
+
kind: "suppress",
|
|
481
|
+
reason: "mailbox_membership_unresolvable",
|
|
374
482
|
});
|
|
375
483
|
expect(evaluateMailboxNotificationGuard(input, validState({
|
|
376
484
|
config: config({
|
|
377
|
-
tmux_session:
|
|
378
|
-
workers: [
|
|
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:
|
|
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:
|
|
387
|
-
reason:
|
|
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)(
|
|
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:
|
|
397
|
-
last_reason:
|
|
618
|
+
updated_at: "2026-07-13T00:03:00.000Z",
|
|
619
|
+
last_reason: "mailbox_membership_unresolvable",
|
|
398
620
|
})),
|
|
399
621
|
}));
|
|
400
|
-
expect(first.kind).toBe(
|
|
401
|
-
expect(diagnosticsOnly.kind).toBe(
|
|
402
|
-
if (first.kind !==
|
|
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:
|
|
629
|
+
requestTriggerMessage: "Different trigger.",
|
|
408
630
|
})).toBe(false);
|
|
409
631
|
expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
|
|
410
632
|
...first.securityTuple,
|
|
411
|
-
configInstanceId:
|
|
633
|
+
configInstanceId: "bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb",
|
|
412
634
|
})).toBe(false);
|
|
413
635
|
expect(mailboxNotificationSecurityTupleEquals(first.securityTuple, {
|
|
414
636
|
...first.securityTuple,
|
|
415
|
-
configTmuxServerSocketPath:
|
|
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 ===
|
|
424
|
-
?
|
|
425
|
-
:
|
|
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:
|
|
650
|
+
config: config({ tmux_session: "other-session:0" }),
|
|
429
651
|
ownership: {
|
|
430
|
-
kind:
|
|
431
|
-
provider:
|
|
432
|
-
providerTarget:
|
|
433
|
-
paneId:
|
|
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(
|
|
438
|
-
if (changedSecurity.kind !==
|
|
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)(
|
|
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,
|
|
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:
|
|
461
|
-
expect(readStrictDispatchRequest).toHaveBeenCalledWith(teamName, input.requestId,
|
|
462
|
-
expect(readStrictMailboxMessage).toHaveBeenCalledWith(teamName, input.recipient, input.messageId,
|
|
463
|
-
expect(verifyProviderOwnership).toHaveBeenCalledWith(expect.objectContaining({ paneId:
|
|
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)(
|
|
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,
|
|
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:
|
|
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(
|
|
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,
|
|
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:
|
|
502
|
-
reason:
|
|
723
|
+
kind: "suppress",
|
|
724
|
+
reason: "mailbox_membership_unresolvable",
|
|
503
725
|
});
|
|
504
726
|
expect(verifyProviderOwnership).not.toHaveBeenCalled();
|
|
505
727
|
});
|