@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/lib/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAClD;IACE,WAAW,EAAE;QACX,KAAK,EAAE;YACL,SAAS;YACT,SAAS;YACT,UAAU;YACV,SAAS;YACT,SAAS;YACT,SAAS;SACV;QACD,IAAI,EAAE;YACJ,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,8BAA8B;YAC9B,uBAAuB;YACvB,yBAAyB;SAC1B;KACF;CACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;CA2BzC,CAAC;AAEF
|
|
1
|
+
{"version":3,"file":"templates.js","sourceRoot":"","sources":["../../src/lib/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;;GAGG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAG,IAAI,CAAC,SAAS,CAClD;IACE,WAAW,EAAE;QACX,KAAK,EAAE;YACL,SAAS;YACT,SAAS;YACT,UAAU;YACV,SAAS;YACT,SAAS;YACT,SAAS;SACV;QACD,IAAI,EAAE;YACJ,yBAAyB;YACzB,2BAA2B;YAC3B,4BAA4B;YAC5B,8BAA8B;YAC9B,uBAAuB;YACvB,yBAAyB;SAC1B;KACF;CACF,EACD,IAAI,EACJ,CAAC,CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG;;;;;;;;;;;;;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QAC/F,MAAM,EAAE;YACN,UAAU,QAAQ,mDAAmD;YACrE,UAAU,QAAQ,uDAAuD;YACzE,UAAU,QAAQ,wDAAwD;SAC3E;QACD,cAAc,EAAE;YACd,MAAM,EAAE;gBACN,UAAU,EAAE,CAAC,uBAAuB,CAAC;gBACrC,QAAQ,EAAE;oBACR,qBAAqB,EAAE,IAAI;iBAC5B;aACF;SACF;QACD,iBAAiB,EAAE,8CAA8C;QACjE,gBAAgB,EAAE,6CAA6C;QAC/D,UAAU,EAAE,QAAQ;QACpB,mBAAmB,EAAE,IAAI;KAC1B,EACD,IAAI,EACJ,CAAC,CACF,GAAG,IAAI,CAAC;AACX,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,sCAAsC,CAAC,UAAkB;IACvE,OAAO;;;;;;;;;;;;;;uBAcc,UAAU;CAChC,CAAC;AACF,CAAC;AAED,MAAM,UAAU,8BAA8B,CAAC,WAAmB;IAChE,OAAO;;;;qBAIY,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsH/B,CAAC;AACF,CAAC;AAED,MAAM,UAAU,6BAA6B,CAAC,WAAmB;IAC/D,OAAO;;;;;;;;;;;;QAYD,WAAW;;;;CAIlB,CAAC;AACF,CAAC;AAED,MAAM,UAAU,2BAA2B;IACzC,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsCR,CAAC;AACF,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The test project, and which teams belong to it (#259).
|
|
3
|
+
*
|
|
4
|
+
* ONE REPOSITORY, TWO COORDINATION PROJECTS. This repository's
|
|
5
|
+
* `mx-agent.config.json` names project `mx-agent`, and every team it creates
|
|
6
|
+
* inherits that. A test team does not: the coordination service validates an
|
|
7
|
+
* enqueue target against the roster of the sending token's project
|
|
8
|
+
* (`coordination-service/src/service.ts:117-121`), and cross-project addressing
|
|
9
|
+
* does not exist.
|
|
10
|
+
*
|
|
11
|
+
* WHAT THE PARTITION BINDS: A TOKEN. A token issued for `mx-agent-test` can
|
|
12
|
+
* address only that project's roster, and a token issued for `mx-agent` can
|
|
13
|
+
* never address it. No code path has to remember a flag for that to hold.
|
|
14
|
+
*
|
|
15
|
+
* WHAT IT DOES NOT BIND: A SESSION ON THIS MACHINE. Three of the inputs a
|
|
16
|
+
* session uses to say who it is are the session's own to set.
|
|
17
|
+
* `resolveProductSlug` reads `MX_PRODUCT_SLUG` above the project config
|
|
18
|
+
* (`lib/coordination-memory.ts:63-74`), the `.mx-coordination-team` marker sits
|
|
19
|
+
* inside the session's own worktree, and the MemNexus user key the credential
|
|
20
|
+
* request presents belongs to the machine rather than to a team. So a session
|
|
21
|
+
* that asserts another team's identity is bounded by the SERVICE GRANT TABLE,
|
|
22
|
+
* which is keyed on (project, team, identity) and is the only control here that
|
|
23
|
+
* a session cannot write. This module selects an identity; it does not
|
|
24
|
+
* authorise one.
|
|
25
|
+
*
|
|
26
|
+
* A project is normally a repository, so the mapping has to come from somewhere.
|
|
27
|
+
* It comes from ROSTER MEMBERSHIP, in the list below, and from nothing else. No
|
|
28
|
+
* flag and no file inside a worktree selects the test project HERE, which keeps
|
|
29
|
+
* provisioning deterministic; it is not a claim about what a session can assert
|
|
30
|
+
* later.
|
|
31
|
+
*
|
|
32
|
+
* THE HOST GUARD. The mapping applies only when the configured project is
|
|
33
|
+
* `mx-agent`, this repository. Another project that happens to name a team
|
|
34
|
+
* `creation-probe` keeps its own project slug, and the one-line check below is what
|
|
35
|
+
* makes that true.
|
|
36
|
+
*
|
|
37
|
+
* THE MIRROR. `coordination-service/src/config/rosters.ts` holds the same two
|
|
38
|
+
* values as MX_AGENT_TEST_PROJECT and MX_AGENT_TEST_TEAMS, compiled into the
|
|
39
|
+
* service. The two packages do not import each other, so `test-project.test.ts`
|
|
40
|
+
* holds this copy to the generated roster file, which is the serialized form of
|
|
41
|
+
* that source. A drift between them fails there.
|
|
42
|
+
*/
|
|
43
|
+
/** The project a test team belongs to. */
|
|
44
|
+
export declare const TEST_PROJECT_SLUG = "mx-agent-test";
|
|
45
|
+
/** The configured project whose repository hosts the test project. */
|
|
46
|
+
export declare const TEST_PROJECT_HOST = "mx-agent";
|
|
47
|
+
/**
|
|
48
|
+
* The teams in the test project. A FIXED POOL, holding two today.
|
|
49
|
+
*
|
|
50
|
+
* The count is not the rule. Each member is created ONCE, so its credential is
|
|
51
|
+
* granted once, its memory footprint is three named memories, and CI carries
|
|
52
|
+
* one roster entry per member rather than one per rehearsal. Adding a member is
|
|
53
|
+
* the four-edit review documented above MX_AGENT_TEST_TEAMS in
|
|
54
|
+
* `coordination-service/src/config/rosters.ts`: that const, the regenerated
|
|
55
|
+
* offline roster file, the `mx-agent-test)` ROSTER case in
|
|
56
|
+
* provision-team-tokens.sh, and a catalog file declaring the project. This line
|
|
57
|
+
* mirrors that const, and `test-project.test.ts` holds the two in agreement
|
|
58
|
+
* through the generated file.
|
|
59
|
+
*
|
|
60
|
+
* `relay-probe` is the second member (#395). It exists so a send inside the
|
|
61
|
+
* partition has a recipient: with one member every coordination assertion was a
|
|
62
|
+
* refusal across the boundary.
|
|
63
|
+
*/
|
|
64
|
+
export declare const TEST_PROJECT_TEAMS: readonly string[];
|
|
65
|
+
/** Is this team a member of the test project's roster, in this repository? */
|
|
66
|
+
export declare function isTestProjectTeam(team: string, configuredProject: string): boolean;
|
|
67
|
+
/**
|
|
68
|
+
* The project this team is provisioned into: the test project for a test team,
|
|
69
|
+
* and the configured project for every other team.
|
|
70
|
+
*
|
|
71
|
+
* Everything downstream of the project slug follows from this one value: the
|
|
72
|
+
* named-memory prefix, the `product` in the worktree's code-context file, the
|
|
73
|
+
* roster row 9 reads, and which credential path row 10 asks about.
|
|
74
|
+
*/
|
|
75
|
+
export declare function projectForTeam(team: string, configuredProject: string): string;
|
|
76
|
+
/**
|
|
77
|
+
* The environment a launched session needs to resolve the same project the
|
|
78
|
+
* provisioning run used.
|
|
79
|
+
*
|
|
80
|
+
* EMPTY FOR EVERY REAL TEAM, so a launch is byte-identical to before for all of
|
|
81
|
+
* them. A test team's session gets `MX_PRODUCT_SLUG`, which
|
|
82
|
+
* `resolveProductSlug` reads above the project config
|
|
83
|
+
* (`lib/coordination-memory.ts:63-74`). Without it a session inside the test
|
|
84
|
+
* team's worktree resolves `mx-agent` from the repository's config file, asks
|
|
85
|
+
* for a credential for a team that project's roster does not hold, and is
|
|
86
|
+
* refused.
|
|
87
|
+
*
|
|
88
|
+
* This selects a client-side identity only. The service derives the project
|
|
89
|
+
* from the token it was issued, never from a client assertion, so the variable
|
|
90
|
+
* cannot redirect an enqueue. It is also not a control on the session: the
|
|
91
|
+
* session can set the same variable itself, and what stops it holding another
|
|
92
|
+
* team's token is the grant table, not this line.
|
|
93
|
+
*/
|
|
94
|
+
export declare function testProjectEnv(team: string, configuredProject: string): Record<string, string>;
|
|
95
|
+
//# sourceMappingURL=test-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-project.d.ts","sourceRoot":"","sources":["../../src/lib/test-project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,0CAA0C;AAC1C,eAAO,MAAM,iBAAiB,kBAAkB,CAAC;AAEjD,sEAAsE;AACtE,eAAO,MAAM,iBAAiB,aAAa,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,eAAO,MAAM,kBAAkB,EAAE,SAAS,MAAM,EAAsC,CAAC;AAEvF,8EAA8E;AAC9E,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAElF;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAE9E;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAI9F"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The test project, and which teams belong to it (#259).
|
|
3
|
+
*
|
|
4
|
+
* ONE REPOSITORY, TWO COORDINATION PROJECTS. This repository's
|
|
5
|
+
* `mx-agent.config.json` names project `mx-agent`, and every team it creates
|
|
6
|
+
* inherits that. A test team does not: the coordination service validates an
|
|
7
|
+
* enqueue target against the roster of the sending token's project
|
|
8
|
+
* (`coordination-service/src/service.ts:117-121`), and cross-project addressing
|
|
9
|
+
* does not exist.
|
|
10
|
+
*
|
|
11
|
+
* WHAT THE PARTITION BINDS: A TOKEN. A token issued for `mx-agent-test` can
|
|
12
|
+
* address only that project's roster, and a token issued for `mx-agent` can
|
|
13
|
+
* never address it. No code path has to remember a flag for that to hold.
|
|
14
|
+
*
|
|
15
|
+
* WHAT IT DOES NOT BIND: A SESSION ON THIS MACHINE. Three of the inputs a
|
|
16
|
+
* session uses to say who it is are the session's own to set.
|
|
17
|
+
* `resolveProductSlug` reads `MX_PRODUCT_SLUG` above the project config
|
|
18
|
+
* (`lib/coordination-memory.ts:63-74`), the `.mx-coordination-team` marker sits
|
|
19
|
+
* inside the session's own worktree, and the MemNexus user key the credential
|
|
20
|
+
* request presents belongs to the machine rather than to a team. So a session
|
|
21
|
+
* that asserts another team's identity is bounded by the SERVICE GRANT TABLE,
|
|
22
|
+
* which is keyed on (project, team, identity) and is the only control here that
|
|
23
|
+
* a session cannot write. This module selects an identity; it does not
|
|
24
|
+
* authorise one.
|
|
25
|
+
*
|
|
26
|
+
* A project is normally a repository, so the mapping has to come from somewhere.
|
|
27
|
+
* It comes from ROSTER MEMBERSHIP, in the list below, and from nothing else. No
|
|
28
|
+
* flag and no file inside a worktree selects the test project HERE, which keeps
|
|
29
|
+
* provisioning deterministic; it is not a claim about what a session can assert
|
|
30
|
+
* later.
|
|
31
|
+
*
|
|
32
|
+
* THE HOST GUARD. The mapping applies only when the configured project is
|
|
33
|
+
* `mx-agent`, this repository. Another project that happens to name a team
|
|
34
|
+
* `creation-probe` keeps its own project slug, and the one-line check below is what
|
|
35
|
+
* makes that true.
|
|
36
|
+
*
|
|
37
|
+
* THE MIRROR. `coordination-service/src/config/rosters.ts` holds the same two
|
|
38
|
+
* values as MX_AGENT_TEST_PROJECT and MX_AGENT_TEST_TEAMS, compiled into the
|
|
39
|
+
* service. The two packages do not import each other, so `test-project.test.ts`
|
|
40
|
+
* holds this copy to the generated roster file, which is the serialized form of
|
|
41
|
+
* that source. A drift between them fails there.
|
|
42
|
+
*/
|
|
43
|
+
/** The project a test team belongs to. */
|
|
44
|
+
export const TEST_PROJECT_SLUG = 'mx-agent-test';
|
|
45
|
+
/** The configured project whose repository hosts the test project. */
|
|
46
|
+
export const TEST_PROJECT_HOST = 'mx-agent';
|
|
47
|
+
/**
|
|
48
|
+
* The teams in the test project. A FIXED POOL, holding two today.
|
|
49
|
+
*
|
|
50
|
+
* The count is not the rule. Each member is created ONCE, so its credential is
|
|
51
|
+
* granted once, its memory footprint is three named memories, and CI carries
|
|
52
|
+
* one roster entry per member rather than one per rehearsal. Adding a member is
|
|
53
|
+
* the four-edit review documented above MX_AGENT_TEST_TEAMS in
|
|
54
|
+
* `coordination-service/src/config/rosters.ts`: that const, the regenerated
|
|
55
|
+
* offline roster file, the `mx-agent-test)` ROSTER case in
|
|
56
|
+
* provision-team-tokens.sh, and a catalog file declaring the project. This line
|
|
57
|
+
* mirrors that const, and `test-project.test.ts` holds the two in agreement
|
|
58
|
+
* through the generated file.
|
|
59
|
+
*
|
|
60
|
+
* `relay-probe` is the second member (#395). It exists so a send inside the
|
|
61
|
+
* partition has a recipient: with one member every coordination assertion was a
|
|
62
|
+
* refusal across the boundary.
|
|
63
|
+
*/
|
|
64
|
+
export const TEST_PROJECT_TEAMS = ['creation-probe', 'relay-probe'];
|
|
65
|
+
/** Is this team a member of the test project's roster, in this repository? */
|
|
66
|
+
export function isTestProjectTeam(team, configuredProject) {
|
|
67
|
+
return configuredProject === TEST_PROJECT_HOST && TEST_PROJECT_TEAMS.includes(team);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* The project this team is provisioned into: the test project for a test team,
|
|
71
|
+
* and the configured project for every other team.
|
|
72
|
+
*
|
|
73
|
+
* Everything downstream of the project slug follows from this one value: the
|
|
74
|
+
* named-memory prefix, the `product` in the worktree's code-context file, the
|
|
75
|
+
* roster row 9 reads, and which credential path row 10 asks about.
|
|
76
|
+
*/
|
|
77
|
+
export function projectForTeam(team, configuredProject) {
|
|
78
|
+
return isTestProjectTeam(team, configuredProject) ? TEST_PROJECT_SLUG : configuredProject;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The environment a launched session needs to resolve the same project the
|
|
82
|
+
* provisioning run used.
|
|
83
|
+
*
|
|
84
|
+
* EMPTY FOR EVERY REAL TEAM, so a launch is byte-identical to before for all of
|
|
85
|
+
* them. A test team's session gets `MX_PRODUCT_SLUG`, which
|
|
86
|
+
* `resolveProductSlug` reads above the project config
|
|
87
|
+
* (`lib/coordination-memory.ts:63-74`). Without it a session inside the test
|
|
88
|
+
* team's worktree resolves `mx-agent` from the repository's config file, asks
|
|
89
|
+
* for a credential for a team that project's roster does not hold, and is
|
|
90
|
+
* refused.
|
|
91
|
+
*
|
|
92
|
+
* This selects a client-side identity only. The service derives the project
|
|
93
|
+
* from the token it was issued, never from a client assertion, so the variable
|
|
94
|
+
* cannot redirect an enqueue. It is also not a control on the session: the
|
|
95
|
+
* session can set the same variable itself, and what stops it holding another
|
|
96
|
+
* team's token is the grant table, not this line.
|
|
97
|
+
*/
|
|
98
|
+
export function testProjectEnv(team, configuredProject) {
|
|
99
|
+
return isTestProjectTeam(team, configuredProject)
|
|
100
|
+
? { MX_PRODUCT_SLUG: TEST_PROJECT_SLUG }
|
|
101
|
+
: {};
|
|
102
|
+
}
|
|
103
|
+
//# sourceMappingURL=test-project.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-project.js","sourceRoot":"","sources":["../../src/lib/test-project.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AAEH,0CAA0C;AAC1C,MAAM,CAAC,MAAM,iBAAiB,GAAG,eAAe,CAAC;AAEjD,sEAAsE;AACtE,MAAM,CAAC,MAAM,iBAAiB,GAAG,UAAU,CAAC;AAE5C;;;;;;;;;;;;;;;;GAgBG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAsB,CAAC,gBAAgB,EAAE,aAAa,CAAC,CAAC;AAEvF,8EAA8E;AAC9E,MAAM,UAAU,iBAAiB,CAAC,IAAY,EAAE,iBAAyB;IACvE,OAAO,iBAAiB,KAAK,iBAAiB,IAAI,kBAAkB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACtF,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,iBAAyB;IACpE,OAAO,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,iBAAiB,CAAC;AAC5F,CAAC;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,UAAU,cAAc,CAAC,IAAY,EAAE,iBAAyB;IACpE,OAAO,iBAAiB,CAAC,IAAI,EAAE,iBAAiB,CAAC;QAC/C,CAAC,CAAC,EAAE,eAAe,EAAE,iBAAiB,EAAE;QACxC,CAAC,CAAC,EAAE,CAAC;AACT,CAAC"}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a team's coordination token exists in the dev Key Vault (#77).
|
|
3
|
+
*
|
|
4
|
+
* Row 10 of the completion contract asks one question: has the product owner
|
|
5
|
+
* minted this team's token yet. The answer decides whether a new team can fetch
|
|
6
|
+
* a bearer token at session start, and provisioning used to state it as "not
|
|
7
|
+
* checked here".
|
|
8
|
+
*
|
|
9
|
+
* WHAT THIS READS. The number of ENABLED VERSIONS of the secret, and nothing
|
|
10
|
+
* else. `az keyvault secret list-versions` calls GetSecretVersions, which
|
|
11
|
+
* returns version metadata and no secret values, so no token is transmitted to
|
|
12
|
+
* this machine, printed, stored or held in memory. `az keyvault secret show`
|
|
13
|
+
* would fetch the bundle INCLUDING the value and filter it client-side, which is
|
|
14
|
+
* why it is not used here and must not be reintroduced (security ruling,
|
|
15
|
+
* 2026-08-22, applied at #77 item 2).
|
|
16
|
+
*
|
|
17
|
+
* WHAT THIS NEVER DOES. It never requests a value, never runs `--debug` or
|
|
18
|
+
* `--verbose`, never overrides the environment `az` reads, and never puts
|
|
19
|
+
* stdout or stderr into a returned or printed string. stderr is matched against
|
|
20
|
+
* one pattern to tell "no such secret" from "cannot read the vault"; the text
|
|
21
|
+
* itself is discarded.
|
|
22
|
+
*
|
|
23
|
+
* THREE OUTCOMES. A 403, an expired login or a network failure must never read
|
|
24
|
+
* as `absent`: absent tells the operator to mint a token, and minting on the
|
|
25
|
+
* evidence of a permission error is the wrong act.
|
|
26
|
+
*/
|
|
27
|
+
/** Passed, failed and could-not-run, in the shape the roster reads return. */
|
|
28
|
+
export type VaultOutcome = 'present' | 'absent' | 'unresolvable';
|
|
29
|
+
/**
|
|
30
|
+
* The ONE argv this module runs, built for a (project, team) identity.
|
|
31
|
+
*
|
|
32
|
+
* Isolated and exported so the security property is one reviewable expression
|
|
33
|
+
* and one assertion: no `show`, no `--query value`, no `download`, no `set`.
|
|
34
|
+
* `KEYVAULT_NAME` comes only from the `coordination-token.ts` import: no flag,
|
|
35
|
+
* no environment variable, no config value and no parameter default may name a
|
|
36
|
+
* different vault, so this call cannot be pointed at another tenant's secrets.
|
|
37
|
+
*/
|
|
38
|
+
export declare function vaultProbeArgv(project: string, slug: string): string[];
|
|
39
|
+
/** The vault this module reads, for the row detail. The name, never a secret. */
|
|
40
|
+
export declare const VAULT_NAME = "mx-dev-eastus2-kv-001";
|
|
41
|
+
/** The subset of `spawnSync`'s result this classification reads. */
|
|
42
|
+
export interface VaultSpawnResult {
|
|
43
|
+
status: number | null;
|
|
44
|
+
stdout?: string | null;
|
|
45
|
+
stderr?: string | null;
|
|
46
|
+
error?: Error;
|
|
47
|
+
}
|
|
48
|
+
export type VaultSpawn = (command: string, args: string[]) => VaultSpawnResult;
|
|
49
|
+
/**
|
|
50
|
+
* Whether an enabled secret of this team's name exists in the dev vault.
|
|
51
|
+
*
|
|
52
|
+
* `present` claims exactly that: an enabled secret of that name exists. It does
|
|
53
|
+
* not claim the token works, that the roster admits the team, or that the
|
|
54
|
+
* service was deployed. Those are three other facts and two other rows.
|
|
55
|
+
*
|
|
56
|
+
* Never throws. `spawn` is injectable so every outcome is testable without an
|
|
57
|
+
* `az` binary and without a vault.
|
|
58
|
+
*/
|
|
59
|
+
export declare function vaultTokenPresent(project: string, slug: string, spawn?: VaultSpawn): VaultOutcome;
|
|
60
|
+
//# sourceMappingURL=vault.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/lib/vault.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAKH,8EAA8E;AAC9E,MAAM,MAAM,YAAY,GAAG,SAAS,GAAG,QAAQ,GAAG,cAAc,CAAC;AAEjE;;;;;;;;GAQG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAetE;AAED,iFAAiF;AACjF,eAAO,MAAM,UAAU,0BAAgB,CAAC;AAKxC,oEAAoE;AACpE,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,KAAK,CAAC;CACf;AAED,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,gBAAgB,CAAC;AAe/E;;;;;;;;;GASG;AACH,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,GAAE,UAAyB,GAAG,YAAY,CAoB/G"}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a team's coordination token exists in the dev Key Vault (#77).
|
|
3
|
+
*
|
|
4
|
+
* Row 10 of the completion contract asks one question: has the product owner
|
|
5
|
+
* minted this team's token yet. The answer decides whether a new team can fetch
|
|
6
|
+
* a bearer token at session start, and provisioning used to state it as "not
|
|
7
|
+
* checked here".
|
|
8
|
+
*
|
|
9
|
+
* WHAT THIS READS. The number of ENABLED VERSIONS of the secret, and nothing
|
|
10
|
+
* else. `az keyvault secret list-versions` calls GetSecretVersions, which
|
|
11
|
+
* returns version metadata and no secret values, so no token is transmitted to
|
|
12
|
+
* this machine, printed, stored or held in memory. `az keyvault secret show`
|
|
13
|
+
* would fetch the bundle INCLUDING the value and filter it client-side, which is
|
|
14
|
+
* why it is not used here and must not be reintroduced (security ruling,
|
|
15
|
+
* 2026-08-22, applied at #77 item 2).
|
|
16
|
+
*
|
|
17
|
+
* WHAT THIS NEVER DOES. It never requests a value, never runs `--debug` or
|
|
18
|
+
* `--verbose`, never overrides the environment `az` reads, and never puts
|
|
19
|
+
* stdout or stderr into a returned or printed string. stderr is matched against
|
|
20
|
+
* one pattern to tell "no such secret" from "cannot read the vault"; the text
|
|
21
|
+
* itself is discarded.
|
|
22
|
+
*
|
|
23
|
+
* THREE OUTCOMES. A 403, an expired login or a network failure must never read
|
|
24
|
+
* as `absent`: absent tells the operator to mint a token, and minting on the
|
|
25
|
+
* evidence of a permission error is the wrong act.
|
|
26
|
+
*/
|
|
27
|
+
import { spawnSync } from 'child_process';
|
|
28
|
+
import { KEYVAULT_NAME, kvSecretName } from './coordination-token.js';
|
|
29
|
+
/**
|
|
30
|
+
* The ONE argv this module runs, built for a (project, team) identity.
|
|
31
|
+
*
|
|
32
|
+
* Isolated and exported so the security property is one reviewable expression
|
|
33
|
+
* and one assertion: no `show`, no `--query value`, no `download`, no `set`.
|
|
34
|
+
* `KEYVAULT_NAME` comes only from the `coordination-token.ts` import: no flag,
|
|
35
|
+
* no environment variable, no config value and no parameter default may name a
|
|
36
|
+
* different vault, so this call cannot be pointed at another tenant's secrets.
|
|
37
|
+
*/
|
|
38
|
+
export function vaultProbeArgv(project, slug) {
|
|
39
|
+
return [
|
|
40
|
+
'keyvault',
|
|
41
|
+
'secret',
|
|
42
|
+
'list-versions',
|
|
43
|
+
'--vault-name',
|
|
44
|
+
KEYVAULT_NAME,
|
|
45
|
+
'--name',
|
|
46
|
+
kvSecretName(project, slug),
|
|
47
|
+
'--query',
|
|
48
|
+
'length([?attributes.enabled])',
|
|
49
|
+
'-o',
|
|
50
|
+
'tsv',
|
|
51
|
+
'--only-show-errors',
|
|
52
|
+
];
|
|
53
|
+
}
|
|
54
|
+
/** The vault this module reads, for the row detail. The name, never a secret. */
|
|
55
|
+
export const VAULT_NAME = KEYVAULT_NAME;
|
|
56
|
+
/** What the Key Vault CLI says when the secret does not exist. */
|
|
57
|
+
const NOT_FOUND_RE = /SecretNotFound|was not found in this key vault/i;
|
|
58
|
+
/**
|
|
59
|
+
* The default spawn. No shell: the argv is an array, and both slugs reach `az`
|
|
60
|
+
* as single elements. Bounded so a hung or chatty `az` cannot stall a creation
|
|
61
|
+
* or fill memory, and stdio is piped so nothing reaches the transcript.
|
|
62
|
+
*/
|
|
63
|
+
const defaultSpawn = (command, args) => spawnSync(command, args, {
|
|
64
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
65
|
+
timeout: 15_000,
|
|
66
|
+
maxBuffer: 64 * 1024,
|
|
67
|
+
encoding: 'utf-8',
|
|
68
|
+
});
|
|
69
|
+
/**
|
|
70
|
+
* Whether an enabled secret of this team's name exists in the dev vault.
|
|
71
|
+
*
|
|
72
|
+
* `present` claims exactly that: an enabled secret of that name exists. It does
|
|
73
|
+
* not claim the token works, that the roster admits the team, or that the
|
|
74
|
+
* service was deployed. Those are three other facts and two other rows.
|
|
75
|
+
*
|
|
76
|
+
* Never throws. `spawn` is injectable so every outcome is testable without an
|
|
77
|
+
* `az` binary and without a vault.
|
|
78
|
+
*/
|
|
79
|
+
export function vaultTokenPresent(project, slug, spawn = defaultSpawn) {
|
|
80
|
+
let r;
|
|
81
|
+
try {
|
|
82
|
+
r = spawn('az', vaultProbeArgv(project, slug));
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// A spawn that threw is not evidence about the secret.
|
|
86
|
+
return 'unresolvable';
|
|
87
|
+
}
|
|
88
|
+
// `az` missing (ENOENT), killed by the timeout, or stdout past maxBuffer.
|
|
89
|
+
if (r.error || r.status === null)
|
|
90
|
+
return 'unresolvable';
|
|
91
|
+
if (r.status === 0) {
|
|
92
|
+
const count = Number.parseInt(String(r.stdout ?? '').trim(), 10);
|
|
93
|
+
// A count of 0 is a name with no enabled version, which the mint fixes; a
|
|
94
|
+
// non-integer answer is not a count and is treated the same way rather than
|
|
95
|
+
// as a permission problem, because exit 0 says the vault answered.
|
|
96
|
+
return Number.isInteger(count) && count >= 1 ? 'present' : 'absent';
|
|
97
|
+
}
|
|
98
|
+
// Non-zero. Only one shape means the secret does not exist. Every other
|
|
99
|
+
// failure — 403, expired login, wrong subscription, DNS — is could-not-run.
|
|
100
|
+
return NOT_FOUND_RE.test(String(r.stderr ?? '')) ? 'absent' : 'unresolvable';
|
|
101
|
+
}
|
|
102
|
+
//# sourceMappingURL=vault.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|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AAC,KAAK,IAAI,CAAC,CAAC,MAAM,KAAK,IAAI;QAAE,OAAO,cAAc,CAAC;IACxD,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACnB,MAAM,KAAK,GAAG,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;QACjE,0EAA0E;QAC1E,4EAA4E;QAC5E,mEAAmE;QACnE,OAAO,MAAM,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC;IACtE,CAAC;IACD,wEAAwE;IACxE,4EAA4E;IAC5E,OAAO,YAAY,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC;AAC/E,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Key Vault probe behind row 10 (#77), through an injected spawn.
|
|
3
|
+
*
|
|
4
|
+
* Two properties are pinned here, and the first is a security property. The
|
|
5
|
+
* argv never asks for a secret VALUE: `az keyvault secret show` fetches the
|
|
6
|
+
* bundle including the value and filters client-side, so the token would reach
|
|
7
|
+
* this machine; `list-versions` calls GetSecretVersions, which returns metadata
|
|
8
|
+
* only (security ruling, 2026-08-22).
|
|
9
|
+
*
|
|
10
|
+
* The second is the three outcomes. A 403 or an expired login must answer
|
|
11
|
+
* `unresolvable`, never `absent`: absent tells the operator to mint a token, and
|
|
12
|
+
* minting on the evidence of a permission error is the wrong act.
|
|
13
|
+
*
|
|
14
|
+
* No test here runs `az`. Every outcome comes from the injected spawn.
|
|
15
|
+
*/
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=vault.test.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.test.d.ts","sourceRoot":"","sources":["../../src/lib/vault.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG"}
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Key Vault probe behind row 10 (#77), through an injected spawn.
|
|
3
|
+
*
|
|
4
|
+
* Two properties are pinned here, and the first is a security property. The
|
|
5
|
+
* argv never asks for a secret VALUE: `az keyvault secret show` fetches the
|
|
6
|
+
* bundle including the value and filters client-side, so the token would reach
|
|
7
|
+
* this machine; `list-versions` calls GetSecretVersions, which returns metadata
|
|
8
|
+
* only (security ruling, 2026-08-22).
|
|
9
|
+
*
|
|
10
|
+
* The second is the three outcomes. A 403 or an expired login must answer
|
|
11
|
+
* `unresolvable`, never `absent`: absent tells the operator to mint a token, and
|
|
12
|
+
* minting on the evidence of a permission error is the wrong act.
|
|
13
|
+
*
|
|
14
|
+
* No test here runs `az`. Every outcome comes from the injected spawn.
|
|
15
|
+
*/
|
|
16
|
+
import { describe, it, expect } from 'vitest';
|
|
17
|
+
import { vaultTokenPresent, vaultProbeArgv, VAULT_NAME } from './vault.js';
|
|
18
|
+
import { KEYVAULT_NAME, kvSecretName } from './coordination-token.js';
|
|
19
|
+
const PROJECT = 'mx-agent';
|
|
20
|
+
const SLUG = 'scratchteam';
|
|
21
|
+
/** A spawn that records what it was called with and returns a fixed result. */
|
|
22
|
+
function recorder(result) {
|
|
23
|
+
const calls = [];
|
|
24
|
+
const spawn = (command, args) => {
|
|
25
|
+
calls.push({ command, args });
|
|
26
|
+
return result;
|
|
27
|
+
};
|
|
28
|
+
return { calls, spawn };
|
|
29
|
+
}
|
|
30
|
+
describe('vaultProbeArgv: what the probe is allowed to ask for', () => {
|
|
31
|
+
it('lists versions and never shows, downloads or sets a secret', () => {
|
|
32
|
+
const argv = vaultProbeArgv(PROJECT, SLUG);
|
|
33
|
+
expect(argv).toContain('list-versions');
|
|
34
|
+
expect(argv).not.toContain('show');
|
|
35
|
+
expect(argv).not.toContain('download');
|
|
36
|
+
expect(argv).not.toContain('set');
|
|
37
|
+
expect(argv).not.toContain('--debug');
|
|
38
|
+
expect(argv).not.toContain('--verbose');
|
|
39
|
+
});
|
|
40
|
+
it('queries the enabled-version count, never the value', () => {
|
|
41
|
+
const argv = vaultProbeArgv(PROJECT, SLUG);
|
|
42
|
+
const query = argv[argv.indexOf('--query') + 1];
|
|
43
|
+
expect(query).toBe('length([?attributes.enabled])');
|
|
44
|
+
expect(argv.join(' ')).not.toContain('--query value');
|
|
45
|
+
expect(argv.join(' ')).not.toMatch(/\bvalue\b/);
|
|
46
|
+
});
|
|
47
|
+
it('names the vault from coordination-token.ts and the secret from kvSecretName', () => {
|
|
48
|
+
const argv = vaultProbeArgv(PROJECT, SLUG);
|
|
49
|
+
expect(argv[argv.indexOf('--vault-name') + 1]).toBe(KEYVAULT_NAME);
|
|
50
|
+
expect(argv[argv.indexOf('--name') + 1]).toBe(kvSecretName(PROJECT, SLUG));
|
|
51
|
+
expect(VAULT_NAME).toBe(KEYVAULT_NAME);
|
|
52
|
+
});
|
|
53
|
+
it('passes both slugs as single argv elements, with no shell', () => {
|
|
54
|
+
const { calls, spawn } = recorder({ status: 0, stdout: '1\n', stderr: '' });
|
|
55
|
+
vaultTokenPresent(PROJECT, SLUG, spawn);
|
|
56
|
+
expect(calls).toHaveLength(1);
|
|
57
|
+
expect(calls[0].command).toBe('az');
|
|
58
|
+
expect(calls[0].args).toEqual(vaultProbeArgv(PROJECT, SLUG));
|
|
59
|
+
expect(calls[0].args).toContain(`coordination-token--${PROJECT}--${SLUG}`);
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
describe('vaultTokenPresent: three outcomes', () => {
|
|
63
|
+
it('answers present for exit 0 and an enabled-version count of 1', () => {
|
|
64
|
+
const { spawn } = recorder({ status: 0, stdout: '1\n', stderr: '' });
|
|
65
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('present');
|
|
66
|
+
});
|
|
67
|
+
it('answers present for more than one enabled version', () => {
|
|
68
|
+
const { spawn } = recorder({ status: 0, stdout: '3\n', stderr: '' });
|
|
69
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('present');
|
|
70
|
+
});
|
|
71
|
+
it('answers absent for exit 0 and a count of 0', () => {
|
|
72
|
+
// The name exists with every version disabled. The mint is still the fix.
|
|
73
|
+
const { spawn } = recorder({ status: 0, stdout: '0\n', stderr: '' });
|
|
74
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('absent');
|
|
75
|
+
});
|
|
76
|
+
it('answers absent for exit 0 and an empty or non-integer answer', () => {
|
|
77
|
+
for (const stdout of ['', '\n', 'null\n', 'true\n']) {
|
|
78
|
+
const { spawn } = recorder({ status: 0, stdout, stderr: '' });
|
|
79
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('absent');
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
it('answers absent for the CLI not-found error', () => {
|
|
83
|
+
for (const stderr of [
|
|
84
|
+
"ERROR: (SecretNotFound) A secret with (name/id) coordination-token--mx-agent--scratchteam was not found in this key vault.\n",
|
|
85
|
+
'ERROR: Secret scratchteam was not found in this key vault\n',
|
|
86
|
+
]) {
|
|
87
|
+
const { spawn } = recorder({ status: 3, stdout: '', stderr });
|
|
88
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('absent');
|
|
89
|
+
}
|
|
90
|
+
});
|
|
91
|
+
it('answers unresolvable for a permission failure, never absent', () => {
|
|
92
|
+
const { spawn } = recorder({
|
|
93
|
+
status: 1,
|
|
94
|
+
stdout: '',
|
|
95
|
+
stderr: "ERROR: (Forbidden) The user, group or application does not have secrets list permission on key vault 'mx-dev-eastus2-kv-001'. Status code: 403\n",
|
|
96
|
+
});
|
|
97
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('unresolvable');
|
|
98
|
+
});
|
|
99
|
+
it('answers unresolvable when the login has expired', () => {
|
|
100
|
+
const { spawn } = recorder({
|
|
101
|
+
status: 1,
|
|
102
|
+
stdout: '',
|
|
103
|
+
stderr: "ERROR: Please run 'az login' to setup account.\n",
|
|
104
|
+
});
|
|
105
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('unresolvable');
|
|
106
|
+
});
|
|
107
|
+
it('answers unresolvable when az is not installed (ENOENT)', () => {
|
|
108
|
+
const enoent = Object.assign(new Error('spawnSync az ENOENT'), { code: 'ENOENT' });
|
|
109
|
+
const { spawn } = recorder({ status: null, error: enoent });
|
|
110
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('unresolvable');
|
|
111
|
+
});
|
|
112
|
+
it('answers unresolvable when the call timed out or overran its buffer', () => {
|
|
113
|
+
for (const error of [new Error('ETIMEDOUT'), new Error('ENOBUFS')]) {
|
|
114
|
+
const { spawn } = recorder({ status: null, stdout: '', stderr: '', error });
|
|
115
|
+
expect(vaultTokenPresent(PROJECT, SLUG, spawn)).toBe('unresolvable');
|
|
116
|
+
}
|
|
117
|
+
});
|
|
118
|
+
it('answers unresolvable when the spawn itself throws', () => {
|
|
119
|
+
const throwing = () => {
|
|
120
|
+
throw new Error('spawn refused');
|
|
121
|
+
};
|
|
122
|
+
expect(vaultTokenPresent(PROJECT, SLUG, throwing)).toBe('unresolvable');
|
|
123
|
+
});
|
|
124
|
+
});
|
|
125
|
+
describe('vaultTokenPresent: nothing the vault says reaches a returned string', () => {
|
|
126
|
+
it('returns one of three words whatever stdout and stderr hold', () => {
|
|
127
|
+
// If a secret value ever did reach stdout, it must not reach a caller. The
|
|
128
|
+
// return type is the whole answer: three words, no detail field.
|
|
129
|
+
const leak = 'sk-live-000000000000000000000000';
|
|
130
|
+
const cases = [
|
|
131
|
+
{ status: 0, stdout: `${leak}\n`, stderr: leak },
|
|
132
|
+
{ status: 1, stdout: leak, stderr: `ERROR: (SecretNotFound) ${leak}\n` },
|
|
133
|
+
{ status: 1, stdout: leak, stderr: leak },
|
|
134
|
+
];
|
|
135
|
+
for (const result of cases) {
|
|
136
|
+
const { spawn } = recorder(result);
|
|
137
|
+
const answer = vaultTokenPresent(PROJECT, SLUG, spawn);
|
|
138
|
+
expect(['present', 'absent', 'unresolvable']).toContain(answer);
|
|
139
|
+
expect(answer).not.toContain(leak);
|
|
140
|
+
expect(answer.length).toBeLessThan('unresolvable'.length + 1);
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
});
|
|
144
|
+
describe('the Key Vault path is kept, not deleted (#288)', () => {
|
|
145
|
+
it('still names the dev vault and the ND-1 secret name, for every project', () => {
|
|
146
|
+
// #288 moved `mx-agent` off this path and left every other project on it.
|
|
147
|
+
// Deleting KEYVAULT_NAME, the `az` invocation and the KV secret-name helpers
|
|
148
|
+
// is a LATER iteration, after the other projects migrate or the product owner
|
|
149
|
+
// rules they will not. Until then this module must keep working unchanged,
|
|
150
|
+
// and it is asked here for a credential-endpoint project and a Key Vault one
|
|
151
|
+
// alike: the switch lives in coordination-token.ts, not in this module, so a
|
|
152
|
+
// probe that reached here is a probe the caller decided to make.
|
|
153
|
+
for (const project of ['mx-agent', 'memnexus', 'spearmint-private']) {
|
|
154
|
+
const argv = vaultProbeArgv(project, SLUG);
|
|
155
|
+
expect(argv).toContain(KEYVAULT_NAME);
|
|
156
|
+
expect(argv).toContain(kvSecretName(project, SLUG));
|
|
157
|
+
expect(argv).toContain('list-versions');
|
|
158
|
+
expect(argv).not.toContain('show');
|
|
159
|
+
}
|
|
160
|
+
expect(VAULT_NAME).toBe(KEYVAULT_NAME);
|
|
161
|
+
});
|
|
162
|
+
it('takes no user key, no service URL, and no identity', () => {
|
|
163
|
+
// A guard against the credential path bleeding into the vault probe. This
|
|
164
|
+
// module's whole input is (project, slug) plus an injectable spawn.
|
|
165
|
+
expect(vaultProbeArgv(PROJECT, SLUG).join(' ')).not.toMatch(/user-key|credential|api[-_]?key/i);
|
|
166
|
+
expect(vaultProbeArgv(PROJECT, SLUG).join(' ')).not.toMatch(/https?:/i);
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
//# sourceMappingURL=vault.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vault.test.js","sourceRoot":"","sources":["../../src/lib/vault.test.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,UAAU,EAAyB,MAAM,YAAY,CAAC;AAClG,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AAEtE,MAAM,OAAO,GAAG,UAAU,CAAC;AAC3B,MAAM,IAAI,GAAG,aAAa,CAAC;AAE3B,+EAA+E;AAC/E,SAAS,QAAQ,CAAC,MAAwB;IACxC,MAAM,KAAK,GAA+C,EAAE,CAAC;IAC7D,MAAM,KAAK,GAAG,CAAC,OAAe,EAAE,IAAc,EAAoB,EAAE;QAClE,KAAK,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9B,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IACF,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC;AAC1B,CAAC;AAED,QAAQ,CAAC,sDAAsD,EAAE,GAAG,EAAE;IACpE,EAAE,CAAC,4DAA4D,EAAE,GAAG,EAAE;QACpE,MAAM,IAAI,GAAG,cAAc,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAE3C,MAAM,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;QACxC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC;QACnC,MAAM,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;QACvC,MAAM,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