@memnexus-ai/mx-agent-cli 0.1.294-next.0 → 0.1.295-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__/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 +35 -0
- 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 +227 -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 +1230 -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 +11 -11
- 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__/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__/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 +3095 -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__/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.js +23 -1
- package/dist/__tests__/standards-injection.test.js.map +1 -1
- 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 +279 -0
- package/dist/agent-config/hooks/auto-capture-session-end.sh +277 -0
- 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/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.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 +519 -25
- package/dist/commands/coordination.js.map +1 -1
- package/dist/commands/create.d.ts +913 -1
- package/dist/commands/create.d.ts.map +1 -1
- package/dist/commands/create.js +4879 -345
- package/dist/commands/create.js.map +1 -1
- 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/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/session.js +1 -1
- package/dist/commands/session.js.map +1 -1
- package/dist/commands/start.d.ts +38 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +171 -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/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 +122 -11
- package/dist/index.js.map +1 -1
- package/dist/lib/agent-session.d.ts.map +1 -1
- package/dist/lib/agent-session.js +6 -1
- package/dist/lib/agent-session.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 +53 -23
- package/dist/lib/claude.d.ts.map +1 -1
- package/dist/lib/claude.js +306 -17
- 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 +73 -0
- package/dist/lib/coordination-client.d.ts.map +1 -1
- package/dist/lib/coordination-client.js +180 -8
- package/dist/lib/coordination-client.js.map +1 -1
- package/dist/lib/coordination-token.d.ts +304 -6
- package/dist/lib/coordination-token.d.ts.map +1 -1
- package/dist/lib/coordination-token.js +851 -52
- package/dist/lib/coordination-token.js.map +1 -1
- 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/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/roster.d.ts +87 -0
- package/dist/lib/roster.d.ts.map +1 -0
- package/dist/lib/roster.js +332 -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 +10 -1
- package/dist/lib/standards.d.ts.map +1 -1
- package/dist/lib/standards.js +8 -1
- package/dist/lib/standards.js.map +1 -1
- 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/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 +8 -0
- package/dist/standards/po-communication-standard.md +126 -0
- package/dist/standards/report-format.md +8 -0
- package/dist/standards/writing-standard.md +146 -4
- package/package.json +1 -1
- package/scripts/generate-claude.mjs +119 -46
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
# reported back is NOT parking work, and is not challenged — see section 3, which
|
|
13
13
|
# also explains why that stand-down is bounded rather than open-ended.
|
|
14
14
|
#
|
|
15
|
+
# NOT IDLE (#109, #112). A session whose team declares `Interaction: interactive`
|
|
16
|
+
# on origin/main stops after every question it asks the product owner, and those
|
|
17
|
+
# stops are not parked work either — see section 3b. Bounded the same way, by a
|
|
18
|
+
# progress signal the model cannot author, with the same hard ceiling.
|
|
19
|
+
#
|
|
15
20
|
# POSITION. Registered in the Stop chain AFTER coordination-midsession-drain.sh.
|
|
16
21
|
# The drain hook may already emit a Stop-block this turn (queued P0-P2 messages);
|
|
17
22
|
# when it does we must NOT also block. The two hooks share a per-turn sentinel:
|
|
@@ -38,8 +43,8 @@
|
|
|
38
43
|
# baseline review. Same posture as git-mutation-guard (guardrail, not access
|
|
39
44
|
# control).
|
|
40
45
|
#
|
|
41
|
-
# ...but the bypasses must stay NAMED and LOGGED. The
|
|
42
|
-
#
|
|
46
|
+
# ...but the bypasses must stay NAMED and LOGGED. The stand-downs in sections 3
|
|
47
|
+
# and 3b are not silent ones: its evidence must be a harness-authored
|
|
43
48
|
# record shape (not prose the session wrote itself), and its bound cannot be
|
|
44
49
|
# extended past a hard ceiling by an env var. Both constraints were added after
|
|
45
50
|
# the security review of this change (SF-5) found the gate could be switched off
|
|
@@ -248,20 +253,29 @@ fi
|
|
|
248
253
|
#
|
|
249
254
|
# Fail direction is CHALLENGE: no transcript, unreadable, missing jq/awk, or an
|
|
250
255
|
# oversized file → skip this section entirely and behave exactly as before.
|
|
256
|
+
# ── 2b. The session's own transcript: path, symlink refusal, size cap. ───────
|
|
257
|
+
# Sections 3 and 3b both scan this file, so ONE place decides which file is read
|
|
258
|
+
# and how large a file this hook is willing to scan.
|
|
259
|
+
#
|
|
260
|
+
# The harness supplies the path on stdin as `.transcript_path` (established in
|
|
261
|
+
# production: delegation-audit.sh reads only that field). A path that is not a
|
|
262
|
+
# regular file is refused, and so is a symlink, which would send the read onto
|
|
263
|
+
# its target (CWE-59). The cap bounds the work inside a <=5s hook budget:
|
|
264
|
+
# typical transcripts here are 5-8MB and scan in ~0.1s, and anything beyond the
|
|
265
|
+
# cap is skipped rather than risking the budget. A skipped scan challenges,
|
|
266
|
+
# which is the safe direction for both sections.
|
|
267
|
+
TRANSCRIPT_PATH="$(printf '%s' "$INPUT" | jq -r '.transcript_path // empty' 2>/dev/null || echo '')"
|
|
268
|
+
TSIZE=0
|
|
269
|
+
if [ -n "$TRANSCRIPT_PATH" ] && [ -f "$TRANSCRIPT_PATH" ] && [ ! -L "$TRANSCRIPT_PATH" ]; then
|
|
270
|
+
TSIZE="$(stat -c %s "$TRANSCRIPT_PATH" 2>/dev/null || stat -f %z "$TRANSCRIPT_PATH" 2>/dev/null || echo 0)"
|
|
271
|
+
fi
|
|
272
|
+
MAX_SCAN_BYTES="${MX_IDLE_GATE_MAX_TRANSCRIPT_BYTES:-67108864}"
|
|
273
|
+
case "$TSIZE" in ''|*[!0-9]*) TSIZE=0 ;; esac
|
|
274
|
+
|
|
251
275
|
SUBAGENT_STATE="${STATE_DIR}/${WORKTREE_NAME}.subagents"
|
|
252
276
|
SUB_LIVE=0
|
|
253
277
|
SUB_STALLED=0
|
|
254
278
|
if [ "${MX_IDLE_GATE_SUBAGENT_CHECK_DISABLED:-}" != "1" ]; then
|
|
255
|
-
TRANSCRIPT_PATH="$(printf '%s' "$INPUT" | jq -r '.transcript_path // empty' 2>/dev/null || echo '')"
|
|
256
|
-
# Bound the work: the check runs inside a <=5s hook budget. Typical transcripts
|
|
257
|
-
# here are 5-8MB and scan in ~0.1s; anything beyond the cap is skipped rather
|
|
258
|
-
# than risking the budget (skip == challenge, the safe direction).
|
|
259
|
-
TSIZE=0
|
|
260
|
-
if [ -n "$TRANSCRIPT_PATH" ] && [ -f "$TRANSCRIPT_PATH" ] && [ ! -L "$TRANSCRIPT_PATH" ]; then
|
|
261
|
-
TSIZE="$(stat -c %s "$TRANSCRIPT_PATH" 2>/dev/null || stat -f %z "$TRANSCRIPT_PATH" 2>/dev/null || echo 0)"
|
|
262
|
-
fi
|
|
263
|
-
MAX_SCAN_BYTES="${MX_IDLE_GATE_MAX_TRANSCRIPT_BYTES:-67108864}"
|
|
264
|
-
case "$TSIZE" in ''|*[!0-9]*) TSIZE=0 ;; esac
|
|
265
279
|
if [ "$TSIZE" -gt 0 ] && [ "$TSIZE" -le "$MAX_SCAN_BYTES" ] && command -v awk >/dev/null 2>&1; then
|
|
266
280
|
# One jq pass emits an ordered event stream (L launch / S re-engage / D done);
|
|
267
281
|
# awk replays it. `tostring` is used for the two text-embedded ids because they
|
|
@@ -337,6 +351,157 @@ if [ "${MX_IDLE_GATE_SUBAGENT_CHECK_DISABLED:-}" != "1" ]; then
|
|
|
337
351
|
fi
|
|
338
352
|
fi
|
|
339
353
|
|
|
354
|
+
# ── 3b. An interactive role waiting for a person → stand down (bounded). ─────
|
|
355
|
+
#
|
|
356
|
+
# WHY (#109, #112). A team whose session IS a conversation with the product
|
|
357
|
+
# owner stops after every question it asks. This gate read each of those stops
|
|
358
|
+
# as parked work and challenged it. On the first live creation that cost 3
|
|
359
|
+
# minutes 10 seconds before the first question reached the product owner, and it
|
|
360
|
+
# fired on all eight questions.
|
|
361
|
+
#
|
|
362
|
+
# THE CLAIM THIS MAKES, AND THE ONE IT DOES NOT. An interactive role's stops are
|
|
363
|
+
# its questions; the gate does not check which; the stand-down ends after 3
|
|
364
|
+
# stops with no human prompt. Nothing here detects a question. The team-builder
|
|
365
|
+
# asks in prose (#95), so a check keyed on an AskUserQuestion record finds
|
|
366
|
+
# nothing, and a check keyed on the assistant's words lets the guarded party
|
|
367
|
+
# silence the gate by writing prose, which is the defect SF-5 removed.
|
|
368
|
+
#
|
|
369
|
+
# TWO HARNESS-AUTHORED FACTS, AND NEITHER IS PROSE.
|
|
370
|
+
# 1. The team's catalog entry on origin/main holds `Interaction: interactive`.
|
|
371
|
+
# `mx-agent start` resolved that once and wrote the answer to the state
|
|
372
|
+
# file read below, so no git command and no network call runs on this path
|
|
373
|
+
# (the FAIL POLICY above forbids one). `unresolvable` and `non-interactive`
|
|
374
|
+
# both read as not interactive; an absent or unreadable file does too.
|
|
375
|
+
# origin/main is a guardrail-grade anchor, not an access control: a process
|
|
376
|
+
# with write access to .git moves a remote-tracking ref at the same
|
|
377
|
+
# privilege the session already holds.
|
|
378
|
+
# 2. `promptSource` on a `type: user` record. The harness authors it through
|
|
379
|
+
# the application layer, and the model cannot set it there. The value is
|
|
380
|
+
# still session-writable on the filesystem: the transcript file is owned by
|
|
381
|
+
# the same user the session runs as, so appending a record with
|
|
382
|
+
# `promptSource: typed` resets the streak (red-team finding 2, #114).
|
|
383
|
+
# `typed`, `queued` and `suggestion_accepted` are the
|
|
384
|
+
# values a person entering a prompt produces (jsonl.ts:388-392). The
|
|
385
|
+
# classifier `isMachineGeneratedUserRecord` is NOT the test here: it
|
|
386
|
+
# answers false for all 1,181 tool-result user records in one measured
|
|
387
|
+
# transcript, so a bound built on it would never trip.
|
|
388
|
+
#
|
|
389
|
+
# THE TEAM SLUG IS SESSION-WRITABLE, AND THE BOUND IS THE CONTAINMENT. A session
|
|
390
|
+
# writes .mx-coordination-team, so it can run under another team's name and
|
|
391
|
+
# inherit that team's declaration. The catalog line is a necessary condition and
|
|
392
|
+
# never a sufficient one. What contains a false declaration is the bound: a
|
|
393
|
+
# session that declared itself interactive and then parked work produces no new
|
|
394
|
+
# human prompt, the streak reaches the cap, and the gate challenges. Same shape,
|
|
395
|
+
# same ceiling and the same clamp as section 3.
|
|
396
|
+
#
|
|
397
|
+
# A SUBAGENT MAY NOT CLAIM ITS PARENT'S STAND-DOWN. Two refusals here, and only
|
|
398
|
+
# one of them rests on a measured fact. A subagent transcript lives under a
|
|
399
|
+
# `subagents/` directory, and that path test is the control: it depends on
|
|
400
|
+
# nothing but the path the harness supplies on stdin.
|
|
401
|
+
#
|
|
402
|
+
# The environment test is weaker than it reads. The Bash TOOL SHELL of a
|
|
403
|
+
# subagent carries CLAUDE_CODE_CHILD_SESSION, which is what was measured; the
|
|
404
|
+
# session process does not. Whether a HOOK process carries it is unverified for
|
|
405
|
+
# a subagent and for a lead alike (#114), so this clause may be inert in both
|
|
406
|
+
# directions. The direction is safe either way: a lead refused on the variable
|
|
407
|
+
# is challenged, never silenced.
|
|
408
|
+
#
|
|
409
|
+
# A STALLED SUBAGENT STILL WINS. When section 3 exhausted its own streak, this
|
|
410
|
+
# section does not stand the stop down: the outstanding-work challenge is the
|
|
411
|
+
# older guarantee and this one must not suppress it.
|
|
412
|
+
#
|
|
413
|
+
# Fail direction is CHALLENGE everywhere: no state file, an unreadable one, a
|
|
414
|
+
# value other than `interactive`, no transcript, an oversized transcript.
|
|
415
|
+
INTERACTIVE_ROLE_FILE="${STATE_DIR}/${WORKTREE_NAME}.interactive-role"
|
|
416
|
+
INTERACTIVE_STATE="${STATE_DIR}/${WORKTREE_NAME}.interactive"
|
|
417
|
+
INTERACTIVE_ROLE=""
|
|
418
|
+
if [ -f "$INTERACTIVE_ROLE_FILE" ] && [ ! -L "$INTERACTIVE_ROLE_FILE" ]; then
|
|
419
|
+
read -r INTERACTIVE_ROLE < "$INTERACTIVE_ROLE_FILE" 2>/dev/null || INTERACTIVE_ROLE=""
|
|
420
|
+
fi
|
|
421
|
+
if [ "$INTERACTIVE_ROLE" != "interactive" ]; then
|
|
422
|
+
# Not an interactive role this session: the streak belongs to nothing, so it
|
|
423
|
+
# does not carry into a later session that is one.
|
|
424
|
+
rm -f "$INTERACTIVE_STATE" 2>/dev/null || true
|
|
425
|
+
fi
|
|
426
|
+
|
|
427
|
+
INTERACTIVE_OK=0
|
|
428
|
+
if [ "$INTERACTIVE_ROLE" = "interactive" ] \
|
|
429
|
+
&& [ "$SUB_STALLED" != "1" ] \
|
|
430
|
+
&& [ -z "${CLAUDE_CODE_CHILD_SESSION:-}" ] \
|
|
431
|
+
&& [ "$TSIZE" -gt 0 ] && [ "$TSIZE" -le "$MAX_SCAN_BYTES" ]; then
|
|
432
|
+
case "$TRANSCRIPT_PATH" in
|
|
433
|
+
*/subagents/*) INTERACTIVE_OK=0 ;;
|
|
434
|
+
*) INTERACTIVE_OK=1 ;;
|
|
435
|
+
esac
|
|
436
|
+
fi
|
|
437
|
+
|
|
438
|
+
if [ "$INTERACTIVE_OK" = "1" ]; then
|
|
439
|
+
# SIX FIELD NAMES AND NO FREE TEXT. This program reads `type`, `promptSource`,
|
|
440
|
+
# `isMeta`, `isSidechain` and `isCompactSummary`, and it emits a constant. It
|
|
441
|
+
# never stringifies a record or a block: `tostring` on this path would read
|
|
442
|
+
# every tool result the session met, which is where a database password, a
|
|
443
|
+
# kubeconfig or an environment dump ends up (security pre-ruling F2). One
|
|
444
|
+
# constant per matching record, counted by awk.
|
|
445
|
+
HUMAN_COUNT="$(jq -r '
|
|
446
|
+
select(.type=="user")
|
|
447
|
+
| select(.isMeta != true and .isSidechain != true and .isCompactSummary != true)
|
|
448
|
+
| select(.promptSource=="typed" or .promptSource=="queued" or .promptSource=="suggestion_accepted")
|
|
449
|
+
| "h"
|
|
450
|
+
' "$TRANSCRIPT_PATH" 2>/dev/null \
|
|
451
|
+
| awk 'END { print NR }' 2>/dev/null || echo '')"
|
|
452
|
+
case "$HUMAN_COUNT" in ''|*[!0-9]*) HUMAN_COUNT=0 ;; esac
|
|
453
|
+
|
|
454
|
+
PREV_HUMAN=0; PREV_STREAK=0
|
|
455
|
+
if [ -f "$INTERACTIVE_STATE" ] && [ ! -L "$INTERACTIVE_STATE" ]; then
|
|
456
|
+
read -r PREV_HUMAN PREV_STREAK < "$INTERACTIVE_STATE" 2>/dev/null || { PREV_HUMAN=0; PREV_STREAK=0; }
|
|
457
|
+
case "$PREV_HUMAN" in ''|*[!0-9]*) PREV_HUMAN=0 ;; esac
|
|
458
|
+
case "$PREV_STREAK" in ''|*[!0-9]*) PREV_STREAK=0 ;; esac
|
|
459
|
+
fi
|
|
460
|
+
# Progress = at least one MORE human prompt than at the last stop. A
|
|
461
|
+
# comparison of harness-recorded totals; no wall-clock reasoning.
|
|
462
|
+
if [ "$HUMAN_COUNT" -gt "$PREV_HUMAN" ]; then
|
|
463
|
+
INTERACTIVE_STREAK=1
|
|
464
|
+
else
|
|
465
|
+
INTERACTIVE_STREAK=$(( PREV_STREAK + 1 ))
|
|
466
|
+
fi
|
|
467
|
+
# DETECTION, AND THE LIMIT OF IT (security S2, #114). This file lives in a
|
|
468
|
+
# directory the guarded session owns, so the session can rewrite or remove it
|
|
469
|
+
# and the bound never trips. The security reviewer measured 8 of 8 stops
|
|
470
|
+
# standing down with the file removed before each one (PR #113 comment
|
|
471
|
+
# 5386218312); the red-team measured 30 of 30 with the counter overwritten
|
|
472
|
+
# (PR #113 comment 5386223077). Every one of those log lines is
|
|
473
|
+
# byte-identical in shape to a legitimate one.
|
|
474
|
+
#
|
|
475
|
+
# What baseline review can count: a run of `standdown/interactive-role` lines
|
|
476
|
+
# in idle-gate.jsonl with no `challenge` between them. On the honest path a
|
|
477
|
+
# run longer than INTERACTIVE_MAX_CEILING has exactly one innocent
|
|
478
|
+
# explanation, a live dialogue in which a person answered between the stops,
|
|
479
|
+
# because that is the only thing that resets the streak. So a long run is a
|
|
480
|
+
# question, not a verdict: it means either the product owner kept answering or
|
|
481
|
+
# this file was rewritten, and idle-gate.jsonl alone does not separate them.
|
|
482
|
+
#
|
|
483
|
+
# What separates them is the human-prompt total over the same window, which
|
|
484
|
+
# this file records and the transcript sources. Both are session-writable, so
|
|
485
|
+
# the separation is evidence rather than proof. Nothing here prevents the
|
|
486
|
+
# bypass; the log is what makes somebody able to ask about it.
|
|
487
|
+
printf '%s %s\n' "$HUMAN_COUNT" "$INTERACTIVE_STREAK" > "$INTERACTIVE_STATE" 2>/dev/null || true
|
|
488
|
+
# Clamped for the reason section 3's override is clamped: the knob may only
|
|
489
|
+
# ever make the gate SPEAK SOONER. A non-numeric or negative value falls back
|
|
490
|
+
# to the default. MX_SESSION_IDLE_GATE_DISABLED remains the documented, logged
|
|
491
|
+
# way to turn the gate off; this is not a second one.
|
|
492
|
+
INTERACTIVE_MAX_CEILING=5
|
|
493
|
+
INTERACTIVE_MAX="${MX_IDLE_GATE_INTERACTIVE_MAX_STANDDOWNS:-3}"
|
|
494
|
+
case "$INTERACTIVE_MAX" in ''|*[!0-9]*) INTERACTIVE_MAX=3 ;; esac
|
|
495
|
+
if [ "$INTERACTIVE_MAX" -gt "$INTERACTIVE_MAX_CEILING" ]; then
|
|
496
|
+
INTERACTIVE_MAX="$INTERACTIVE_MAX_CEILING"
|
|
497
|
+
fi
|
|
498
|
+
if [ "$INTERACTIVE_STREAK" -le "$INTERACTIVE_MAX" ]; then
|
|
499
|
+
log_decision standdown interactive-role
|
|
500
|
+
exit 0
|
|
501
|
+
fi
|
|
502
|
+
# Streak exhausted with no new human prompt: fall through to the challenge.
|
|
503
|
+
fi
|
|
504
|
+
|
|
340
505
|
# ── 4. Throttle: challenge at most once per 30 min per worktree. ─────────────
|
|
341
506
|
# An agent that was just challenged and chose to stop anyway is NOT re-nagged
|
|
342
507
|
# every turn; the repeated-stop pattern surfaces in the idle-gate log instead.
|