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