@memnexus-ai/mx-agent-cli 0.1.294 → 0.1.296-next.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/dist/__tests__/agents-md-canonicalization.test.js +31 -1
- package/dist/__tests__/agents-md-canonicalization.test.js.map +1 -1
- package/dist/__tests__/behavioral-extraction.test.js +50 -0
- package/dist/__tests__/behavioral-extraction.test.js.map +1 -1
- package/dist/__tests__/bootstrap-behavioral-contract.test.js +6 -3
- package/dist/__tests__/bootstrap-behavioral-contract.test.js.map +1 -1
- package/dist/__tests__/bundle-config.test.js +28 -2
- package/dist/__tests__/bundle-config.test.js.map +1 -1
- package/dist/__tests__/catalog-interaction.test.d.ts +25 -0
- package/dist/__tests__/catalog-interaction.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-interaction.test.js +269 -0
- package/dist/__tests__/catalog-interaction.test.js.map +1 -0
- package/dist/__tests__/catalog-named-memories.test.d.ts +2 -0
- package/dist/__tests__/catalog-named-memories.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-named-memories.test.js +204 -0
- package/dist/__tests__/catalog-named-memories.test.js.map +1 -0
- package/dist/__tests__/catalog-origin-main.test.d.ts +15 -0
- package/dist/__tests__/catalog-origin-main.test.d.ts.map +1 -0
- package/dist/__tests__/catalog-origin-main.test.js +296 -0
- package/dist/__tests__/catalog-origin-main.test.js.map +1 -0
- package/dist/__tests__/catalog.test.d.ts +2 -0
- package/dist/__tests__/catalog.test.d.ts.map +1 -0
- package/dist/__tests__/catalog.test.js +131 -0
- package/dist/__tests__/catalog.test.js.map +1 -0
- package/dist/__tests__/claude-local-sanitizer.test.d.ts +24 -0
- package/dist/__tests__/claude-local-sanitizer.test.d.ts.map +1 -0
- package/dist/__tests__/claude-local-sanitizer.test.js +906 -0
- package/dist/__tests__/claude-local-sanitizer.test.js.map +1 -0
- package/dist/__tests__/cli-build-integration.test.d.ts +2 -0
- package/dist/__tests__/cli-build-integration.test.d.ts.map +1 -0
- package/dist/__tests__/cli-build-integration.test.js +64 -0
- package/dist/__tests__/cli-build-integration.test.js.map +1 -0
- package/dist/__tests__/cli-build.test.d.ts +2 -0
- package/dist/__tests__/cli-build.test.d.ts.map +1 -0
- package/dist/__tests__/cli-build.test.js +640 -0
- package/dist/__tests__/cli-build.test.js.map +1 -0
- package/dist/__tests__/codex-deploy-config.test.js +60 -0
- package/dist/__tests__/codex-deploy-config.test.js.map +1 -1
- package/dist/__tests__/completion-rows-discriminate.test.d.ts +20 -0
- package/dist/__tests__/completion-rows-discriminate.test.d.ts.map +1 -0
- package/dist/__tests__/completion-rows-discriminate.test.js +481 -0
- package/dist/__tests__/completion-rows-discriminate.test.js.map +1 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts +2 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.d.ts.map +1 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.js +127 -0
- package/dist/__tests__/config-fidelity-archived-symlinks.test.js.map +1 -0
- package/dist/__tests__/config-fidelity-display.test.d.ts +2 -0
- package/dist/__tests__/config-fidelity-display.test.d.ts.map +1 -0
- package/dist/__tests__/config-fidelity-display.test.js +77 -0
- package/dist/__tests__/config-fidelity-display.test.js.map +1 -0
- package/dist/__tests__/config-fidelity.test.js +166 -33
- package/dist/__tests__/config-fidelity.test.js.map +1 -1
- package/dist/__tests__/config-generation-gate.test.js +78 -0
- package/dist/__tests__/config-generation-gate.test.js.map +1 -1
- package/dist/__tests__/config-sync.test.js +89 -1
- package/dist/__tests__/config-sync.test.js.map +1 -1
- package/dist/__tests__/coordination-401-production-wiring.test.js +12 -7
- package/dist/__tests__/coordination-401-production-wiring.test.js.map +1 -1
- package/dist/__tests__/coordination-401-recovery.test.js +39 -32
- package/dist/__tests__/coordination-401-recovery.test.js.map +1 -1
- package/dist/__tests__/coordination-brief-pin.test.js +21 -8
- package/dist/__tests__/coordination-brief-pin.test.js.map +1 -1
- package/dist/__tests__/coordination-client.test.js +316 -3
- package/dist/__tests__/coordination-client.test.js.map +1 -1
- package/dist/__tests__/coordination-credential-endpoint.test.d.ts +24 -0
- package/dist/__tests__/coordination-credential-endpoint.test.d.ts.map +1 -0
- package/dist/__tests__/coordination-credential-endpoint.test.js +1290 -0
- package/dist/__tests__/coordination-credential-endpoint.test.js.map +1 -0
- package/dist/__tests__/coordination-memory.test.js +20 -4
- package/dist/__tests__/coordination-memory.test.js.map +1 -1
- package/dist/__tests__/coordination-provision.test.js +22 -14
- package/dist/__tests__/coordination-provision.test.js.map +1 -1
- package/dist/__tests__/coordination-status-registration.test.d.ts +16 -0
- package/dist/__tests__/coordination-status-registration.test.d.ts.map +1 -0
- package/dist/__tests__/coordination-status-registration.test.js +480 -0
- package/dist/__tests__/coordination-status-registration.test.js.map +1 -0
- package/dist/__tests__/coordination-token-multitenant.test.js +24 -24
- package/dist/__tests__/coordination-token-multitenant.test.js.map +1 -1
- package/dist/__tests__/coordination-token.test.js +35 -28
- package/dist/__tests__/coordination-token.test.js.map +1 -1
- package/dist/__tests__/creation-pr-class-check.test.d.ts +17 -0
- package/dist/__tests__/creation-pr-class-check.test.d.ts.map +1 -0
- package/dist/__tests__/creation-pr-class-check.test.js +346 -0
- package/dist/__tests__/creation-pr-class-check.test.js.map +1 -0
- package/dist/__tests__/decision-check.test.d.ts +2 -0
- package/dist/__tests__/decision-check.test.d.ts.map +1 -0
- package/dist/__tests__/decision-check.test.js +105 -0
- package/dist/__tests__/decision-check.test.js.map +1 -0
- package/dist/__tests__/digest-team-omission.test.d.ts +15 -0
- package/dist/__tests__/digest-team-omission.test.d.ts.map +1 -0
- package/dist/__tests__/digest-team-omission.test.js +247 -0
- package/dist/__tests__/digest-team-omission.test.js.map +1 -0
- package/dist/__tests__/doctor-worktree-path.test.d.ts +17 -0
- package/dist/__tests__/doctor-worktree-path.test.d.ts.map +1 -0
- package/dist/__tests__/doctor-worktree-path.test.js +158 -0
- package/dist/__tests__/doctor-worktree-path.test.js.map +1 -0
- package/dist/__tests__/fleet-data.test.js +40 -7
- package/dist/__tests__/fleet-data.test.js.map +1 -1
- package/dist/__tests__/fleet-tmux.test.js +2 -2
- package/dist/__tests__/fleet-tmux.test.js.map +1 -1
- package/dist/__tests__/generate-claude.test.js +137 -3
- package/dist/__tests__/generate-claude.test.js.map +1 -1
- package/dist/__tests__/git-env.test.d.ts +14 -0
- package/dist/__tests__/git-env.test.d.ts.map +1 -0
- package/dist/__tests__/git-env.test.js +131 -0
- package/dist/__tests__/git-env.test.js.map +1 -0
- package/dist/__tests__/git-identity-isolation.test.d.ts +33 -0
- package/dist/__tests__/git-identity-isolation.test.d.ts.map +1 -0
- package/dist/__tests__/git-identity-isolation.test.js +626 -0
- package/dist/__tests__/git-identity-isolation.test.js.map +1 -0
- package/dist/__tests__/harness-extract.test.d.ts +19 -0
- package/dist/__tests__/harness-extract.test.d.ts.map +1 -0
- package/dist/__tests__/harness-extract.test.js +566 -0
- package/dist/__tests__/harness-extract.test.js.map +1 -0
- package/dist/__tests__/harness-wiring.test.d.ts +16 -0
- package/dist/__tests__/harness-wiring.test.d.ts.map +1 -0
- package/dist/__tests__/harness-wiring.test.js +469 -0
- package/dist/__tests__/harness-wiring.test.js.map +1 -0
- package/dist/__tests__/hook-heal.test.js +17 -0
- package/dist/__tests__/hook-heal.test.js.map +1 -1
- package/dist/__tests__/init-coordination-url.test.d.ts +11 -0
- package/dist/__tests__/init-coordination-url.test.d.ts.map +1 -0
- package/dist/__tests__/init-coordination-url.test.js +114 -0
- package/dist/__tests__/init-coordination-url.test.js.map +1 -0
- package/dist/__tests__/memory-autocreate.test.js +574 -8
- package/dist/__tests__/memory-autocreate.test.js.map +1 -1
- package/dist/__tests__/memory-log-result.test.d.ts +13 -0
- package/dist/__tests__/memory-log-result.test.d.ts.map +1 -0
- package/dist/__tests__/memory-log-result.test.js +113 -0
- package/dist/__tests__/memory-log-result.test.js.map +1 -0
- package/dist/__tests__/memory-named-exists.test.d.ts +16 -0
- package/dist/__tests__/memory-named-exists.test.d.ts.map +1 -0
- package/dist/__tests__/memory-named-exists.test.js +288 -0
- package/dist/__tests__/memory-named-exists.test.js.map +1 -0
- package/dist/__tests__/mx-agent-cli-pin-validation.test.js +23 -47
- package/dist/__tests__/mx-agent-cli-pin-validation.test.js.map +1 -1
- package/dist/__tests__/mx-agent-cli-version-pin.test.js +34 -88
- package/dist/__tests__/mx-agent-cli-version-pin.test.js.map +1 -1
- package/dist/__tests__/new-project-first-team.test.d.ts +15 -0
- package/dist/__tests__/new-project-first-team.test.d.ts.map +1 -0
- package/dist/__tests__/new-project-first-team.test.js +263 -0
- package/dist/__tests__/new-project-first-team.test.js.map +1 -0
- package/dist/__tests__/otel-env.test.d.ts +2 -0
- package/dist/__tests__/otel-env.test.d.ts.map +1 -0
- package/dist/__tests__/otel-env.test.js +127 -0
- package/dist/__tests__/otel-env.test.js.map +1 -0
- package/dist/__tests__/project-config.test.js +283 -1
- package/dist/__tests__/project-config.test.js.map +1 -1
- package/dist/__tests__/provision-behavioral-contract.test.js +96 -4
- package/dist/__tests__/provision-behavioral-contract.test.js.map +1 -1
- package/dist/__tests__/provision-catalog-precondition.test.d.ts +26 -0
- package/dist/__tests__/provision-catalog-precondition.test.d.ts.map +1 -0
- package/dist/__tests__/provision-catalog-precondition.test.js +620 -0
- package/dist/__tests__/provision-catalog-precondition.test.js.map +1 -0
- package/dist/__tests__/provision-completion-rows.test.d.ts +17 -0
- package/dist/__tests__/provision-completion-rows.test.d.ts.map +1 -0
- package/dist/__tests__/provision-completion-rows.test.js +3187 -0
- package/dist/__tests__/provision-completion-rows.test.js.map +1 -0
- package/dist/__tests__/provision-identity-gate.test.d.ts +20 -0
- package/dist/__tests__/provision-identity-gate.test.d.ts.map +1 -0
- package/dist/__tests__/provision-identity-gate.test.js +600 -0
- package/dist/__tests__/provision-identity-gate.test.js.map +1 -0
- package/dist/__tests__/provision-resume.test.d.ts +26 -0
- package/dist/__tests__/provision-resume.test.d.ts.map +1 -0
- package/dist/__tests__/provision-resume.test.js +1164 -0
- package/dist/__tests__/provision-resume.test.js.map +1 -0
- package/dist/__tests__/provision-roleguide-anchors.test.d.ts +27 -0
- package/dist/__tests__/provision-roleguide-anchors.test.d.ts.map +1 -0
- package/dist/__tests__/provision-roleguide-anchors.test.js +747 -0
- package/dist/__tests__/provision-roleguide-anchors.test.js.map +1 -0
- package/dist/__tests__/provision-skeleton-fill.test.d.ts +16 -0
- package/dist/__tests__/provision-skeleton-fill.test.d.ts.map +1 -0
- package/dist/__tests__/provision-skeleton-fill.test.js +488 -0
- package/dist/__tests__/provision-skeleton-fill.test.js.map +1 -0
- package/dist/__tests__/provision-teambuilder-flow.test.js +93 -7
- package/dist/__tests__/provision-teambuilder-flow.test.js.map +1 -1
- package/dist/__tests__/repo-guard-wiring.test.d.ts +21 -0
- package/dist/__tests__/repo-guard-wiring.test.d.ts.map +1 -0
- package/dist/__tests__/repo-guard-wiring.test.js +638 -0
- package/dist/__tests__/repo-guard-wiring.test.js.map +1 -0
- package/dist/__tests__/report-format.test.d.ts +2 -0
- package/dist/__tests__/report-format.test.d.ts.map +1 -0
- package/dist/__tests__/report-format.test.js +219 -0
- package/dist/__tests__/report-format.test.js.map +1 -0
- package/dist/__tests__/row15-detail-sanitizer.test.d.ts +20 -0
- package/dist/__tests__/row15-detail-sanitizer.test.d.ts.map +1 -0
- package/dist/__tests__/row15-detail-sanitizer.test.js +61 -0
- package/dist/__tests__/row15-detail-sanitizer.test.js.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts +2 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.js +309 -0
- package/dist/__tests__/runtime-codex-gateway-pilot.test.js.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts +2 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.js +163 -0
- package/dist/__tests__/runtime-codex-gateway-provider.test.js.map +1 -0
- package/dist/__tests__/runtime-identity.test.d.ts +2 -0
- package/dist/__tests__/runtime-identity.test.d.ts.map +1 -0
- package/dist/__tests__/runtime-identity.test.js +117 -0
- package/dist/__tests__/runtime-identity.test.js.map +1 -0
- package/dist/__tests__/session-pause-provisioning.test.js +6 -1
- package/dist/__tests__/session-pause-provisioning.test.js.map +1 -1
- package/dist/__tests__/session-record-disclosure.test.d.ts +24 -0
- package/dist/__tests__/session-record-disclosure.test.d.ts.map +1 -0
- package/dist/__tests__/session-record-disclosure.test.js +494 -0
- package/dist/__tests__/session-record-disclosure.test.js.map +1 -0
- package/dist/__tests__/session.test.js +35 -0
- package/dist/__tests__/session.test.js.map +1 -1
- package/dist/__tests__/slug-validation.test.js +27 -21
- package/dist/__tests__/slug-validation.test.js.map +1 -1
- package/dist/__tests__/standards-injection.test.d.ts +2 -0
- package/dist/__tests__/standards-injection.test.d.ts.map +1 -0
- package/dist/__tests__/standards-injection.test.js +179 -0
- package/dist/__tests__/standards-injection.test.js.map +1 -0
- package/dist/__tests__/start-interactive-role.test.d.ts +22 -0
- package/dist/__tests__/start-interactive-role.test.d.ts.map +1 -0
- package/dist/__tests__/start-interactive-role.test.js +204 -0
- package/dist/__tests__/start-interactive-role.test.js.map +1 -0
- package/dist/__tests__/start-team-identity.test.d.ts +25 -0
- package/dist/__tests__/start-team-identity.test.d.ts.map +1 -0
- package/dist/__tests__/start-team-identity.test.js +307 -0
- package/dist/__tests__/start-team-identity.test.js.map +1 -0
- package/dist/__tests__/team-memory-commands.test.js +142 -19
- package/dist/__tests__/team-memory-commands.test.js.map +1 -1
- package/dist/__tests__/template-sync.test.d.ts +19 -0
- package/dist/__tests__/template-sync.test.d.ts.map +1 -0
- package/dist/__tests__/template-sync.test.js +270 -0
- package/dist/__tests__/template-sync.test.js.map +1 -0
- package/dist/__tests__/test-project.test.d.ts +18 -0
- package/dist/__tests__/test-project.test.d.ts.map +1 -0
- package/dist/__tests__/test-project.test.js +465 -0
- package/dist/__tests__/test-project.test.js.map +1 -0
- package/dist/__tests__/usage-per-call-grouping.test.d.ts +25 -0
- package/dist/__tests__/usage-per-call-grouping.test.d.ts.map +1 -0
- package/dist/__tests__/usage-per-call-grouping.test.js +952 -0
- package/dist/__tests__/usage-per-call-grouping.test.js.map +1 -0
- package/dist/__tests__/verify-hooks-check-all.test.d.ts +32 -0
- package/dist/__tests__/verify-hooks-check-all.test.d.ts.map +1 -0
- package/dist/__tests__/verify-hooks-check-all.test.js +553 -0
- package/dist/__tests__/verify-hooks-check-all.test.js.map +1 -0
- package/dist/__tests__/worktree-sync-fixture.test.d.ts +17 -0
- package/dist/__tests__/worktree-sync-fixture.test.d.ts.map +1 -0
- package/dist/__tests__/worktree-sync-fixture.test.js +519 -0
- package/dist/__tests__/worktree-sync-fixture.test.js.map +1 -0
- package/dist/__tests__/worktree-sync-hardening.test.d.ts +13 -0
- package/dist/__tests__/worktree-sync-hardening.test.d.ts.map +1 -0
- package/dist/__tests__/worktree-sync-hardening.test.js +919 -0
- package/dist/__tests__/worktree-sync-hardening.test.js.map +1 -0
- package/dist/__tests__/worktree-sync-shell-free.test.d.ts +25 -0
- package/dist/__tests__/worktree-sync-shell-free.test.d.ts.map +1 -0
- package/dist/__tests__/worktree-sync-shell-free.test.js +185 -0
- package/dist/__tests__/worktree-sync-shell-free.test.js.map +1 -0
- package/dist/__tests__/worktree.test.js +75 -1
- package/dist/__tests__/worktree.test.js.map +1 -1
- package/dist/agent-config/.mx-config-generation.json +2 -2
- package/dist/agent-config/AGENTS.md.template +2 -2
- package/dist/agent-config/agents/bar-raiser.md +34 -1
- package/dist/agent-config/agents/red-team.md +34 -1
- package/dist/agent-config/agents/security-reviewer.md +22 -1
- package/dist/agent-config/claude-md/CLAUDE.core.md +6 -1
- package/dist/agent-config/claude-md/CLAUDE.overlay.memnexus.md +1 -3
- package/dist/agent-config/coordination-rosters.generated.json +10 -0
- package/dist/agent-config/hooks/HOOK-TIMEOUTS.md +27 -1
- package/dist/agent-config/hooks/OR-TRUE-AUDIT.md +8 -8
- package/dist/agent-config/hooks/auto-capture-precompact.sh +180 -83
- package/dist/agent-config/hooks/auto-capture-session-end.sh +216 -87
- package/dist/agent-config/hooks/auto-checkpoint.sh +75 -5
- package/dist/agent-config/hooks/coordination-brief.sh +290 -245
- package/dist/agent-config/hooks/deploy-verification-reminder.sh +359 -22
- package/dist/agent-config/hooks/git-mutation-guard.sh +85 -13
- package/dist/agent-config/hooks/observability-sync.sh +46 -9
- package/dist/agent-config/hooks/session-idle-gate.sh +177 -12
- package/dist/agent-config/hooks/subagent-write-guard.sh +670 -0
- package/dist/agent-config/hooks/worktree-guard.sh +36 -7
- package/dist/agent-config/settings.json +15 -2
- package/dist/agent-config/shared/creation-pr-review-checklist.md +317 -0
- package/dist/commands/bootstrap.d.ts.map +1 -1
- package/dist/commands/bootstrap.js +22 -10
- package/dist/commands/bootstrap.js.map +1 -1
- package/dist/commands/config-sync.d.ts +37 -0
- package/dist/commands/config-sync.d.ts.map +1 -1
- package/dist/commands/config-sync.js +36 -18
- package/dist/commands/config-sync.js.map +1 -1
- package/dist/commands/config.d.ts.map +1 -1
- package/dist/commands/config.js +28 -1
- package/dist/commands/config.js.map +1 -1
- package/dist/commands/coordination.d.ts +150 -8
- package/dist/commands/coordination.d.ts.map +1 -1
- package/dist/commands/coordination.js +524 -25
- package/dist/commands/coordination.js.map +1 -1
- package/dist/commands/create.d.ts +922 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +4934 -345
- package/dist/commands/create.js.map +1 -1
- package/dist/commands/dashboard.d.ts.map +1 -1
- package/dist/commands/dashboard.js +10 -2
- package/dist/commands/dashboard.js.map +1 -1
- package/dist/commands/decision.d.ts +20 -0
- package/dist/commands/decision.d.ts.map +1 -0
- package/dist/commands/decision.js +54 -0
- package/dist/commands/decision.js.map +1 -0
- package/dist/commands/digest.d.ts.map +1 -1
- package/dist/commands/digest.js +91 -7
- package/dist/commands/digest.js.map +1 -1
- package/dist/commands/fleet-tmux.js +1 -1
- package/dist/commands/fleet-tmux.js.map +1 -1
- package/dist/commands/init.d.ts +8 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +26 -1
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/list.d.ts +32 -1
- package/dist/commands/list.d.ts.map +1 -1
- package/dist/commands/list.js +98 -5
- package/dist/commands/list.js.map +1 -1
- package/dist/commands/monitor.d.ts.map +1 -1
- package/dist/commands/monitor.js +8 -2
- package/dist/commands/monitor.js.map +1 -1
- package/dist/commands/new.d.ts +2 -0
- package/dist/commands/new.d.ts.map +1 -1
- package/dist/commands/new.js +114 -21
- package/dist/commands/new.js.map +1 -1
- package/dist/commands/report.d.ts +33 -0
- package/dist/commands/report.d.ts.map +1 -0
- package/dist/commands/report.js +73 -0
- package/dist/commands/report.js.map +1 -0
- package/dist/commands/session.js +1 -1
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/start.d.ts +42 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +183 -8
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/sync.d.ts +57 -0
- package/dist/commands/sync.d.ts.map +1 -1
- package/dist/commands/sync.js +117 -3
- package/dist/commands/sync.js.map +1 -1
- package/dist/commands/update.d.ts +13 -1
- package/dist/commands/update.d.ts.map +1 -1
- package/dist/commands/update.js +50 -1
- package/dist/commands/update.js.map +1 -1
- package/dist/commands/usage.d.ts +64 -0
- package/dist/commands/usage.d.ts.map +1 -1
- package/dist/commands/usage.js +96 -3
- package/dist/commands/usage.js.map +1 -1
- package/dist/commands/verify-hooks.d.ts +37 -1
- package/dist/commands/verify-hooks.d.ts.map +1 -1
- package/dist/commands/verify-hooks.js +114 -2
- package/dist/commands/verify-hooks.js.map +1 -1
- package/dist/commands/window.d.ts +10 -0
- package/dist/commands/window.d.ts.map +1 -0
- package/dist/commands/window.js +265 -0
- package/dist/commands/window.js.map +1 -0
- package/dist/commands/worktree-sync.d.ts +54 -0
- package/dist/commands/worktree-sync.d.ts.map +1 -0
- package/dist/commands/worktree-sync.js +135 -0
- package/dist/commands/worktree-sync.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +189 -14
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-session.d.ts +12 -0
- package/dist/lib/agent-session.d.ts.map +1 -1
- package/dist/lib/agent-session.js +189 -42
- package/dist/lib/agent-session.js.map +1 -1
- package/dist/lib/behavioral-injection.d.ts +9 -0
- package/dist/lib/behavioral-injection.d.ts.map +1 -1
- package/dist/lib/behavioral-injection.js +10 -1
- package/dist/lib/behavioral-injection.js.map +1 -1
- package/dist/lib/catalog.d.ts +321 -2
- package/dist/lib/catalog.d.ts.map +1 -1
- package/dist/lib/catalog.js +490 -11
- package/dist/lib/catalog.js.map +1 -1
- package/dist/lib/claude.d.ts +113 -23
- package/dist/lib/claude.d.ts.map +1 -1
- package/dist/lib/claude.js +498 -32
- package/dist/lib/claude.js.map +1 -1
- package/dist/lib/cli-build.d.ts +172 -0
- package/dist/lib/cli-build.d.ts.map +1 -0
- package/dist/lib/cli-build.js +654 -0
- package/dist/lib/cli-build.js.map +1 -0
- package/dist/lib/code-context-file.d.ts +109 -0
- package/dist/lib/code-context-file.d.ts.map +1 -0
- package/dist/lib/code-context-file.js +219 -0
- package/dist/lib/code-context-file.js.map +1 -0
- package/dist/lib/code-context-file.test.d.ts +19 -0
- package/dist/lib/code-context-file.test.d.ts.map +1 -0
- package/dist/lib/code-context-file.test.js +202 -0
- package/dist/lib/code-context-file.test.js.map +1 -0
- package/dist/lib/config-fidelity.d.ts +40 -20
- package/dist/lib/config-fidelity.d.ts.map +1 -1
- package/dist/lib/config-fidelity.js +144 -56
- package/dist/lib/config-fidelity.js.map +1 -1
- package/dist/lib/coordination-client.d.ts +101 -0
- package/dist/lib/coordination-client.d.ts.map +1 -1
- package/dist/lib/coordination-client.js +232 -8
- package/dist/lib/coordination-client.js.map +1 -1
- package/dist/lib/coordination-token.d.ts +333 -6
- package/dist/lib/coordination-token.d.ts.map +1 -1
- package/dist/lib/coordination-token.js +875 -52
- package/dist/lib/coordination-token.js.map +1 -1
- package/dist/lib/decision-check.d.ts +48 -0
- package/dist/lib/decision-check.d.ts.map +1 -0
- package/dist/lib/decision-check.js +149 -0
- package/dist/lib/decision-check.js.map +1 -0
- package/dist/lib/fleet-data.d.ts +34 -0
- package/dist/lib/fleet-data.d.ts.map +1 -1
- package/dist/lib/fleet-data.js +37 -9
- package/dist/lib/fleet-data.js.map +1 -1
- package/dist/lib/fleet-render.js +1 -1
- package/dist/lib/fleet-render.js.map +1 -1
- package/dist/lib/git-identity.d.ts +302 -0
- package/dist/lib/git-identity.d.ts.map +1 -0
- package/dist/lib/git-identity.js +546 -0
- package/dist/lib/git-identity.js.map +1 -0
- package/dist/lib/harness/console/announce.d.ts +45 -0
- package/dist/lib/harness/console/announce.d.ts.map +1 -0
- package/dist/lib/harness/console/announce.js +48 -0
- package/dist/lib/harness/console/announce.js.map +1 -0
- package/dist/lib/harness/console/announce.test.d.ts +2 -0
- package/dist/lib/harness/console/announce.test.d.ts.map +1 -0
- package/dist/lib/harness/console/announce.test.js +104 -0
- package/dist/lib/harness/console/announce.test.js.map +1 -0
- package/dist/lib/harness/console/by-session.d.ts +50 -0
- package/dist/lib/harness/console/by-session.d.ts.map +1 -0
- package/dist/lib/harness/console/by-session.js +83 -0
- package/dist/lib/harness/console/by-session.js.map +1 -0
- package/dist/lib/harness/console/by-session.test.d.ts +2 -0
- package/dist/lib/harness/console/by-session.test.d.ts.map +1 -0
- package/dist/lib/harness/console/by-session.test.js +86 -0
- package/dist/lib/harness/console/by-session.test.js.map +1 -0
- package/dist/lib/harness/console/console.d.ts +67 -0
- package/dist/lib/harness/console/console.d.ts.map +1 -0
- package/dist/lib/harness/console/console.js +373 -0
- package/dist/lib/harness/console/console.js.map +1 -0
- package/dist/lib/harness/console/console.test.d.ts +2 -0
- package/dist/lib/harness/console/console.test.d.ts.map +1 -0
- package/dist/lib/harness/console/console.test.js +269 -0
- package/dist/lib/harness/console/console.test.js.map +1 -0
- package/dist/lib/harness/console/decision-request.d.ts +32 -0
- package/dist/lib/harness/console/decision-request.d.ts.map +1 -0
- package/dist/lib/harness/console/decision-request.js +112 -0
- package/dist/lib/harness/console/decision-request.js.map +1 -0
- package/dist/lib/harness/console/decision-request.test.d.ts +2 -0
- package/dist/lib/harness/console/decision-request.test.d.ts.map +1 -0
- package/dist/lib/harness/console/decision-request.test.js +75 -0
- package/dist/lib/harness/console/decision-request.test.js.map +1 -0
- package/dist/lib/harness/console/fixtures.d.ts +16 -0
- package/dist/lib/harness/console/fixtures.d.ts.map +1 -0
- package/dist/lib/harness/console/fixtures.js +49 -0
- package/dist/lib/harness/console/fixtures.js.map +1 -0
- package/dist/lib/harness/console/index.d.ts +15 -0
- package/dist/lib/harness/console/index.d.ts.map +1 -0
- package/dist/lib/harness/console/index.js +14 -0
- package/dist/lib/harness/console/index.js.map +1 -0
- package/dist/lib/harness/console/rank.d.ts +73 -0
- package/dist/lib/harness/console/rank.d.ts.map +1 -0
- package/dist/lib/harness/console/rank.js +113 -0
- package/dist/lib/harness/console/rank.js.map +1 -0
- package/dist/lib/harness/console/rank.test.d.ts +2 -0
- package/dist/lib/harness/console/rank.test.d.ts.map +1 -0
- package/dist/lib/harness/console/rank.test.js +124 -0
- package/dist/lib/harness/console/rank.test.js.map +1 -0
- package/dist/lib/harness/console/render.d.ts +22 -0
- package/dist/lib/harness/console/render.d.ts.map +1 -0
- package/dist/lib/harness/console/render.js +65 -0
- package/dist/lib/harness/console/render.js.map +1 -0
- package/dist/lib/harness/console/render.test.d.ts +2 -0
- package/dist/lib/harness/console/render.test.d.ts.map +1 -0
- package/dist/lib/harness/console/render.test.js +96 -0
- package/dist/lib/harness/console/render.test.js.map +1 -0
- package/dist/lib/harness/console/replay-cli.test.d.ts +2 -0
- package/dist/lib/harness/console/replay-cli.test.d.ts.map +1 -0
- package/dist/lib/harness/console/replay-cli.test.js +96 -0
- package/dist/lib/harness/console/replay-cli.test.js.map +1 -0
- package/dist/lib/harness/console/replay.d.ts +36 -0
- package/dist/lib/harness/console/replay.d.ts.map +1 -0
- package/dist/lib/harness/console/replay.js +59 -0
- package/dist/lib/harness/console/replay.js.map +1 -0
- package/dist/lib/harness/console/replay.test.d.ts +2 -0
- package/dist/lib/harness/console/replay.test.d.ts.map +1 -0
- package/dist/lib/harness/console/replay.test.js +81 -0
- package/dist/lib/harness/console/replay.test.js.map +1 -0
- package/dist/lib/harness/console/turn-reader.d.ts +50 -0
- package/dist/lib/harness/console/turn-reader.d.ts.map +1 -0
- package/dist/lib/harness/console/turn-reader.js +184 -0
- package/dist/lib/harness/console/turn-reader.js.map +1 -0
- package/dist/lib/harness/console/turn-reader.test.d.ts +2 -0
- package/dist/lib/harness/console/turn-reader.test.d.ts.map +1 -0
- package/dist/lib/harness/console/turn-reader.test.js +108 -0
- package/dist/lib/harness/console/turn-reader.test.js.map +1 -0
- package/dist/lib/harness/console/types.d.ts +109 -0
- package/dist/lib/harness/console/types.d.ts.map +1 -0
- package/dist/lib/harness/console/types.js +2 -0
- package/dist/lib/harness/console/types.js.map +1 -0
- package/dist/lib/harness/contract.d.ts +229 -0
- package/dist/lib/harness/contract.d.ts.map +1 -0
- package/dist/lib/harness/contract.js +22 -0
- package/dist/lib/harness/contract.js.map +1 -0
- package/dist/lib/harness/credential.d.ts +23 -0
- package/dist/lib/harness/credential.d.ts.map +1 -0
- package/dist/lib/harness/credential.js +81 -0
- package/dist/lib/harness/credential.js.map +1 -0
- package/dist/lib/harness/credential.test.d.ts +2 -0
- package/dist/lib/harness/credential.test.d.ts.map +1 -0
- package/dist/lib/harness/credential.test.js +74 -0
- package/dist/lib/harness/credential.test.js.map +1 -0
- package/dist/lib/harness/evaluate.d.ts +390 -0
- package/dist/lib/harness/evaluate.d.ts.map +1 -0
- package/dist/lib/harness/evaluate.js +988 -0
- package/dist/lib/harness/evaluate.js.map +1 -0
- package/dist/lib/harness/evaluate.test.d.ts +2 -0
- package/dist/lib/harness/evaluate.test.d.ts.map +1 -0
- package/dist/lib/harness/evaluate.test.js +621 -0
- package/dist/lib/harness/evaluate.test.js.map +1 -0
- package/dist/lib/harness/extract.d.ts +152 -0
- package/dist/lib/harness/extract.d.ts.map +1 -0
- package/dist/lib/harness/extract.js +1601 -0
- package/dist/lib/harness/extract.js.map +1 -0
- package/dist/lib/harness/gate.d.ts +48 -0
- package/dist/lib/harness/gate.d.ts.map +1 -0
- package/dist/lib/harness/gate.js +60 -0
- package/dist/lib/harness/gate.js.map +1 -0
- package/dist/lib/harness/gate.test.d.ts +2 -0
- package/dist/lib/harness/gate.test.d.ts.map +1 -0
- package/dist/lib/harness/gate.test.js +111 -0
- package/dist/lib/harness/gate.test.js.map +1 -0
- package/dist/lib/harness/self-check.d.ts +59 -0
- package/dist/lib/harness/self-check.d.ts.map +1 -0
- package/dist/lib/harness/self-check.js +56 -0
- package/dist/lib/harness/self-check.js.map +1 -0
- package/dist/lib/harness/self-check.test.d.ts +2 -0
- package/dist/lib/harness/self-check.test.d.ts.map +1 -0
- package/dist/lib/harness/self-check.test.js +43 -0
- package/dist/lib/harness/self-check.test.js.map +1 -0
- package/dist/lib/harness/transcript.d.ts +65 -0
- package/dist/lib/harness/transcript.d.ts.map +1 -0
- package/dist/lib/harness/transcript.js +144 -0
- package/dist/lib/harness/transcript.js.map +1 -0
- package/dist/lib/harness/transcript.test.d.ts +2 -0
- package/dist/lib/harness/transcript.test.d.ts.map +1 -0
- package/dist/lib/harness/transcript.test.js +118 -0
- package/dist/lib/harness/transcript.test.js.map +1 -0
- package/dist/lib/harness-wiring.d.ts +145 -0
- package/dist/lib/harness-wiring.d.ts.map +1 -0
- package/dist/lib/harness-wiring.js +280 -0
- package/dist/lib/harness-wiring.js.map +1 -0
- package/dist/lib/hook-staleness.d.ts +95 -0
- package/dist/lib/hook-staleness.d.ts.map +1 -0
- package/dist/lib/hook-staleness.js +304 -0
- package/dist/lib/hook-staleness.js.map +1 -0
- package/dist/lib/jsonl.d.ts +270 -2
- package/dist/lib/jsonl.d.ts.map +1 -1
- package/dist/lib/jsonl.js +472 -76
- package/dist/lib/jsonl.js.map +1 -1
- package/dist/lib/memory.d.ts +350 -23
- package/dist/lib/memory.d.ts.map +1 -1
- package/dist/lib/memory.js +751 -38
- package/dist/lib/memory.js.map +1 -1
- package/dist/lib/otel-env.d.ts +90 -0
- package/dist/lib/otel-env.d.ts.map +1 -0
- package/dist/lib/otel-env.js +98 -0
- package/dist/lib/otel-env.js.map +1 -0
- package/dist/lib/project-config.d.ts +167 -0
- package/dist/lib/project-config.d.ts.map +1 -1
- package/dist/lib/project-config.js +321 -5
- package/dist/lib/project-config.js.map +1 -1
- package/dist/lib/projects-registry.d.ts +82 -0
- package/dist/lib/projects-registry.d.ts.map +1 -0
- package/dist/lib/projects-registry.js +145 -0
- package/dist/lib/projects-registry.js.map +1 -0
- package/dist/lib/projects-registry.test.d.ts +2 -0
- package/dist/lib/projects-registry.test.d.ts.map +1 -0
- package/dist/lib/projects-registry.test.js +176 -0
- package/dist/lib/projects-registry.test.js.map +1 -0
- package/dist/lib/repo-guard-scope.d.ts +126 -0
- package/dist/lib/repo-guard-scope.d.ts.map +1 -0
- package/dist/lib/repo-guard-scope.js +249 -0
- package/dist/lib/repo-guard-scope.js.map +1 -0
- package/dist/lib/report-format.d.ts +132 -0
- package/dist/lib/report-format.d.ts.map +1 -0
- package/dist/lib/report-format.js +317 -0
- package/dist/lib/report-format.js.map +1 -0
- package/dist/lib/roster.d.ts +99 -0
- package/dist/lib/roster.d.ts.map +1 -0
- package/dist/lib/roster.js +336 -0
- package/dist/lib/roster.js.map +1 -0
- package/dist/lib/roster.test.d.ts +15 -0
- package/dist/lib/roster.test.d.ts.map +1 -0
- package/dist/lib/roster.test.js +299 -0
- package/dist/lib/roster.test.js.map +1 -0
- package/dist/lib/runtime/codex-adapter.d.ts.map +1 -1
- package/dist/lib/runtime/codex-adapter.js +5 -0
- package/dist/lib/runtime/codex-adapter.js.map +1 -1
- package/dist/lib/runtime/codex-config.d.ts +129 -0
- package/dist/lib/runtime/codex-config.d.ts.map +1 -1
- package/dist/lib/runtime/codex-config.js +225 -0
- package/dist/lib/runtime/codex-config.js.map +1 -1
- package/dist/lib/runtime/identity.d.ts +72 -0
- package/dist/lib/runtime/identity.d.ts.map +1 -0
- package/dist/lib/runtime/identity.js +128 -0
- package/dist/lib/runtime/identity.js.map +1 -0
- package/dist/lib/standards.d.ts +99 -0
- package/dist/lib/standards.d.ts.map +1 -0
- package/dist/lib/standards.js +201 -0
- package/dist/lib/standards.js.map +1 -0
- package/dist/lib/team-identity.d.ts +134 -0
- package/dist/lib/team-identity.d.ts.map +1 -0
- package/dist/lib/team-identity.js +193 -0
- package/dist/lib/team-identity.js.map +1 -0
- package/dist/lib/templates.d.ts +29 -2
- package/dist/lib/templates.d.ts.map +1 -1
- package/dist/lib/templates.js +1042 -82
- package/dist/lib/templates.js.map +1 -1
- package/dist/lib/terminal-ui.d.ts.map +1 -1
- package/dist/lib/terminal-ui.js +12 -1
- package/dist/lib/terminal-ui.js.map +1 -1
- package/dist/lib/test-project.d.ts +95 -0
- package/dist/lib/test-project.d.ts.map +1 -0
- package/dist/lib/test-project.js +103 -0
- package/dist/lib/test-project.js.map +1 -0
- package/dist/lib/vault.d.ts +60 -0
- package/dist/lib/vault.d.ts.map +1 -0
- package/dist/lib/vault.js +102 -0
- package/dist/lib/vault.js.map +1 -0
- package/dist/lib/vault.test.d.ts +17 -0
- package/dist/lib/vault.test.d.ts.map +1 -0
- package/dist/lib/vault.test.js +169 -0
- package/dist/lib/vault.test.js.map +1 -0
- package/dist/lib/window-view.d.ts +63 -0
- package/dist/lib/window-view.d.ts.map +1 -0
- package/dist/lib/window-view.js +217 -0
- package/dist/lib/window-view.js.map +1 -0
- package/dist/lib/window-view.test.d.ts +2 -0
- package/dist/lib/window-view.test.d.ts.map +1 -0
- package/dist/lib/window-view.test.js +168 -0
- package/dist/lib/window-view.test.js.map +1 -0
- package/dist/lib/worktree-sync.d.ts +439 -0
- package/dist/lib/worktree-sync.d.ts.map +1 -0
- package/dist/lib/worktree-sync.js +1167 -0
- package/dist/lib/worktree-sync.js.map +1 -0
- package/dist/lib/worktree.d.ts +58 -1
- package/dist/lib/worktree.d.ts.map +1 -1
- package/dist/lib/worktree.js +91 -4
- package/dist/lib/worktree.js.map +1 -1
- package/dist/standards/decision-request.md +98 -0
- package/dist/standards/fail-loud-standard.md +495 -0
- package/dist/standards/po-communication-standard.md +126 -0
- package/dist/standards/report-format.md +128 -0
- package/dist/standards/writing-standard.md +382 -0
- package/package.json +3 -2
- package/scripts/generate-claude.mjs +119 -46
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* identity.ts — the one place a session says who it belongs to.
|
|
3
|
+
*
|
|
4
|
+
* WHY THIS EXISTS. Two adapters were building the same environment block by hand
|
|
5
|
+
* (`lib/claude.ts` and `runtime/codex-adapter.ts`), and a third consumer is coming:
|
|
6
|
+
* telemetry that has to attribute token spend to a team. Three hand-written copies
|
|
7
|
+
* of the same names drift, and a drifted name does not fail loudly — it produces
|
|
8
|
+
* telemetry that looks correct in every log and joins to nothing.
|
|
9
|
+
*
|
|
10
|
+
* THE VALUES ARE NOT FREE CHOICES. `mx-agent sync` posts `team` as the team SLUG
|
|
11
|
+
* and `worktree` as the worktree DIRECTORY NAME (commands/sync.ts), and the
|
|
12
|
+
* observability `sessions` table is keyed on exactly those. An identity block that
|
|
13
|
+
* sent a worktree PATH instead would be indistinguishable from a correct one until
|
|
14
|
+
* someone noticed every join returning zero rows. The tests pin this.
|
|
15
|
+
*
|
|
16
|
+
* HEADER-SAFE BY CONSTRUCTION. These values are destined for HTTP headers — Claude
|
|
17
|
+
* Code carries them via ANTHROPIC_CUSTOM_HEADERS, Codex via a `model_providers`
|
|
18
|
+
* block's `env_http_headers` (probed on codex-cli 0.145.0, 2026-09-02: the map's
|
|
19
|
+
* values are ENV VAR NAMES, resolved per request; see IDENTITY_HTTP_HEADERS below).
|
|
20
|
+
* A branch name is attacker-influenceable (anyone who can push a branch picks the
|
|
21
|
+
* string), so a value carrying CR or LF would be header injection with a git push as
|
|
22
|
+
* the delivery mechanism. Sanitising at the source rather than at each call site means
|
|
23
|
+
* a future consumer cannot forget.
|
|
24
|
+
*
|
|
25
|
+
* WHY THERE IS NO MX_SESSION_ID HERE. The `sessions` table keys on Claude's own
|
|
26
|
+
* session UUID, which this process does not know at launch. `claude --session-id`
|
|
27
|
+
* can pin one, but that changes the argv of every Claude launch, and Design
|
|
28
|
+
* Principle 1 (runtime/types.ts) forbids regressing that path — an unrecognised
|
|
29
|
+
* flag on an older binary would break every start. Exporting a session id we made
|
|
30
|
+
* up would be worse than exporting none: it would join to nothing while looking
|
|
31
|
+
* authoritative. Deliberately absent until session pinning is a decision of its own.
|
|
32
|
+
*/
|
|
33
|
+
import { hostname } from 'os';
|
|
34
|
+
/** Longest value we will emit. Generous for a branch name, short of any header limit. */
|
|
35
|
+
export const MAX_IDENTITY_VALUE = 256;
|
|
36
|
+
/**
|
|
37
|
+
* Reduce a value to something safe to put in an HTTP header field value.
|
|
38
|
+
*
|
|
39
|
+
* RFC 9110 field values admit visible ASCII, space and horizontal tab. Everything
|
|
40
|
+
* else — CR, LF, NUL, control characters, non-ASCII — is dropped rather than
|
|
41
|
+
* escaped, because there is no value here whose meaning depends on those bytes and
|
|
42
|
+
* dropping cannot produce a second header. Over-long values are truncated.
|
|
43
|
+
*
|
|
44
|
+
* Returns '' for anything that reduces to nothing, and callers omit empty values
|
|
45
|
+
* entirely rather than emitting a blank one.
|
|
46
|
+
*/
|
|
47
|
+
export function sanitizeIdentityValue(raw) {
|
|
48
|
+
if (typeof raw !== 'string')
|
|
49
|
+
return '';
|
|
50
|
+
let out = '';
|
|
51
|
+
for (const ch of raw) {
|
|
52
|
+
const code = ch.codePointAt(0);
|
|
53
|
+
// Visible ASCII (0x21-0x7E), plus space and tab.
|
|
54
|
+
const printable = (code >= 0x21 && code <= 0x7e) || code === 0x20 || code === 0x09;
|
|
55
|
+
if (printable)
|
|
56
|
+
out += ch;
|
|
57
|
+
if (out.length >= MAX_IDENTITY_VALUE)
|
|
58
|
+
break;
|
|
59
|
+
}
|
|
60
|
+
return out.trim();
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Build the identity for a launch.
|
|
64
|
+
*
|
|
65
|
+
* `machine` is injectable so tests do not depend on the host they run on; nothing
|
|
66
|
+
* in production passes it.
|
|
67
|
+
*/
|
|
68
|
+
export function sessionIdentity(ctx, opts = {}) {
|
|
69
|
+
return {
|
|
70
|
+
team: sanitizeIdentityValue(ctx.teamName),
|
|
71
|
+
worktree: sanitizeIdentityValue(ctx.worktreeName),
|
|
72
|
+
machine: sanitizeIdentityValue(opts.machine ?? hostname()),
|
|
73
|
+
branch: sanitizeIdentityValue(ctx.branch),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* The environment block both runtimes export.
|
|
78
|
+
*
|
|
79
|
+
* Empty values are omitted rather than exported blank: an absent variable reads as
|
|
80
|
+
* "not known here", while `MX_TEAM=''` reads as a team whose name is the empty
|
|
81
|
+
* string, and only one of those is true.
|
|
82
|
+
*/
|
|
83
|
+
export function identityEnv(id) {
|
|
84
|
+
const env = {};
|
|
85
|
+
if (id.team)
|
|
86
|
+
env.MX_TEAM = id.team;
|
|
87
|
+
if (id.worktree)
|
|
88
|
+
env.MX_WORKTREE = id.worktree;
|
|
89
|
+
if (id.machine)
|
|
90
|
+
env.MX_MACHINE = id.machine;
|
|
91
|
+
if (id.branch)
|
|
92
|
+
env.MX_BRANCH = id.branch;
|
|
93
|
+
return env;
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Identity as HTTP headers: header name -> the ENVIRONMENT VARIABLE NAME holding its value.
|
|
97
|
+
*
|
|
98
|
+
* THE VALUES ARE VARIABLE NAMES, NOT VALUES. That is what Codex's
|
|
99
|
+
* `model_providers.<id>.env_http_headers` map means, established by probe rather than
|
|
100
|
+
* documentation (codex-cli 0.145.0, 2026-09-02, isolated CODEX_HOME, request captured on a
|
|
101
|
+
* loopback listener): `env_http_headers = { "X-MX-Team" = "MX_TEAM" }` with `MX_TEAM=gateway`
|
|
102
|
+
* put `x-mx-team: gateway` on the wire. The sibling key `http_headers` takes LITERAL values.
|
|
103
|
+
* Both keys exist on 0.145.0; `headers` and `env_headers` do not and are silently ignored.
|
|
104
|
+
*
|
|
105
|
+
* WHY THE VARIABLE NAMES ARE NOT WRITTEN OUT AT THE CALL SITE. `identityEnv` above decides
|
|
106
|
+
* what a session exports. A header map that named a variable `identityEnv` does not export
|
|
107
|
+
* would omit that header on every request, silently, and the telemetry would look correct in
|
|
108
|
+
* every log while joining to nothing, the failure the top of this file exists to prevent.
|
|
109
|
+
* The tests assert these values equal the keys `identityEnv` produces.
|
|
110
|
+
*
|
|
111
|
+
* ABSENT AND EMPTY BOTH OMIT THE HEADER (same probe). A named variable that is unset, or set
|
|
112
|
+
* to the empty string, produced NO header rather than a blank one, which is the same rule
|
|
113
|
+
* `identityEnv` follows for the environment.
|
|
114
|
+
*
|
|
115
|
+
* These four values are not secrets: a team slug, a worktree directory name, a host name and
|
|
116
|
+
* a branch name. Nothing here authenticates anything.
|
|
117
|
+
*/
|
|
118
|
+
export const IDENTITY_HTTP_HEADERS = Object.freeze({
|
|
119
|
+
'X-MX-Team': 'MX_TEAM',
|
|
120
|
+
'X-MX-Worktree': 'MX_WORKTREE',
|
|
121
|
+
'X-MX-Machine': 'MX_MACHINE',
|
|
122
|
+
'X-MX-Branch': 'MX_BRANCH',
|
|
123
|
+
});
|
|
124
|
+
/** Convenience for the launch path: identity and its environment in one step. */
|
|
125
|
+
export function launchIdentityEnv(ctx, opts = {}) {
|
|
126
|
+
return identityEnv(sessionIdentity(ctx, opts));
|
|
127
|
+
}
|
|
128
|
+
//# sourceMappingURL=identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{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IAC7C,MAAM,GAAG,GAA2B,EAAE,CAAC;IACvC,IAAI,EAAE,CAAC,IAAI;QAAE,GAAG,CAAC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC;IACnC,IAAI,EAAE,CAAC,QAAQ;QAAE,GAAG,CAAC,WAAW,GAAG,EAAE,CAAC,QAAQ,CAAC;IAC/C,IAAI,EAAE,CAAC,OAAO;QAAE,GAAG,CAAC,UAAU,GAAG,EAAE,CAAC,OAAO,CAAC;IAC5C,IAAI,EAAE,CAAC,MAAM;QAAE,GAAG,CAAC,SAAS,GAAG,EAAE,CAAC,MAAM,CAAC;IACzC,OAAO,GAAG,CAAC;AACb,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAqC,MAAM,CAAC,MAAM,CAAC;IACnF,WAAW,EAAE,SAAS;IACtB,eAAe,EAAE,aAAa;IAC9B,cAAc,EAAE,YAAY;IAC5B,aAAa,EAAE,WAAW;CAC3B,CAAC,CAAC;AAEH,iFAAiF;AACjF,MAAM,UAAU,iBAAiB,CAC/B,GAAgE,EAChE,OAA6B,EAAE;IAE/B,OAAO,WAAW,CAAC,eAAe,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC,CAAC;AACjD,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* standards.ts — read the framework's writing standard and report format, and
|
|
3
|
+
* render them for injection into every conversation turn.
|
|
4
|
+
*
|
|
5
|
+
* PROBLEM. The style rules this project runs on existed in one person's memory
|
|
6
|
+
* and in corrections made during conversation. Every new agent rediscovered
|
|
7
|
+
* them by being corrected, and the corrections cost a turn each. The report
|
|
8
|
+
* format did not exist at all, so 25 of 28 moments where an agent needed a
|
|
9
|
+
* decision went out as prose into a channel nobody reads
|
|
10
|
+
* (`docs/fleet-behavior-from-transcripts.md` finding 3c).
|
|
11
|
+
*
|
|
12
|
+
* WHY INJECTION RATHER THAN A FILE. `product/mx-agent-prd.md:268` records the
|
|
13
|
+
* pattern this repository already measured: when we built a mechanism, teams
|
|
14
|
+
* followed the practice, and when we only wrote a rule, they stopped. The
|
|
15
|
+
* correction-of-errors requirement lived in process documents as an
|
|
16
|
+
* instruction, and 16 required records were never filed. A standard read once
|
|
17
|
+
* at session start is that same shape. So these two documents go into
|
|
18
|
+
* `CLAUDE.local.md`, which the runtime re-reads on every turn.
|
|
19
|
+
*
|
|
20
|
+
* THE BLOCKS ARE MARKED, NOT WHOLE FILES. Each standard carries the same
|
|
21
|
+
* `<!-- behavioral-start -->` markers a roleguide uses, and only the marked
|
|
22
|
+
* block is injected. That is deliberate reuse: `extractMarkerBlock` already
|
|
23
|
+
* enforces exactly one marker pair, a non-empty block, a byte ceiling, and no
|
|
24
|
+
* control characters, and every one of those failures is a real way to poison
|
|
25
|
+
* per-turn context. It also means the documents can hold worked examples and
|
|
26
|
+
* git history without paying for them on every turn.
|
|
27
|
+
*
|
|
28
|
+
* FAILURE MODEL — loud, named, FAIL-OPEN. A standard that cannot be read is a
|
|
29
|
+
* real degradation and is not a reason to refuse a session. It is the same tier
|
|
30
|
+
* as the behavioral block in `claude.ts`: warn once, name the file and the
|
|
31
|
+
* problem, continue. The fail-closed control for this pair is
|
|
32
|
+
* `mx-agent report check`, which refuses a report rather than a session.
|
|
33
|
+
*/
|
|
34
|
+
/**
|
|
35
|
+
* Files read from the standards directory, in the order they are injected.
|
|
36
|
+
*
|
|
37
|
+
* `po-communication-standard.md` is first because it overrides the writing
|
|
38
|
+
* standard and the report format for messages addressed to the product owner,
|
|
39
|
+
* and a reader has to meet the override before the rules it overrides.
|
|
40
|
+
*/
|
|
41
|
+
export declare const INJECTED_STANDARDS: readonly [{
|
|
42
|
+
readonly file: "po-communication-standard.md";
|
|
43
|
+
readonly title: "How to talk to the product owner";
|
|
44
|
+
}, {
|
|
45
|
+
readonly file: "writing-standard.md";
|
|
46
|
+
readonly title: "Writing standard";
|
|
47
|
+
}, {
|
|
48
|
+
readonly file: "report-format.md";
|
|
49
|
+
readonly title: "Report format";
|
|
50
|
+
}, {
|
|
51
|
+
readonly file: "decision-request.md";
|
|
52
|
+
readonly title: "Decision request";
|
|
53
|
+
}];
|
|
54
|
+
/** Bytes the rendered block may reach before it is dropped rather than injected. */
|
|
55
|
+
export declare const MAX_STANDARDS_BLOCK_BYTES: number;
|
|
56
|
+
/**
|
|
57
|
+
* Resolve the directory holding the shipped standards.
|
|
58
|
+
*
|
|
59
|
+
* Order, mirroring `bundled-config.ts`:
|
|
60
|
+
* 1. `MX_STANDARDS_DIR` — test seam and power-user override
|
|
61
|
+
* 2. `<cliDist>/standards/` — the copy bundled into the package
|
|
62
|
+
* 3. `<repoRoot>/mx-agent-system/standards/` — dev and monorepo fallback
|
|
63
|
+
*
|
|
64
|
+
* TRUST BOUNDARY. Whatever the override points at is injected verbatim into
|
|
65
|
+
* every turn of every team. Set it only to a directory you control.
|
|
66
|
+
*/
|
|
67
|
+
export declare function getStandardsDir(): string | null;
|
|
68
|
+
export type StandardProblem = 'dir-missing' | 'file-missing' | 'file-unreadable' | 'markers-missing' | 'markers-repeated' | 'markers-inverted' | 'content-empty' | 'content-too-large' | 'content-control-characters';
|
|
69
|
+
export interface StandardBlock {
|
|
70
|
+
file: string;
|
|
71
|
+
title: string;
|
|
72
|
+
ok: boolean;
|
|
73
|
+
content: string | null;
|
|
74
|
+
problem: StandardProblem | null;
|
|
75
|
+
detail: string | null;
|
|
76
|
+
}
|
|
77
|
+
export interface StandardsResolution {
|
|
78
|
+
/** Directory the blocks were read from, or null when none was found. */
|
|
79
|
+
dir: string | null;
|
|
80
|
+
blocks: StandardBlock[];
|
|
81
|
+
/** Text to insert into CLAUDE.local.md. Empty when nothing could be read. */
|
|
82
|
+
rendered: string;
|
|
83
|
+
/** True when every configured standard produced a block. */
|
|
84
|
+
complete: boolean;
|
|
85
|
+
/** One line per degradation, for the caller to log. Empty on the good path. */
|
|
86
|
+
warnings: string[];
|
|
87
|
+
}
|
|
88
|
+
/** Read one standard and extract its marked block. Never throws. */
|
|
89
|
+
export declare function readStandardBlock(dir: string, file: string, title: string): StandardBlock;
|
|
90
|
+
/**
|
|
91
|
+
* Read every shipped standard and render the injectable text.
|
|
92
|
+
*
|
|
93
|
+
* A partial result is still injected. One readable standard reaching every turn
|
|
94
|
+
* beats nothing reaching any turn, and the missing one is named in `warnings`.
|
|
95
|
+
*/
|
|
96
|
+
export declare function resolveStandards(dirOverride?: string): StandardsResolution;
|
|
97
|
+
/** Compose the blocks into the text written into CLAUDE.local.md. */
|
|
98
|
+
export declare function renderStandards(blocks: StandardBlock[]): string;
|
|
99
|
+
//# sourceMappingURL=standards.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standards.d.ts","sourceRoot":"","sources":["../../src/lib/standards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAOH;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB;;;;;;;;;;;;EAKrB,CAAC;AAEX,oFAAoF;AACpF,eAAO,MAAM,yBAAyB,QAAY,CAAC;AAEnD;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,IAAI,MAAM,GAAG,IAAI,CAiB/C;AAED,MAAM,MAAM,eAAe,GACvB,aAAa,GACb,cAAc,GACd,iBAAiB,GACjB,iBAAiB,GACjB,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,mBAAmB,GACnB,4BAA4B,CAAC;AAEjC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,OAAO,CAAC;IACZ,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,OAAO,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;CACvB;AAED,MAAM,WAAW,mBAAmB;IAClC,wEAAwE;IACxE,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,6EAA6E;IAC7E,QAAQ,EAAE,MAAM,CAAC;IACjB,4DAA4D;IAC5D,QAAQ,EAAE,OAAO,CAAC;IAClB,+EAA+E;IAC/E,QAAQ,EAAE,MAAM,EAAE,CAAC;CACpB;AAED,oEAAoE;AACpE,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,aAAa,CAqCzF;AAED;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,mBAAmB,CA4D1E;AAED,qEAAqE;AACrE,wBAAgB,eAAe,CAAC,MAAM,EAAE,aAAa,EAAE,GAAG,MAAM,CAc/D"}
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* standards.ts — read the framework's writing standard and report format, and
|
|
3
|
+
* render them for injection into every conversation turn.
|
|
4
|
+
*
|
|
5
|
+
* PROBLEM. The style rules this project runs on existed in one person's memory
|
|
6
|
+
* and in corrections made during conversation. Every new agent rediscovered
|
|
7
|
+
* them by being corrected, and the corrections cost a turn each. The report
|
|
8
|
+
* format did not exist at all, so 25 of 28 moments where an agent needed a
|
|
9
|
+
* decision went out as prose into a channel nobody reads
|
|
10
|
+
* (`docs/fleet-behavior-from-transcripts.md` finding 3c).
|
|
11
|
+
*
|
|
12
|
+
* WHY INJECTION RATHER THAN A FILE. `product/mx-agent-prd.md:268` records the
|
|
13
|
+
* pattern this repository already measured: when we built a mechanism, teams
|
|
14
|
+
* followed the practice, and when we only wrote a rule, they stopped. The
|
|
15
|
+
* correction-of-errors requirement lived in process documents as an
|
|
16
|
+
* instruction, and 16 required records were never filed. A standard read once
|
|
17
|
+
* at session start is that same shape. So these two documents go into
|
|
18
|
+
* `CLAUDE.local.md`, which the runtime re-reads on every turn.
|
|
19
|
+
*
|
|
20
|
+
* THE BLOCKS ARE MARKED, NOT WHOLE FILES. Each standard carries the same
|
|
21
|
+
* `<!-- behavioral-start -->` markers a roleguide uses, and only the marked
|
|
22
|
+
* block is injected. That is deliberate reuse: `extractMarkerBlock` already
|
|
23
|
+
* enforces exactly one marker pair, a non-empty block, a byte ceiling, and no
|
|
24
|
+
* control characters, and every one of those failures is a real way to poison
|
|
25
|
+
* per-turn context. It also means the documents can hold worked examples and
|
|
26
|
+
* git history without paying for them on every turn.
|
|
27
|
+
*
|
|
28
|
+
* FAILURE MODEL — loud, named, FAIL-OPEN. A standard that cannot be read is a
|
|
29
|
+
* real degradation and is not a reason to refuse a session. It is the same tier
|
|
30
|
+
* as the behavioral block in `claude.ts`: warn once, name the file and the
|
|
31
|
+
* problem, continue. The fail-closed control for this pair is
|
|
32
|
+
* `mx-agent report check`, which refuses a report rather than a session.
|
|
33
|
+
*/
|
|
34
|
+
import { existsSync, readFileSync, statSync } from 'fs';
|
|
35
|
+
import { dirname, join } from 'path';
|
|
36
|
+
import { fileURLToPath } from 'url';
|
|
37
|
+
import { extractMarkerBlock, sanitizeForMessage } from './behavioral-injection.js';
|
|
38
|
+
/**
|
|
39
|
+
* Files read from the standards directory, in the order they are injected.
|
|
40
|
+
*
|
|
41
|
+
* `po-communication-standard.md` is first because it overrides the writing
|
|
42
|
+
* standard and the report format for messages addressed to the product owner,
|
|
43
|
+
* and a reader has to meet the override before the rules it overrides.
|
|
44
|
+
*/
|
|
45
|
+
export const INJECTED_STANDARDS = [
|
|
46
|
+
{ file: 'po-communication-standard.md', title: 'How to talk to the product owner' },
|
|
47
|
+
{ file: 'writing-standard.md', title: 'Writing standard' },
|
|
48
|
+
{ file: 'report-format.md', title: 'Report format' },
|
|
49
|
+
{ file: 'decision-request.md', title: 'Decision request' },
|
|
50
|
+
];
|
|
51
|
+
/** Bytes the rendered block may reach before it is dropped rather than injected. */
|
|
52
|
+
export const MAX_STANDARDS_BLOCK_BYTES = 16 * 1024;
|
|
53
|
+
/**
|
|
54
|
+
* Resolve the directory holding the shipped standards.
|
|
55
|
+
*
|
|
56
|
+
* Order, mirroring `bundled-config.ts`:
|
|
57
|
+
* 1. `MX_STANDARDS_DIR` — test seam and power-user override
|
|
58
|
+
* 2. `<cliDist>/standards/` — the copy bundled into the package
|
|
59
|
+
* 3. `<repoRoot>/mx-agent-system/standards/` — dev and monorepo fallback
|
|
60
|
+
*
|
|
61
|
+
* TRUST BOUNDARY. Whatever the override points at is injected verbatim into
|
|
62
|
+
* every turn of every team. Set it only to a directory you control.
|
|
63
|
+
*/
|
|
64
|
+
export function getStandardsDir() {
|
|
65
|
+
const override = process.env.MX_STANDARDS_DIR;
|
|
66
|
+
if (override && existsSync(join(override, INJECTED_STANDARDS[0].file)))
|
|
67
|
+
return override;
|
|
68
|
+
const here = dirname(fileURLToPath(import.meta.url)); // dist/lib or src/lib
|
|
69
|
+
const bundled = join(here, '..', 'standards');
|
|
70
|
+
if (existsSync(join(bundled, INJECTED_STANDARDS[0].file)))
|
|
71
|
+
return bundled;
|
|
72
|
+
let dir = here;
|
|
73
|
+
for (let i = 0; i < 20; i += 1) {
|
|
74
|
+
const guess = join(dir, 'mx-agent-system', 'standards');
|
|
75
|
+
if (existsSync(join(guess, INJECTED_STANDARDS[0].file)))
|
|
76
|
+
return guess;
|
|
77
|
+
const parent = dirname(dir);
|
|
78
|
+
if (parent === dir)
|
|
79
|
+
break;
|
|
80
|
+
dir = parent;
|
|
81
|
+
}
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
84
|
+
/** Read one standard and extract its marked block. Never throws. */
|
|
85
|
+
export function readStandardBlock(dir, file, title) {
|
|
86
|
+
const path = join(dir, file);
|
|
87
|
+
const base = { file, title };
|
|
88
|
+
let raw;
|
|
89
|
+
try {
|
|
90
|
+
const stat = statSync(path);
|
|
91
|
+
if (!stat.isFile()) {
|
|
92
|
+
return {
|
|
93
|
+
...base, ok: false, content: null, problem: 'file-missing',
|
|
94
|
+
detail: `${sanitizeForMessage(path)} is not a regular file`,
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
raw = readFileSync(path, 'utf-8');
|
|
98
|
+
}
|
|
99
|
+
catch (err) {
|
|
100
|
+
const code = err?.code;
|
|
101
|
+
return {
|
|
102
|
+
...base, ok: false,
|
|
103
|
+
content: null,
|
|
104
|
+
problem: code === 'ENOENT' ? 'file-missing' : 'file-unreadable',
|
|
105
|
+
detail: `${sanitizeForMessage(path)} could not be read (${sanitizeForMessage(code ?? 'unknown')})`,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
// Reuse the roleguide extractor rather than writing a second marker parser.
|
|
109
|
+
// It already refuses repeated, nested and inverted markers, an empty block,
|
|
110
|
+
// an oversize block and control characters, and each of those is a real way
|
|
111
|
+
// to corrupt per-turn context.
|
|
112
|
+
const result = extractMarkerBlock(raw, `${file}`);
|
|
113
|
+
if (!result.ok || !result.content) {
|
|
114
|
+
return {
|
|
115
|
+
...base, ok: false, content: null,
|
|
116
|
+
problem: result.problem ?? 'content-empty',
|
|
117
|
+
detail: result.detail,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
return { ...base, ok: true, content: result.content, problem: null, detail: null };
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Read every shipped standard and render the injectable text.
|
|
124
|
+
*
|
|
125
|
+
* A partial result is still injected. One readable standard reaching every turn
|
|
126
|
+
* beats nothing reaching any turn, and the missing one is named in `warnings`.
|
|
127
|
+
*/
|
|
128
|
+
export function resolveStandards(dirOverride) {
|
|
129
|
+
const dir = dirOverride ?? getStandardsDir();
|
|
130
|
+
if (!dir) {
|
|
131
|
+
return {
|
|
132
|
+
dir: null,
|
|
133
|
+
blocks: [],
|
|
134
|
+
rendered: '',
|
|
135
|
+
complete: false,
|
|
136
|
+
warnings: [
|
|
137
|
+
'Writing standard and report format NOT injected: no standards directory was found. ' +
|
|
138
|
+
'This team writes with no per-turn style or report contract. ' +
|
|
139
|
+
'Fix: set MX_STANDARDS_DIR, or run from a checkout containing ' +
|
|
140
|
+
'mx-agent-system/standards/.',
|
|
141
|
+
],
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
const blocks = INJECTED_STANDARDS.map((s) => readStandardBlock(dir, s.file, s.title));
|
|
145
|
+
const warnings = [];
|
|
146
|
+
for (const block of blocks) {
|
|
147
|
+
if (block.ok)
|
|
148
|
+
continue;
|
|
149
|
+
warnings.push(`Standard "${sanitizeForMessage(block.file)}" NOT injected (${block.problem}): ` +
|
|
150
|
+
`${sanitizeForMessage(block.detail ?? 'no detail')}. This team writes without it on ` +
|
|
151
|
+
`every turn. Fix: restore the ${sanitizeForMessage(block.file)} marker block in ` +
|
|
152
|
+
`${sanitizeForMessage(dir)}.`);
|
|
153
|
+
}
|
|
154
|
+
const usable = blocks.filter((b) => b.ok && b.content);
|
|
155
|
+
const rendered = usable.length === 0 ? '' : renderStandards(usable);
|
|
156
|
+
// The ceiling is separate from the per-file one because what costs the team is
|
|
157
|
+
// the total re-sent on every turn, and two blocks under the file limit can be
|
|
158
|
+
// over it together.
|
|
159
|
+
const bytes = Buffer.byteLength(rendered, 'utf-8');
|
|
160
|
+
if (bytes > MAX_STANDARDS_BLOCK_BYTES) {
|
|
161
|
+
return {
|
|
162
|
+
dir,
|
|
163
|
+
blocks,
|
|
164
|
+
rendered: '',
|
|
165
|
+
complete: false,
|
|
166
|
+
warnings: [
|
|
167
|
+
...warnings,
|
|
168
|
+
`Writing standard and report format NOT injected: the rendered block is ` +
|
|
169
|
+
`${Math.round(bytes / 1024)} KiB, over the ${MAX_STANDARDS_BLOCK_BYTES / 1024} KiB ` +
|
|
170
|
+
`limit. This text is re-sent on EVERY conversation turn, so an oversize block ` +
|
|
171
|
+
`evicts the team's working context. Fix: shorten the marked blocks in ` +
|
|
172
|
+
`${sanitizeForMessage(dir)}.`,
|
|
173
|
+
],
|
|
174
|
+
};
|
|
175
|
+
}
|
|
176
|
+
return {
|
|
177
|
+
dir,
|
|
178
|
+
blocks,
|
|
179
|
+
rendered,
|
|
180
|
+
complete: usable.length === INJECTED_STANDARDS.length,
|
|
181
|
+
warnings,
|
|
182
|
+
};
|
|
183
|
+
}
|
|
184
|
+
/** Compose the blocks into the text written into CLAUDE.local.md. */
|
|
185
|
+
export function renderStandards(blocks) {
|
|
186
|
+
const parts = [
|
|
187
|
+
'# Framework standards (every-turn reinforcement)',
|
|
188
|
+
'',
|
|
189
|
+
'> Pinned here so they re-inject on every conversation turn. The full standards, with' +
|
|
190
|
+
' worked before-and-after corrections, are in `mx-agent-system/standards/`.',
|
|
191
|
+
'',
|
|
192
|
+
];
|
|
193
|
+
for (const block of blocks) {
|
|
194
|
+
if (!block.ok || !block.content)
|
|
195
|
+
continue;
|
|
196
|
+
parts.push(`## ${block.title}`, '', block.content, '');
|
|
197
|
+
}
|
|
198
|
+
parts.push('---', '');
|
|
199
|
+
return parts.join('\n');
|
|
200
|
+
}
|
|
201
|
+
//# sourceMappingURL=standards.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"standards.js","sourceRoot":"","sources":["../../src/lib/standards.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AAEH,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,QAAQ,EAAE,MAAM,IAAI,CAAC;AACxD,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACrC,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AACpC,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAEnF;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,IAAI,EAAE,8BAA8B,EAAE,KAAK,EAAE,kCAAkC,EAAE;IACnF,EAAE,IAAI,EAAE,qBAAqB,EAAE,KAAK,EAAE,kBAAkB,EAAE;IAC1D,EAAE,IAAI,EAAE,kBAAkB,EAAE,KAAK,EAAE,eAAe,EAAE;IACpD,E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AAE,SAAS;QAC1C,KAAK,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC;IACzD,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IACtB,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC"}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* team-identity -- which team `mx-agent start` resolves to, and whether that is
|
|
3
|
+
* the team the worktree records (#410).
|
|
4
|
+
*
|
|
5
|
+
* WHAT WENT WRONG. `start.ts` derived its team slug as
|
|
6
|
+
* `process.env.CLAUDE_TEAM_NAME || name`, so an inherited environment variable
|
|
7
|
+
* outranked the command's own positional argument. Every other identity in the
|
|
8
|
+
* command comes from that argument — the worktree (`start.ts:646`), the catalog
|
|
9
|
+
* entry and the roleguide (`start.ts:749-756`) — and only the every-turn
|
|
10
|
+
* behavioral block written into `CLAUDE.local.md` came from the variable. A
|
|
11
|
+
* session started for one team could therefore be given another team's block,
|
|
12
|
+
* with no refusal and no diagnostic. `CLAUDE_TEAM_NAME` is exported into every
|
|
13
|
+
* spawned session (`lib/agent-session.ts:286`, `lib/claude.ts:1716`), so a
|
|
14
|
+
* leader running `mx-agent start <other-team>` reproduces it without anyone
|
|
15
|
+
* setting a variable by hand.
|
|
16
|
+
*
|
|
17
|
+
* THE RULE IS HERE AND NOWHERE ELSE. `start.ts` holds no precedence expression
|
|
18
|
+
* of its own; it calls `checkStartTeamIdentity` and uses what comes back. The
|
|
19
|
+
* completion check's row 8 (`commands/create.ts`) calls the same function. One
|
|
20
|
+
* rule, two readers: the row cannot report a precedence the command does not
|
|
21
|
+
* apply, which is what lets the row report the failing value against the pre-fix
|
|
22
|
+
* rule rather than only once the fix is in (#428 criterion 6).
|
|
23
|
+
*
|
|
24
|
+
* IT WARNS; IT DOES NOT REFUSE. Per #4123's tiering — recorded at
|
|
25
|
+
* `lib/claude.ts:860-862` and quoted in #428 — the fail-CLOSED tier is reserved
|
|
26
|
+
* for the hooks / settings.json / agent-config security subclass, and this is
|
|
27
|
+
* not that. Every warning carries a code, so a degraded start is machine-visible
|
|
28
|
+
* in the structured startup report rather than living only in a scrollback.
|
|
29
|
+
* Whether a mismatch should refuse is a product-owner decision, not this
|
|
30
|
+
* module's.
|
|
31
|
+
*
|
|
32
|
+
* NOTHING HERE THROWS AND NOTHING HERE WRITES. Both functions are pure given
|
|
33
|
+
* their inputs plus one read of `.mx-code-context.json`, which
|
|
34
|
+
* `readCodeContextValues` already performs without throwing.
|
|
35
|
+
*/
|
|
36
|
+
/** The environment variable the pre-fix rule let outrank the argument. */
|
|
37
|
+
export declare const TEAM_NAME_ENV = "CLAUDE_TEAM_NAME";
|
|
38
|
+
/** Which input the resolved slug came from. `none` means neither was given. */
|
|
39
|
+
export type TeamSlugSource = 'argument' | 'environment' | 'none';
|
|
40
|
+
export interface StartTeamSlugResolution {
|
|
41
|
+
/** The team whose behavioral block a start would write. Empty when neither input held one. */
|
|
42
|
+
slug: string;
|
|
43
|
+
source: TeamSlugSource;
|
|
44
|
+
/** `CLAUDE_TEAM_NAME` as read, or null when it is unset or empty. */
|
|
45
|
+
envSlug: string | null;
|
|
46
|
+
/** True when the environment named a team and the argument outranked it. */
|
|
47
|
+
envOverridden: boolean;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Resolve the team slug for a `start`: THE ARGUMENT WINS, and the environment
|
|
51
|
+
* variable is the fallback when no argument is given (#410 remedy 1, #428 part
|
|
52
|
+
* 1).
|
|
53
|
+
*
|
|
54
|
+
* An empty string reads as absent on both sides, which is what the pre-fix `||`
|
|
55
|
+
* expression did and what commander's `<name>` already guarantees for the
|
|
56
|
+
* argument on the command path. Neither value is trimmed or validated here: the
|
|
57
|
+
* slug goes on to `resolveBehavioralInjection`, which refuses an unsafe one and
|
|
58
|
+
* names it (`lib/behavioral-injection.ts:202`), and validating twice in two
|
|
59
|
+
* places is how the two come to disagree.
|
|
60
|
+
*/
|
|
61
|
+
export declare function resolveStartTeamSlug(argSlug: string | undefined, env?: NodeJS.ProcessEnv): StartTeamSlugResolution;
|
|
62
|
+
/**
|
|
63
|
+
* `match` when the resolved slug is the team the worktree records, `mismatch`
|
|
64
|
+
* when the two are known and differ, `unresolvable` when there is nothing to
|
|
65
|
+
* compare against.
|
|
66
|
+
*
|
|
67
|
+
* `unresolvable` is its own outcome and is never collapsed into either of the
|
|
68
|
+
* others, for the reason row 7 states about its own third value: a check that
|
|
69
|
+
* could not look is not a check that passed, and it is not a check that failed.
|
|
70
|
+
*/
|
|
71
|
+
export type StartIdentityVerdict = 'match' | 'mismatch' | 'unresolvable';
|
|
72
|
+
/** The three machine-visible codes a degraded start emits. */
|
|
73
|
+
export type StartIdentityWarningCode =
|
|
74
|
+
/** The environment named one team, the argument named another; the argument won. */
|
|
75
|
+
'start-team-env-ignored'
|
|
76
|
+
/** The resolved team is not the team `.mx-code-context.json` records. */
|
|
77
|
+
| 'start-team-worktree-mismatch'
|
|
78
|
+
/** There was a worktree to read and it recorded no readable team, so nothing was compared. */
|
|
79
|
+
| 'start-team-identity-unreadable';
|
|
80
|
+
export interface StartIdentityWarning {
|
|
81
|
+
message: string;
|
|
82
|
+
code: StartIdentityWarningCode;
|
|
83
|
+
}
|
|
84
|
+
export interface StartTeamIdentity {
|
|
85
|
+
resolution: StartTeamSlugResolution;
|
|
86
|
+
/** `team` from the worktree's `.mx-code-context.json`, or null when absent or unreadable. */
|
|
87
|
+
recorded: string | null;
|
|
88
|
+
verdict: StartIdentityVerdict;
|
|
89
|
+
/** Every warning to emit, in order. The caller logs them; nothing is printed here. */
|
|
90
|
+
warnings: StartIdentityWarning[];
|
|
91
|
+
}
|
|
92
|
+
export interface StartTeamIdentityOptions {
|
|
93
|
+
/** The positional team slug the command was given. */
|
|
94
|
+
argSlug: string | undefined;
|
|
95
|
+
/** The worktree whose `.mx-code-context.json` records the team, or null when there is none to read. */
|
|
96
|
+
worktreePath: string | null;
|
|
97
|
+
/** Defaults to this process's environment, which is the one a launched session inherits. */
|
|
98
|
+
env?: NodeJS.ProcessEnv;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* Resolve the team slug and compare it with the worktree's own recorded
|
|
102
|
+
* identity (#410 remedy 2, #428 part 2).
|
|
103
|
+
*
|
|
104
|
+
* THREE WARNINGS, NOT ONE, because the three states have different remedies and
|
|
105
|
+
* any can hold without the others. A start whose environment disagrees with
|
|
106
|
+
* its argument is now correct and still worth saying out loud: the operator
|
|
107
|
+
* asked for one team in a shell that names another, and until #410 that
|
|
108
|
+
* combination silently produced the other team's block. A resolved slug that
|
|
109
|
+
* disagrees with `.mx-code-context.json` is the state #410 observed on
|
|
110
|
+
* `creation-probe`, and it is reachable without any environment variable at all
|
|
111
|
+
* — a worktree provisioned for one team and started under another name.
|
|
112
|
+
*
|
|
113
|
+
* COULD-NOT-LOOK IS THE THIRD, and it has its own code because a check reduced
|
|
114
|
+
* to silence reads exactly like a check that agreed. There was a worktree to
|
|
115
|
+
* read and it recorded no team the reader could use: no file, a file that does
|
|
116
|
+
* not parse, a file holding no `team`, or a symlink, which
|
|
117
|
+
* `readCodeContextValues` declines to follow (`lib/code-context-file.ts:227-228`).
|
|
118
|
+
* All four return the same null, and all four mean the mismatch detector above
|
|
119
|
+
* never ran. Removing or corrupting one file must not buy the same output as a
|
|
120
|
+
* clean start. It warns and does not refuse, at the same tier as the other two.
|
|
121
|
+
*
|
|
122
|
+
* The code is emitted only when there WAS a worktree to read and something was
|
|
123
|
+
* resolved to compare. With no worktree path, and with an empty resolved slug,
|
|
124
|
+
* `unresolvable` is the caller's own doing rather than a degraded worktree, and
|
|
125
|
+
* the caller already knows which input it withheld.
|
|
126
|
+
*
|
|
127
|
+
* VALUES FROM DISK AND FROM THE ENVIRONMENT ARE SANITISED INTO THE MESSAGE.
|
|
128
|
+
* `.mx-code-context.json` is a file this repository writes but does not own at
|
|
129
|
+
* runtime (`lib/code-context-file.ts:175-186`), and `CLAUDE_TEAM_NAME` is
|
|
130
|
+
* whatever the parent shell exported; both reach a terminal through
|
|
131
|
+
* `logWarning`, which is the sink `sanitizeForMessage` exists for.
|
|
132
|
+
*/
|
|
133
|
+
export declare function checkStartTeamIdentity(opts: StartTeamIdentityOptions): StartTeamIdentity;
|
|
134
|
+
//# sourceMappingURL=team-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"team-identity.d.ts","sourceRoot":"","sources":["../../src/lib/team-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAKH,0EAA0E;AAC1E,eAAO,MAAM,aAAa,qBAAqB,CAAC;AAEhD,+EAA+E;AAC/E,MAAM,MAAM,cAAc,GAAG,UAAU,GAAG,aAAa,GAAG,MAAM,CAAC;AAEjE,MAAM,WAAW,uBAAuB;IACtC,8FAA8F;IAC9F,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,cAAc,CAAC;IACvB,qEAAqE;IACrE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,4EAA4E;IAC5E,aAAa,EAAE,OAAO,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,MAAM,GAAG,SAAS,EAC3B,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,uBAAuB,CAWzB;AAED;;;;;;;;GAQG;AACH,MAAM,MAAM,oBAAoB,GAAG,OAAO,GAAG,UAAU,GAAG,cAAc,CAAC;AAEzE,8DAA8D;AAC9D,MAAM,MAAM,wBAAwB;AAClC,oFAAoF;AAClF,wBAAwB;AAC1B,yEAAyE;GACvE,8BAA8B;AAChC,8FAA8F;GAC5F,gCAAgC,CAAC;AAErC,MAAM,WAAW,oBAAoB;IACnC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI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